diff options
author | Christian König <deathsimple@vodafone.de> | 2011-09-23 15:11:23 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-20 19:49:46 +0000 |
commit | 7b1f2485db253aaa0081e1c5213533e166130732 (patch) | |
tree | 77f7e6517d67501108feedfa029f4ea8549a9642 /drivers/gpu/drm/radeon/radeon_pm.c | |
parent | 15d3332f31afd571a6d23971dbc8d8db2856e661 (diff) |
drm/radeon: make all functions work with multiple rings.
Give all asic and radeon_ring_* functions a
radeon_cp parameter, so they know the ring to work with.
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/radeon_pm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 19ed2c6c424..73b6714d615 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -252,7 +252,8 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) mutex_lock(&rdev->ddev->struct_mutex); mutex_lock(&rdev->vram_mutex); - mutex_lock(&rdev->cp.mutex); + if (rdev->cp.ring_obj) + mutex_lock(&rdev->cp.mutex); /* gui idle int has issues on older chips it seems */ if (rdev->family >= CHIP_R600) { @@ -268,12 +269,13 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) radeon_irq_set(rdev); } } else { - if (rdev->cp.ready) { + struct radeon_cp *cp = &rdev->cp; + if (cp->ready) { struct radeon_fence *fence; - radeon_ring_alloc(rdev, 64); + radeon_ring_alloc(rdev, cp, 64); radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX); radeon_fence_emit(rdev, fence); - radeon_ring_commit(rdev); + radeon_ring_commit(rdev, cp); radeon_fence_wait(fence, false); radeon_fence_unref(&fence); } @@ -307,7 +309,8 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) rdev->pm.dynpm_planned_action = DYNPM_ACTION_NONE; - mutex_unlock(&rdev->cp.mutex); + if (rdev->cp.ring_obj) + mutex_unlock(&rdev->cp.mutex); mutex_unlock(&rdev->vram_mutex); mutex_unlock(&rdev->ddev->struct_mutex); } |