All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: fix regression in dynpm due to multi-ring rework
@ 2012-06-14 19:54 alexdeucher
  2012-06-14 19:58 ` Jerome Glisse
  2012-06-14 20:17 ` Christian König
  0 siblings, 2 replies; 5+ messages in thread
From: alexdeucher @ 2012-06-14 19:54 UTC (permalink / raw)
  To: airlied, dri-devel; +Cc: Alex Deucher

From: Alex Deucher <alexander.deucher@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@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-14 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 19:54 [PATCH] drm/radeon: fix regression in dynpm due to multi-ring rework alexdeucher
2012-06-14 19:58 ` Jerome Glisse
2012-06-14 20:17 ` Christian König
2012-06-14 20:35   ` Stripping of spaces in messages (was: [PATCH] drm/radeon: fix regression in dynpm due to multi-ring rework) Paul Menzel
2012-06-14 20:51     ` Stripping of spaces in messages Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.