[PATCH] drm/radeon: fix regression in dynpm due to multi-ring rework
alexdeucher at gmail.com
alexdeucher at gmail.com
Thu Jun 14 12:54:57 PDT 2012
From: Alex Deucher <alexander.deucher at amd.com>
Not all asics have all rings, so make sure the ring is ready
before attempting to check it in the dynpm work handler.
Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=43367
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/radeon/radeon_pm.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 79642cd..7ae6066 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -793,9 +793,13 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work)
int i;
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
- not_processed += radeon_fence_count_emitted(rdev, i);
- if (not_processed >= 3)
- break;
+ struct radeon_ring *ring = &rdev->ring[i];
+
+ if (ring->ready) {
+ not_processed += radeon_fence_count_emitted(rdev, i);
+ if (not_processed >= 3)
+ break;
+ }
}
if (not_processed >= 3) { /* should upclock */
--
1.7.7.5
More information about the dri-devel
mailing list