commit e5bfa2702a31566fa94fa75f7289d7cbe9825420 Author: Lukasz Kurylo 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 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