From ae448a3beafe001c2bbc60f9fa09ebcfb00e828f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin-=C3=89ric=20Racine?= Date: Sun, 10 Feb 2008 01:50:26 +0200 Subject: Added trivial fix for Gamma initialization. --- src/amd_gx_driver.c | 12 ++++++++++++ src/amd_lx_driver.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c index 177b111..49678f3 100644 --- a/src/amd_gx_driver.c +++ b/src/amd_gx_driver.c @@ -467,6 +467,18 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) if (!xf86SetDefaultVisual(pScrni, -1)) return FALSE; + /* + * If the driver can do gamma correction, it should call xf86SetGamma() + * here. + */ + { + Gamma zeros = { 0.0, 0.0, 0.0 }; + + if (!xf86SetGamma(pScrn, zeros)) { + return FALSE; + } + } + pScrni->progClock = TRUE; xf86CollectOptions(pScrni, NULL); xf86ProcessOptions(pScrni->scrnIndex, pScrni->options, GeodeOptions); diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c index 9abbd5f..34f220a 100644 --- a/src/amd_lx_driver.c +++ b/src/amd_lx_driver.c @@ -551,6 +551,18 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) if (!xf86SetDefaultVisual(pScrni, -1)) return FALSE; + /* + * If the driver can do gamma correction, it should call xf86SetGamma() + * here. + */ + { + Gamma zeros = { 0.0, 0.0, 0.0 }; + + if (!xf86SetGamma(pScrn, zeros)) { + return FALSE; + } + } + pScrni->progClock = TRUE; xf86CollectOptions(pScrni, NULL); xf86ProcessOptions(pScrni->scrnIndex, pScrni->options, GeodeOptions); -- cgit v1.2.3