[PATCH] drm/radeon: fix regression in dynpm due to multi-ring rework

Jerome Glisse j.glisse at gmail.com
Thu Jun 14 12:58:27 PDT 2012


On Thu, Jun 14, 2012 at 3:54 PM,  <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: Jerome Glisse <jglisse at redhat.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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list