[PATCH xf86-video-r128 4/4] Move R128PreInitVisual and R128PreInitGamma calls

Kevin Brace kevinbrace at gmx.com
Sun Jun 3 06:43:40 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 | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/r128_driver.c b/src/r128_driver.c
index 25ec1dc..5c526f7 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1248,6 +1248,14 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
 
     pScrn->monitor = pScrn->confScreen->monitor;
 
+    if (!R128PreInitVisual(pScrn)) {
+        return FALSE;
+    }
+
+    if (!R128PreInitGamma(pScrn)) {
+        return FALSE;
+    }
+
     if (pScrn->numEntities != 1) return FALSE;
 
     if (!R128GetRec(pScrn)) return FALSE;
@@ -1286,12 +1294,6 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
     /* Allocate an xf86CrtcConfig */
     xf86CrtcConfigInit(pScrn, &R128CRTCResizeFuncs);
 
-    if (!R128PreInitVisual(pScrn))    goto fail;
-
-    if (!R128PreInitGamma(pScrn)) {
-        goto fail;
-    }
-
     info->fifo_slots  = 0;
     info->pix24bpp    = xf86GetBppFromDepth(pScrn, pScrn->depth);
     info->CurrentLayout.bitsPerPixel = pScrn->bitsPerPixel;
-- 
2.7.4



More information about the xorg-driver-ati mailing list