drm/radeon: make cp variable an array
Replace cp, cp1 and cp2 members with just an array of radeon_cp structs. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
5596a9db15
commit
bf85279958
@@ -252,8 +252,10 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
|
||||
|
||||
mutex_lock(&rdev->ddev->struct_mutex);
|
||||
mutex_lock(&rdev->vram_mutex);
|
||||
if (rdev->cp.ring_obj)
|
||||
mutex_lock(&rdev->cp.mutex);
|
||||
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
|
||||
if (rdev->cp[i].ring_obj)
|
||||
mutex_lock(&rdev->cp[i].mutex);
|
||||
}
|
||||
|
||||
/* gui idle int has issues on older chips it seems */
|
||||
if (rdev->family >= CHIP_R600) {
|
||||
@@ -269,11 +271,11 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
|
||||
radeon_irq_set(rdev);
|
||||
}
|
||||
} else {
|
||||
struct radeon_cp *cp = &rdev->cp;
|
||||
struct radeon_cp *cp = &rdev->cp[RADEON_RING_TYPE_GFX_INDEX];
|
||||
if (cp->ready) {
|
||||
struct radeon_fence *fence;
|
||||
radeon_ring_alloc(rdev, cp, 64);
|
||||
radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
|
||||
radeon_fence_create(rdev, &fence, radeon_ring_index(rdev, cp));
|
||||
radeon_fence_emit(rdev, fence);
|
||||
radeon_ring_commit(rdev, cp);
|
||||
radeon_fence_wait(fence, false);
|
||||
@@ -309,8 +311,10 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
|
||||
|
||||
rdev->pm.dynpm_planned_action = DYNPM_ACTION_NONE;
|
||||
|
||||
if (rdev->cp.ring_obj)
|
||||
mutex_unlock(&rdev->cp.mutex);
|
||||
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
|
||||
if (rdev->cp[i].ring_obj)
|
||||
mutex_unlock(&rdev->cp[i].mutex);
|
||||
}
|
||||
mutex_unlock(&rdev->vram_mutex);
|
||||
mutex_unlock(&rdev->ddev->struct_mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user