xf86-video-intel: src/i830_display.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Wed Aug 20 15:09:07 PDT 2008


 src/i830_display.c |   20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

New commits:
commit 5af504166f14f4401818f3b7c27ac2ccba7b9ff5
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Wed Aug 20 15:06:36 2008 -0700

    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.

diff --git a/src/i830_display.c b/src/i830_display.c
index 2f1e7ab..f81847b 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);
 }
 
 /**


More information about the xorg-commit mailing list