• Mario Kleiner's avatar
    sna/uxa: Fix colormap handling at screen depth 30. (v2) · 33ee0c3b
    Mario Kleiner authored
    The various clut handling functions like a setup
    consistent with the x-screen color depth. Otherwise
    we observe improper sampling in the gamma tables
    at depth 30.
    
    Therefore replace hard-coded bitsPerRGB = 8 by actual
    bits per channel scrn->rgbBits. Also use this for call
    to xf86HandleColormaps().
    
    Tested for uxa and sna at depths 8, 16, 24 and 30 on
    IvyBridge, and tested at depth 24 and 30 that xgamma
    and gamma table animations work, and with measurement
    equipment to make sure identity gamma ramps actually
    are identity mappings at the output.
    
    v2: Also deal with X-Server 1.19 and earlier, which as of
        v1.19.6 lack a fix to color palette handling and can
        not deal with depths/bpc > 24/8 bpc. On < 1.20 we skip
        xf86HandleColormaps() setup at > 8 bpc. This disables
        color palette handling on such servers at > 8 bpc, but
        still keeps RandR gamma table handling intact.
    
        Tested on 1.19.6 and 1.20.0 to do the right thing.
    Signed-off-by: 's avatarMario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Ville Syrjälä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    33ee0c3b
Name
Last commit
Last update
benchmarks Loading commit data...
libobj Loading commit data...
m4 Loading commit data...
man Loading commit data...
src Loading commit data...
test Loading commit data...
tools Loading commit data...
xvmc Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
RELEASING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...