[PATCH 02/12] drm/amdgpu: fix amdgpu_ring_write_multiple

Alex Deucher alexdeucher at gmail.com
Fri Jun 30 16:16:04 UTC 2017


On Fri, Jun 30, 2017 at 7:22 AM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Overwriting still used ring content has a low probability to cause
> problems, not writing at all has 100% probability to cause problems.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> index 04cbc3a..322d2529 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -227,10 +227,8 @@ static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring,
>         unsigned occupied, chunk1, chunk2;
>         void *dst;
>
> -       if (unlikely(ring->count_dw < count_dw)) {
> +       if (unlikely(ring->count_dw < count_dw))
>                 DRM_ERROR("amdgpu: writing more dwords to the ring than expected!\n");
> -               return;
> -       }
>
>         occupied = ring->wptr & ring->buf_mask;
>         dst = (void *)&ring->ring[occupied];
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list