xf86-video-intel: src/i830_dri.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Wed Jun 10 10:17:47 PDT 2009


 src/i830_dri.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e5bfa2702a31566fa94fa75f7289d7cbe9825420
Author: Lukasz Kurylo <Lukasz.Kurylo at gmail.com>
Date:   Wed Jun 10 07:55:31 2009 -0700

    DRI2 copyregion: don't wait for scanlines that won't happen
    
    In some configurations, it's possible to wait for a scanline outside of
    a given CRTC range.  Make sure that can't happen to fix multihead cases
    with dead space.
    
    Fixes fdo bug #22203.
    
    Signed-off-by: Lukasz Kurylo <Lukasz.Kurylo at gmail.com>

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 9da1d40..c28f3ab 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -325,8 +325,10 @@ I830DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
 		load_scan_lines_pipe = MI_LOAD_SCAN_LINES_DISPLAY_PIPEB;
 	    }
 
-	    y1 = box->y1 - crtc->y;
-	    y2 = box->y2 - crtc->y;
+	    /* Make sure we don't wait for a scanline that will never occur */
+	    y1 = (crtcbox.y1 <= box->y1) ? box->y1 - crtcbox.y1 : 0;
+	    y2 = (box->y2 <= crtcbox.y2) ?
+		box->y2 - crtcbox.y1 : crtcbox.y2 - crtcbox.y1;
 
 	    BEGIN_BATCH(5);
 	    /* The documentation says that the LOAD_SCAN_LINES command


More information about the xorg-commit mailing list