diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-09-11 15:35:27 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-09-11 15:35:27 +0800 |
commit | f9c625e1e5ddfff06b38fdd4e596fd8eae5934d5 (patch) | |
tree | f8918c87bec6e2478953b1bd5056cd94d62a06f4 | |
parent | 58a3817305ef1455a11be6ead8a8521dfc5875c7 (diff) |
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.h | 3 | ||||
-rw-r--r-- | src/i830_driver.c | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h index 9a85d09e..5b90e12e 100644 --- a/src/i810_reg.h +++ b/src/i810_reg.h @@ -2838,4 +2838,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 491ec5e3..bab86a54 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3012,6 +3012,23 @@ I830SwapPipes(ScrnInfoPtr pScrn) } } +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) { @@ -3291,6 +3308,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) i830_init_bufmgr(pScrn); + i830_disable_render_standby(pScrn); + DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n"); if (pI830->accel <= ACCEL_XAA) { |