[patch] xf86-video-intel: fix random blank screen on 965 when starting X

Hong Liu hong.liu at intel.com
Thu Jan 10 19:25:04 PST 2008


This problem only happens on 965, and we found reading 
the 0x3cc register fixed the problem, though we don't know why.

Thanks,
Hong


diff --git a/src/i830_crt.c b/src/i830_crt.c
index 82a774a..bdae0ec 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -391,6 +391,20 @@ i830_crt_destroy (xf86OutputPtr output)
 	xfree (output->driver_private);
 }
 
+static void i830_crt_commit(xf86OutputPtr output)
+{
+    ScrnInfoPtr		    pScrn = output->scrn;
+    I830Ptr		    pI830 = I830PTR(pScrn);
+
+    output->funcs->dpms (output, DPMSModeOn);
+
+    /* fix the random blank screen problem on 965 when starting X.
+     * we don't know why reading this register fixed the problem,
+     * but it works. */
+    INREG8(0x3cc);
+
+}
+
 static const xf86OutputFuncsRec i830_crt_output_funcs = {
     .dpms = i830_crt_dpms,
     .save = i830_crt_save,
@@ -399,7 +413,7 @@ static const xf86OutputFuncsRec i830_crt_output_funcs = {
     .mode_fixup = i830_crt_mode_fixup,
     .prepare = i830_output_prepare,
     .mode_set = i830_crt_mode_set,
-    .commit = i830_output_commit,
+    .commit = i830_crt_commit,
     .detect = i830_crt_detect,
     .get_modes = i830_ddc_get_modes,
     .destroy = i830_crt_destroy





More information about the xorg mailing list