summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Kurylo <Lukasz.Kurylo@gmail.com>2009-06-10 07:55:31 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-06-10 07:55:31 -0700
commite5bfa2702a31566fa94fa75f7289d7cbe9825420 (patch)
tree1a1d18c78b5b206c0ccd9dbf1bffa3e62c3e1558
parentcda5561716891484aa6f1c4a234be8d88f17f659 (diff)
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@gmail.com>
-rw-r--r--src/i830_dri.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 9da1d40d..c28f3ab7 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