[PATCH 10/13] drm/amdgpu:fix ring_write_multiple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Friday, March 24, 2017 6:38 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 10/13] drm/amdgpu:fix ring_write_multiple
> 
> ring_write_multiple should use buf_mask instead of ptr_mask
> 
> Change-Id: Ia249b6a1a990a6c3cba5c4048de6d604bb91d0ef
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 2861aee..284af3a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1804,9 +1804,9 @@ static inline void
> amdgpu_ring_write_multiple(struct amdgpu_ring *ring, void *sr
>  	if (ring->count_dw < count_dw) {
>  		DRM_ERROR("amdgpu: writing more dwords to the ring than
> expected!\n");
>  	} else {
> -		occupied = ring->wptr & ring->ptr_mask;
> +		occupied = ring->wptr & ring->buf_mask;
>  		dst = (void *)&ring->ring[occupied];
> -		chunk1 = ring->ptr_mask + 1 - occupied;
> +		chunk1 = ring->buf_mask + 1 - occupied;
>  		chunk1 = (chunk1 >= count_dw) ? count_dw: chunk1;
>  		chunk2 = count_dw - chunk1;
>  		chunk1 <<= 2;
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux