summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2008-08-20 15:06:36 -0700
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-08-22 13:27:08 +0800
commit48d4b0ae50affd7fa442271046eefba74de7ff2c (patch)
treeb742fa86e2ab8290b25c4662ae341ba8d81591f3
parent7fbbafc8fc2b027ec12215ce13d814e339d01a68 (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. (cherry picked from commit 5af504166f14f4401818f3b7c27ac2ccba7b9ff5)
-rw-r--r--src/i830_display.c20
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);
}
/**