On 14.06.2012 21:54, alexdeucher at gmail.com wrote:
> 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>
Reviewed-by: Christian K?nig<christian.koenig 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 */

Reply via email to