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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/r128_driver.c b/src/r128_driver.c
index 8bfa784..25ec1dc 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1246,6 +1246,8 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
 
     R128TRACE(("R128PreInit\n"));
 
+    pScrn->monitor = pScrn->confScreen->monitor;
+
     if (pScrn->numEntities != 1) return FALSE;
 
     if (!R128GetRec(pScrn)) return FALSE;
@@ -1280,7 +1282,6 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
 
     pScrn->racMemFlags  = RAC_FB | RAC_COLORMAP | RAC_VIEWPORT | RAC_CURSOR;
 #endif
-    pScrn->monitor      = pScrn->confScreen->monitor;
 
     /* Allocate an xf86CrtcConfig */
     xf86CrtcConfigInit(pScrn, &R128CRTCResizeFuncs);
-- 
2.7.4

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

Reply via email to