This is similar to how the sample code for PreInit callback function
shown in XFree86 DDX Design (ddxDesign.pdf) design guide does it.

Signed-off-by: Kevin Brace <[email protected]>
---
 src/r128_driver.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/r128_driver.c b/src/r128_driver.c
index 1ad111a..347c804 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1306,6 +1306,10 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
 
     if (!R128PreInitVisual(pScrn))    goto fail;
 
+    if (!R128PreInitGamma(pScrn)) {
+        goto fail;
+    }
+
                                /* We can't do this until we have a
                                   pScrn->display. */
     xf86CollectOptions(pScrn, NULL);
@@ -1402,8 +1406,6 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
     /* Get ScreenInit function */
     if (!xf86LoadSubModule(pScrn, "fb")) return FALSE;
 
-    if (!R128PreInitGamma(pScrn))              goto fail;
-
     if (!R128PreInitCursor(pScrn))             goto fail;
 
 #ifdef R128DRI
-- 
2.7.4

_______________________________________________
xorg-driver-ati mailing list
[email protected]
https://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to