xf86-video-intel: Branch 'xf86-video-intel-2.4-branch' - 2 commits - src/i810_reg.h src/i830_crt.c src/i830_driver.c

Zhenyu Wang zhen at kemper.freedesktop.org
Thu Sep 11 00:55:13 PDT 2008


 src/i810_reg.h    |    3 +++
 src/i830_crt.c    |   21 ++++++++++++++-------
 src/i830_driver.c |   19 +++++++++++++++++++
 3 files changed, 36 insertions(+), 7 deletions(-)

New commits:
commit 86f82c429f5d7067c52d3b783988917869e13d1d
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Thu Sep 11 15:49:41 2008 +0800

    Disable render standby
    
    Render standby is known to cause possible hang issue on some
    mobile chips, so always disable it.

diff --git a/src/i810_reg.h b/src/i810_reg.h
index 8690954..af8c6a3 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -2815,4 +2815,7 @@ typedef enum {
 
 #define PEG_BAND_GAP_DATA	0x14d68
 
+#define MCHBAR_RENDER_STANDBY	0x111B8
+#define RENDER_STANDBY_ENABLE	(1 << 30)
+
 #endif /* _I810_REG_H */
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6f87c51..209aa07 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2718,6 +2718,23 @@ i830_memory_init(ScrnInfoPtr pScrn)
     return FALSE;
 }
 
+static void
+i830_disable_render_standby(ScrnInfoPtr pScrn)
+{
+   I830Ptr pI830 = I830PTR(pScrn);
+   uint32_t render_standby;
+
+   /* Render Standby might cause hang issue, try always disable it.*/
+   if (IS_I965GM(pI830) || IS_GM45(pI830)) {
+       render_standby = INREG(MCHBAR_RENDER_STANDBY);
+       if (render_standby & RENDER_STANDBY_ENABLE) {
+	   xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disable render standby.\n");
+	   OUTREG(MCHBAR_RENDER_STANDBY,
+		   (render_standby & (~RENDER_STANDBY_ENABLE)));
+       }
+   }
+}
+
 static Bool
 I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 {
@@ -3053,6 +3070,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    if (!vgaHWMapMem(pScrn))
       return FALSE;
 
+   i830_disable_render_standby(pScrn);
+
    DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n");
 
    if (!pI830->useEXA) {
commit 95fe53b9fa5f44a1adb909909d609463d68578c2
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Wed Aug 20 14:40:29 2008 -0700

    Don't allocate a pipe for hotplug detection
    
    It shouldn't be needed...
    (cherry picked from commit 7b6f4d22211d71480caf6335a3eacaacff369371)

diff --git a/src/i830_crt.c b/src/i830_crt.c
index 2a99f9c..8274c0c 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -352,10 +352,9 @@ i830_crt_detect(xf86OutputPtr output)
     xf86OutputStatus	    status;
     Bool		    connected;
 
-    crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
-    if (!crtc)
-	return XF86OutputStatusUnknown;
-
+    /*
+     * Try hotplug detection where supported
+     */
     if (IS_I945G(pI830) || IS_I945GM(pI830) || IS_I965G(pI830) ||
 	    IS_G33CLASS(pI830)) {
 	if (i830_crt_detect_hotplug(output))
@@ -363,12 +362,19 @@ i830_crt_detect(xf86OutputPtr output)
 	else
 	    status = XF86OutputStatusDisconnected;
 
-	goto out;
+	goto done;
     }
 
+    /*
+     * DDC is next best, no flicker
+     */
+    crtc = i830GetLoadDetectPipe (output, NULL, &dpms_mode);
+    if (!crtc)
+	return XF86OutputStatusUnknown;
+
     if (i830_crt_detect_ddc(output)) {
 	status = XF86OutputStatusConnected;
-	goto out;
+	goto out_release_pipe;
     }
 
     /* Use the load-detect method if we have no other way of telling. */
@@ -378,9 +384,10 @@ i830_crt_detect(xf86OutputPtr output)
     else
 	status = XF86OutputStatusDisconnected;
 
-out:
+out_release_pipe:
     i830ReleaseLoadDetectPipe (output, dpms_mode);
 
+done:
     return status;
 }
 


More information about the xorg-commit mailing list