[PATCH xf86-video-r128 1/4] Move the location where R128PreInitGamma is called

Kevin Brace kevinbrace at gmx.com
Sun Jun 3 06:43:37 UTC 2018


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 <kevinbrace at gmx.com>
---
 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



More information about the xorg-driver-ati mailing list