xserver-multidpi/hw/xfree86/modes
Mario Kleiner b5f9fcd50a xfree86/modes: Adapt xf86Randr12CrtcComputeGamma() for depth 30. (v2)
At screen depths > 24 bit, the color palettes passed into
xf86Randr12CrtcComputeGamma() can have a larger number of slots
than the crtc's hardware lut. E.g., at depth 30, 1024 palette
slots vs. 256 hw lut slots. This palette size > crtc gamma size
case is not handled yet and leads to silent failure, so gamma
table updates do not happen.

Add a new subsampling path for this case.

This makes lut updates work again, as tested with the xgamma
utility (uses XF86VidMode extension) and some RandR based
gamma ramp animation.

v2: Better resampling when subsampling the palette, as
    proposed by Ville. Now reaches the max index of the
    palette and deals with non-power-of-two sizes. Thanks.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Antoine Martin <antoine@nagafix.co.uk> (v1)
Cc: <ville.syrjala@linux.intel.com>
2018-02-27 10:18:07 -05:00
..
Makefile.am xfree86: Remove DisplayID support 2014-09-26 15:27:18 -04:00
meson.build Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
xf86Crtc.c xfree86: Remove broken RANDR disabling logic (v4) 2018-01-29 14:31:34 -05:00
xf86Crtc.h xfree86: Disable cursor whenever turning off CRTC during modeset 2018-01-22 17:22:21 -05:00
xf86Cursors.c xfree86: Disable cursor whenever turning off CRTC during modeset 2018-01-22 17:22:21 -05:00
xf86cvt.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00
xf86DiDGA.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00
xf86EdidModes.c edid: use value returned from pruning duplicate modes 2018-01-29 14:38:12 -05:00
xf86gtf.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00
xf86Modes.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00
xf86Modes.h Eliminate the use of xf86Rename.h 2013-04-24 10:22:20 -07:00
xf86RandR12.c xfree86/modes: Adapt xf86Randr12CrtcComputeGamma() for depth 30. (v2) 2018-02-27 10:18:07 -05:00
xf86RandR12.h xfree86: Hook up colormaps and RandR 1.2 gamma code v6 2016-07-28 10:12:05 +09:00
xf86Rotate.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00