diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-07-22 10:51:01 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-07-22 15:40:09 +0800 |
commit | 7f040c63bbfef0b577eeac2052c1951bdbfa3386 (patch) | |
tree | 9f8f1d71e34da06bff5cefceb815c86691765fbf /src/i830_driver.c | |
parent | 06c5a72a496fabace408fbb8733f299a408d1c7c (diff) |
Check underrun on enabled pipe
(cherry picked from commit 7defa4f1f0eba82f39e74f96d2ad7ed2481b537e)
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r-- | src/i830_driver.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 84aedba8..390b5e75 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2487,6 +2487,7 @@ I830BlockHandler(int i, ScreenPtr pScreen = screenInfo.screens[i]; ScrnInfoPtr pScrn = xf86Screens[i]; I830Ptr pI830 = I830PTR(pScrn); + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); pScreen->BlockHandler = pI830->BlockHandler; @@ -2511,11 +2512,14 @@ I830BlockHandler(int i, * (except for mode setting, where it may occur naturally). * Check & ack the condition. */ - if (INREG(PIPEASTAT) & FIFO_UNDERRUN) { + if (xf86_config->crtc[0]->enabled && + (INREG(PIPEASTAT) & FIFO_UNDERRUN)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe A!\n"); OUTREG(PIPEASTAT, INREG(PIPEASTAT) | FIFO_UNDERRUN); } - if (INREG(PIPEBSTAT) & FIFO_UNDERRUN) { + if (xf86_config->num_crtc > 1 && + xf86_config->crtc[1]->enabled && + (INREG(PIPEBSTAT) & FIFO_UNDERRUN)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe B!\n"); OUTREG(PIPEBSTAT, INREG(PIPEBSTAT) | FIFO_UNDERRUN); } |