summaryrefslogtreecommitdiff
path: root/src/intel_video.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-07-09 12:11:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-07-09 12:12:00 +0100
commit141e88c8730a099a6ca5eab1350c2e53a680cb0d (patch)
tree5fdc141e5df94ec0e4895195d835d02adf87ed14 /src/intel_video.c
parent272d1c14a39c32ade39b5a8b080a891f2b3d6e8e (diff)
video: forgotten amendment to previous commit.
An extra sanity check to skip the wait if all clipped... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_video.c')
-rw-r--r--src/intel_video.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel_video.c b/src/intel_video.c
index cf225629..8be9dfb9 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -1289,6 +1289,7 @@ intel_wait_for_scanline(ScrnInfoPtr scrn, PixmapPtr pixmap,
if (crtc->transform_in_use)
pixman_f_transform_bounds(&crtc->f_framebuffer_to_crtc, &box);
+ /* We could presume the clip was correctly computed... */
intel_crtc_box(crtc, &crtc_box);
intel_box_intersect(&box, &crtc_box, &box);
@@ -1299,6 +1300,8 @@ intel_wait_for_scanline(ScrnInfoPtr scrn, PixmapPtr pixmap,
y1 = (crtc_box.y1 <= box.y1) ? box.y1 - crtc_box.y1 : 0;
y2 = (box.y2 <= crtc_box.y2) ?
box.y2 - crtc_box.y1 : crtc_box.y2 - crtc_box.y1;
+ if (y2 <= y1)
+ return;
full_height = FALSE;
if (y1 == 0 && y2 == (crtc_box.y2 - crtc_box.y1))