[PATCH] drm/radeon: fix irq ring buffer overflow handling

Alex Deucher alexdeucher at gmail.com
Wed Jul 23 08:36:51 PDT 2014


On Wed, Jul 23, 2014 at 3:47 AM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> We must mask out the overflow bit as well, otherwise
> the wptr will never match the rptr again and the interrupt
> handler will loop forever.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Cc: stable at vger.kernel.org

Applied to my 3.16 tree.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c       | 1 +
>  drivers/gpu/drm/radeon/evergreen.c | 1 +
>  drivers/gpu/drm/radeon/r600.c      | 1 +
>  drivers/gpu/drm/radeon/si.c        | 1 +
>  4 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index 0b24711..cc1f02f 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -7376,6 +7376,7 @@ static inline u32 cik_get_ih_wptr(struct radeon_device *rdev)
>                 tmp = RREG32(IH_RB_CNTL);
>                 tmp |= IH_WPTR_OVERFLOW_CLEAR;
>                 WREG32(IH_RB_CNTL, tmp);
> +               wptr &= ~RB_OVERFLOW;
>         }
>         return (wptr & rdev->ih.ptr_mask);
>  }
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index 250bac3..15e4f28 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -4756,6 +4756,7 @@ static u32 evergreen_get_ih_wptr(struct radeon_device *rdev)
>                 tmp = RREG32(IH_RB_CNTL);
>                 tmp |= IH_WPTR_OVERFLOW_CLEAR;
>                 WREG32(IH_RB_CNTL, tmp);
> +               wptr &= ~RB_OVERFLOW;
>         }
>         return (wptr & rdev->ih.ptr_mask);
>  }
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index c66952d..3c69f58 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -3795,6 +3795,7 @@ static u32 r600_get_ih_wptr(struct radeon_device *rdev)
>                 tmp = RREG32(IH_RB_CNTL);
>                 tmp |= IH_WPTR_OVERFLOW_CLEAR;
>                 WREG32(IH_RB_CNTL, tmp);
> +               wptr &= ~RB_OVERFLOW;
>         }
>         return (wptr & rdev->ih.ptr_mask);
>  }
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index eba0225..9e854fd 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -6103,6 +6103,7 @@ static inline u32 si_get_ih_wptr(struct radeon_device *rdev)
>                 tmp = RREG32(IH_RB_CNTL);
>                 tmp |= IH_WPTR_OVERFLOW_CLEAR;
>                 WREG32(IH_RB_CNTL, tmp);
> +               wptr &= ~RB_OVERFLOW;
>         }
>         return (wptr & rdev->ih.ptr_mask);
>  }
> --
> 1.9.1
>


More information about the dri-devel mailing list