diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-08-03 16:20:13 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-08-03 16:20:13 -0400 |
commit | 3b9fdc807dd7e52af0576299cefba596040f6f2f (patch) | |
tree | ffb65ece888a3b877d07f7fef27040e8437df7cf | |
parent | 104b2d7c071f29266b1bc4184a74e9714d14febc (diff) |
r5xx+: Fix vline setup with crtc offsets
On r5xx+, vline is relative to to the viewport, not
the scanlines. Based on initial patch and investigation
from Herbert Pƶtzl (Bertl) on IRC.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | src/evergreen_accel.c | 4 | ||||
-rw-r--r-- | src/r6xx_accel.c | 4 | ||||
-rw-r--r-- | src/radeon_commonfuncs.c | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/evergreen_accel.c b/src/evergreen_accel.c index f4c70c7d..5c95e201 100644 --- a/src/evergreen_accel.c +++ b/src/evergreen_accel.c @@ -312,6 +312,10 @@ void evergreen_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix, if (start > crtc->mode.VDisplay) return; + /* on r5xx+ vline starts at viewport_y */ + start += crtc->y; + stop += crtc->y; + BEGIN_BATCH(11); /* set the VLINE range */ EREG(EVERGREEN_VLINE_START_END, /* this is just a marker */ diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c index b5acf85a..752165b7 100644 --- a/src/r6xx_accel.c +++ b/src/r6xx_accel.c @@ -373,6 +373,10 @@ r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, drmBufPtr ib, PixmapPtr pPix, if (start > crtc->mode.VDisplay) return; + /* on r5xx+ vline starts at viewport_y */ + start += crtc->y; + stop += crtc->y; + #if defined(XF86DRM_MODE) if (info->cs) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c index 2199daf9..72819490 100644 --- a/src/radeon_commonfuncs.c +++ b/src/radeon_commonfuncs.c @@ -867,6 +867,12 @@ void FUNC_NAME(RADEONWaitForVLine)(ScrnInfoPtr pScrn, PixmapPtr pPix, if (start > crtc->mode.VDisplay) return; + if (IS_AVIVO_VARIANT) { + /* on r5xx+ vline starts at viewport_y */ + start += crtc->y; + stop += crtc->y; + } + #if defined(ACCEL_CP) && defined(XF86DRM_MODE) if (info->cs) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; |