randr: Improve per-crtc gamma support.

- The Gamma values from the monitor section are now used during initial config.
- The old colormap system is disabled when gamma set hook is available.
- Gamma values are now persistent for the lifetime of the xserver.
- This requires no driver changes and should be driver ABI compatible.
This commit is contained in:
Maarten Maathuis 2008-12-17 16:56:26 +01:00
commit 91f73b79b7
8 changed files with 249 additions and 7 deletions

View file

@ -49,6 +49,7 @@
#include "xf86_OSproc.h"
#include "xf86str.h"
#include "micmap.h"
#include "xf86Crtc.h"
#ifdef XFreeXDGA
#define _XF86DGA_SERVER_
@ -141,6 +142,10 @@ Bool xf86HandleColormaps(
int *indices;
int elements;
/* If we support a better colormap system, then pretend we succeeded. */
if (xf86_crtc_supports_gamma(pScrn))
return TRUE;
if(!maxColors || !sigRGBbits || !loadPalette)
return FALSE;