diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-11-23 00:41:00 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-11-25 19:42:05 -0500 |
commit | acb325062afc09c196f7d3888b81312e6ebcdc35 (patch) | |
tree | 5c61abac0be07055b726b4c54caaa86ef4f32f4b /drivers/gpu | |
parent | b6724405bc67ef3ae1318002085cde382b12345f (diff) |
drm/radeon/kms: improve pflip precision on r1xx-r4xx
The update pending bit has a separate enable bit.
Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_reg.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 2316f73db6c0..300b4a64d8fe 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -76,6 +76,8 @@ void r100_pre_page_flip(struct radeon_device *rdev, int crtc) | |||
76 | /* make sure flip is at vb rather than hb */ | 76 | /* make sure flip is at vb rather than hb */ |
77 | tmp = RREG32(RADEON_CRTC_OFFSET_CNTL + radeon_crtc->crtc_offset); | 77 | tmp = RREG32(RADEON_CRTC_OFFSET_CNTL + radeon_crtc->crtc_offset); |
78 | tmp &= ~RADEON_CRTC_OFFSET_FLIP_CNTL; | 78 | tmp &= ~RADEON_CRTC_OFFSET_FLIP_CNTL; |
79 | /* make sure pending bit is asserted */ | ||
80 | tmp |= RADEON_CRTC_GUI_TRIG_OFFSET_LEFT_EN; | ||
79 | WREG32(RADEON_CRTC_OFFSET_CNTL + radeon_crtc->crtc_offset, tmp); | 81 | WREG32(RADEON_CRTC_OFFSET_CNTL + radeon_crtc->crtc_offset, tmp); |
80 | 82 | ||
81 | /* set pageflip to happen as late as possible in the vblank interval. | 83 | /* set pageflip to happen as late as possible in the vblank interval. |
@@ -104,9 +106,9 @@ u32 r100_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base) | |||
104 | /* update the scanout addresses */ | 106 | /* update the scanout addresses */ |
105 | WREG32(RADEON_CRTC_OFFSET + radeon_crtc->crtc_offset, tmp); | 107 | WREG32(RADEON_CRTC_OFFSET + radeon_crtc->crtc_offset, tmp); |
106 | 108 | ||
107 | /* Note: We don't wait for update_pending to assert, as this never | 109 | /* Wait for update_pending to go high. */ |
108 | * happens for some reason on R1xx - R4xx. Adds a bit of imprecision. | 110 | while (!(RREG32(RADEON_CRTC_OFFSET + radeon_crtc->crtc_offset) & RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET)); |
109 | */ | 111 | DRM_DEBUG("Update pending now high. Unlocking vupdate_lock.\n"); |
110 | 112 | ||
111 | /* Unlock the lock, so double-buffering can take place inside vblank */ | 113 | /* Unlock the lock, so double-buffering can take place inside vblank */ |
112 | tmp &= ~RADEON_CRTC_OFFSET__OFFSET_LOCK; | 114 | tmp &= ~RADEON_CRTC_OFFSET__OFFSET_LOCK; |
diff --git a/drivers/gpu/drm/radeon/radeon_reg.h b/drivers/gpu/drm/radeon/radeon_reg.h index 26c43e234350..0a310b7f71c3 100644 --- a/drivers/gpu/drm/radeon/radeon_reg.h +++ b/drivers/gpu/drm/radeon/radeon_reg.h | |||
@@ -510,6 +510,8 @@ | |||
510 | # define RADEON_CRTC_TILE_EN (1 << 15) | 510 | # define RADEON_CRTC_TILE_EN (1 << 15) |
511 | # define RADEON_CRTC_OFFSET_FLIP_CNTL (1 << 16) | 511 | # define RADEON_CRTC_OFFSET_FLIP_CNTL (1 << 16) |
512 | # define RADEON_CRTC_STEREO_OFFSET_EN (1 << 17) | 512 | # define RADEON_CRTC_STEREO_OFFSET_EN (1 << 17) |
513 | # define RADEON_CRTC_GUI_TRIG_OFFSET_LEFT_EN (1 << 28) | ||
514 | # define RADEON_CRTC_GUI_TRIG_OFFSET_RIGHT_EN (1 << 29) | ||
513 | 515 | ||
514 | #define R300_CRTC_TILE_X0_Y0 0x0350 | 516 | #define R300_CRTC_TILE_X0_Y0 0x0350 |
515 | #define R300_CRTC2_TILE_X0_Y0 0x0358 | 517 | #define R300_CRTC2_TILE_X0_Y0 0x0358 |