summaryrefslogtreecommitdiff
path: root/src/r6xx_accel.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2012-02-01 13:07:11 +0100
committerMichel Dänzer <michel@daenzer.net>2012-02-01 13:28:18 +0100
commitbb0e1531ac6949d38025d7dcb19234fee33b2acf (patch)
tree08209bd40c1438ab598532bc86e08a5ae7f65b01 /src/r6xx_accel.c
parent13b3aed4ef9afbcbaea1dcf0ed1acb162b240a3f (diff)
Check for empty vline ranges after clamping.
The clamping could turn a previously non-empty range into an empty one. Also, start == stop means the range is empty. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/r6xx_accel.c')
-rw-r--r--src/r6xx_accel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index 752165b7..94678a1b 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -345,9 +345,6 @@ r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, drmBufPtr ib, PixmapPtr pPix,
if (!crtc)
return;
- if (stop < start)
- return;
-
if (!crtc->enabled)
return;
@@ -370,7 +367,7 @@ r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, drmBufPtr ib, PixmapPtr pPix,
start = max(start, 0);
stop = min(stop, crtc->mode.VDisplay);
- if (start > crtc->mode.VDisplay)
+ if (start >= stop)
return;
/* on r5xx+ vline starts at viewport_y */