drm/radeon: split page flip and pending callback
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
75f36d8619
commit
157fa14dc4
@@ -1313,7 +1313,7 @@ void dce4_wait_for_vblank(struct radeon_device *rdev, int crtc)
|
||||
* double buffered update to take place.
|
||||
* Returns the current update pending status.
|
||||
*/
|
||||
u32 evergreen_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)
|
||||
void evergreen_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)
|
||||
{
|
||||
struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc_id];
|
||||
u32 tmp = RREG32(EVERGREEN_GRPH_UPDATE + radeon_crtc->crtc_offset);
|
||||
@@ -1345,9 +1345,23 @@ u32 evergreen_page_flip(struct radeon_device *rdev, int crtc_id, u64 crtc_base)
|
||||
/* Unlock the lock, so double-buffering can take place inside vblank */
|
||||
tmp &= ~EVERGREEN_GRPH_UPDATE_LOCK;
|
||||
WREG32(EVERGREEN_GRPH_UPDATE + radeon_crtc->crtc_offset, tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* evergreen_page_flip_pending - check if page flip is still pending
|
||||
*
|
||||
* @rdev: radeon_device pointer
|
||||
* @crtc_id: crtc to check
|
||||
*
|
||||
* Returns the current update pending status.
|
||||
*/
|
||||
bool evergreen_page_flip_pending(struct radeon_device *rdev, int crtc_id)
|
||||
{
|
||||
struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc_id];
|
||||
|
||||
/* Return current update_pending status: */
|
||||
return RREG32(EVERGREEN_GRPH_UPDATE + radeon_crtc->crtc_offset) & EVERGREEN_GRPH_SURFACE_UPDATE_PENDING;
|
||||
return !!(RREG32(EVERGREEN_GRPH_UPDATE + radeon_crtc->crtc_offset) &
|
||||
EVERGREEN_GRPH_SURFACE_UPDATE_PENDING);
|
||||
}
|
||||
|
||||
/* get temperature in millidegrees */
|
||||
|
||||
Reference in New Issue
Block a user