summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/r300.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-05-02 15:11:23 +0200
committerDave Airlie <airlied@redhat.com>2012-05-03 09:16:38 +0100
commit7b9ef16bd187b7e7f43887afb393d1f89e5bee71 (patch)
treef36f2bcd3207f49361ffdf10ed7a630580da788d /drivers/gpu/drm/radeon/r300.c
parent67e3c7876878264a81afe0dceb8ac653af8387be (diff)
downloadlinux-stable-7b9ef16bd187b7e7f43887afb393d1f89e5bee71.tar.gz
linux-stable-7b9ef16bd187b7e7f43887afb393d1f89e5bee71.tar.bz2
linux-stable-7b9ef16bd187b7e7f43887afb393d1f89e5bee71.zip
drm/radeon: make forcing ring activity a common function
Nothing chipset or ring specific with it, so also move it to radon_ring. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r--drivers/gpu/drm/radeon/r300.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index e207664bbdc7..04ec26916db4 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -380,7 +380,6 @@ void r300_gpu_init(struct radeon_device *rdev)
bool r300_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
{
u32 rbbm_status;
- int r;
rbbm_status = RREG32(R_000E40_RBBM_STATUS);
if (!G_000E40_GUI_ACTIVE(rbbm_status)) {
@@ -388,14 +387,7 @@ bool r300_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring)
return false;
}
/* force CP activities */
- r = radeon_ring_lock(rdev, ring, 2);
- if (!r) {
- /* PACKET2 NOP */
- radeon_ring_write(ring, 0x80000000);
- radeon_ring_write(ring, 0x80000000);
- radeon_ring_unlock_commit(rdev, ring);
- }
- ring->rptr = RREG32(RADEON_CP_RB_RPTR);
+ radeon_ring_force_activity(rdev, ring);
return radeon_ring_test_lockup(rdev, ring);
}