xserver-multidpi/hw/xfree86/modes
Michel Dänzer b4e46c0444 xfree86: Hook up colormaps and RandR 1.2 gamma code v6
Instead of breaking the former when the driver supports the latter,
hook them up so that the hardware LUTs reflect the combination of the
current colourmap and gamma states. I.e. combine the colourmap, the
global gamma value/ramp and the RandR 1.2 per-CRTC gamma ramps into one
combined LUT per CRTC.

Fixes e.g. gamma sliders not working in games.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27222

v2:
* Initialize palette_size and palette struct members, fixes crash on
  server startup.
v3:
* Free randrp->palette in xf86RandR12CloseScreen, fixes memory leak.
v4:
* Call CMapUnwrapScreen if xf86RandR12InitGamma fails (Emil Velikov).
* Still allow xf86HandleColormaps to be called with a NULL loadPalette
  parameter in the xf86_crtc_supports_gamma case.
v5:
* Clean up inner loops in xf86RandR12CrtcComputeGamma (Keith Packard)
* Move palette update out of per-CRTC loop in xf86RandR12LoadPalette
  (Keith Packard)
v6:
* Handle reallocarray failure in xf86RandR12LoadPalette (Keith Packard)

Reviewed-by: Keith Packard <keithp@keithp.com>
2016-07-28 10:12:05 +09:00
..
Makefile.am xfree86: Remove DisplayID support 2014-09-26 15:27:18 -04:00
xf86Crtc.c xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2 2016-07-27 17:49:39 +09:00
xf86Crtc.h randr/xf86: Add PRIME Synchronization / Double Buffer 2016-06-28 12:56:17 -04:00
xf86Cursors.c xfree86/modes: Simplify in_range logic in xf86_crtc_set_cursor_position 2016-06-21 10:40:05 +09:00
xf86cvt.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86DiDGA.c Convert hw/xfree86 to new *allocarray functions 2015-04-21 16:58:08 -07:00
xf86EdidModes.c xfree86: Fix the 1792x1344-75 EST III mode 2015-09-23 13:18:22 -04:00
xf86gtf.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Modes.c xfree86 warning reduction 2014-01-12 10:14:49 -08:00
xf86Modes.h Eliminate the use of xf86Rename.h 2013-04-24 10:22:20 -07:00
xf86RandR12.c xfree86: Hook up colormaps and RandR 1.2 gamma code v6 2016-07-28 10:12:05 +09:00
xf86RandR12.h xfree86: Hook up colormaps and RandR 1.2 gamma code v6 2016-07-28 10:12:05 +09:00
xf86Rotate.c Remove readmask from screen block/wakeup handler 2016-07-18 15:27:51 -04:00