summaryrefslogtreecommitdiff
path: root/src/radeon_commonfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_commonfuncs.c')
-rw-r--r--src/radeon_commonfuncs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index e2b71716..e0b026f1 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -858,16 +858,16 @@ void FUNC_NAME(RADEONWaitForVLine)(ScrnInfoPtr pScrn, PixmapPtr pPix,
return;
}
- start = max(start, 0);
- stop = min(stop, crtc->mode.VDisplay);
+ start = max(start, crtc->y);
+ stop = min(stop, crtc->y + crtc->mode.VDisplay);
if (start >= stop)
return;
- if (IS_AVIVO_VARIANT) {
- /* on r5xx+ vline starts at viewport_y */
- start += crtc->y;
- stop += crtc->y;
+ if (!IS_AVIVO_VARIANT) {
+ /* on pre-r5xx vline starts at CRTC scanout */
+ start -= crtc->y;
+ stop -= crtc->y;
}
#if defined(ACCEL_CP) && defined(XF86DRM_MODE)