diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-20 15:06:36 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-20 15:08:54 -0700 |
commit | 5af504166f14f4401818f3b7c27ac2ccba7b9ff5 (patch) | |
tree | 67c53f296d392ce5ce95a54b2292b5fb7d4740af | |
parent | 7b6f4d22211d71480caf6335a3eacaacff369371 (diff) |
Don't disable planes in i830_update_dsparb
We need to program DSPARB with only one plane enabled at most, and that's
guaranteed to be the case when we're called during mode set, so just assert
that case but otherwise leave the planes alone to avoid flicker on active
displays during output detection for example.
Fixes bug #17050.
-rw-r--r-- | src/i830_display.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/i830_display.c b/src/i830_display.c index 2f1e7abf..f81847b5 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1102,21 +1102,15 @@ i830_update_dsparb(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); I830Ptr pI830 = I830PTR(pScrn); - uint32_t dspacntr, dspbcntr; int total_hdisplay = 0, planea_hdisplay = 0, planeb_hdisplay = 0; int fifo_entries = 0, planea_entries = 0, planeb_entries = 0, i; - dspacntr = INREG(DSPACNTR); - dspbcntr = INREG(DSPBCNTR); + if ((INREG(DSPACNTR) & DISPLAY_PLANE_ENABLE) && + (INREG(DSPBCNTR) & DISPLAY_PLANE_ENABLE)) + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "tried to update DSPARB with both planes enabled!\n"); - /* Disable planes since DSPARB can only be updated when they're - * off. - */ - OUTREG(DSPACNTR, dspacntr & ~DISPLAY_PLANE_ENABLE); - OUTREG(DSPBCNTR, dspbcntr & ~DISPLAY_PLANE_ENABLE); - i830WaitForVblank(pScrn); - - /* + /* * FIFO entries will be split based on programmed modes */ if (IS_I965GM(pI830) || IS_GM45(pI830)) @@ -1158,10 +1152,6 @@ i830_update_dsparb(ScrnInfoPtr pScrn) (planea_entries << DSPARB_AEND_SHIFT)); else OUTREG(DSPARB, planea_entries << DSPARB_AEND_SHIFT); - - OUTREG(DSPACNTR, dspacntr); - OUTREG(DSPBCNTR, dspbcntr); - i830WaitForVblank(pScrn); } /** |