summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-09-11 15:49:41 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-09-11 15:49:41 +0800
commit86f82c429f5d7067c52d3b783988917869e13d1d (patch)
tree4dd546671dd7c9794a6f8c4098455a0f88a04465
parent95fe53b9fa5f44a1adb909909d609463d68578c2 (diff)
downloadxorg-driver-xf86-video-intel-86f82c429f5d7067c52d3b783988917869e13d1d.tar.gz
Disable render standby
Render standby is known to cause possible hang issue on some mobile chips, so always disable it.
-rw-r--r--src/i810_reg.h3
-rw-r--r--src/i830_driver.c19
2 files changed, 22 insertions, 0 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h
index 86909543..af8c6a3d 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 6f87c51f..209aa07d 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) {