[PATCH] drm/amdgpu: correct wptr initialization for sdma

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

 



Am 12.05.2017 um 10:21 schrieb Yintian Tao:
> If doorbell is used for wptr update, we also need to use it
> to initialize wptr to 0.
>
> Change-Id: Ieb31a6726a9ac8d45e51f0370ef5f77dc5ec7c06
> Signed-off-by: Yintian Tao <yttao at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> index cfd968e..a154faf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> @@ -643,8 +643,9 @@ static int sdma_v3_0_gfx_resume(struct amdgpu_device *adev)
>   		WREG32(mmSDMA0_GFX_RB_CNTL + sdma_offsets[i], rb_cntl);
>   
>   		/* Initialize the ring buffer's read and write pointers */
> +		ring->wptr = 0;

A bit below this code on line 662 ring->wptr is set to zero as well and 
mmSDMA0_GFX_RB_WPTR written once more.

Please also fix this as well.

Regards,
Christian.

>   		WREG32(mmSDMA0_GFX_RB_RPTR + sdma_offsets[i], 0);
> -		WREG32(mmSDMA0_GFX_RB_WPTR + sdma_offsets[i], 0);
> +		sdma_v3_0_ring_set_wptr(ring);
>   		WREG32(mmSDMA0_GFX_IB_RPTR + sdma_offsets[i], 0);
>   		WREG32(mmSDMA0_GFX_IB_OFFSET + sdma_offsets[i], 0);
>   




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

  Powered by Linux