drm/amdgpu: correct wptr initialization for sdma
Subsystems (2)
PATCH 1/1 drm/amdgpu: correct wptr initialization for sdma
If doorbell is used for wptr update, we also need to use it to initialize wptr to 0.
--- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +2 -1
@@ -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 ;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 );
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1494577314-25796-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org
Am 12.05.2017 um 10:21 schrieb Yintian Tao:
Quoted 14 lines
If doorbell is used for wptr update, we also need to use it to initialize wptr to 0.
Change-Id Ieb31a6726a9ac8d45e51f0370ef5f77dc5ec7c06Signed-off-by Yintian Tao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c static int sdma_v3_0_gfx_resume(struct amdgpu_device *adev) · line 646
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1
-0@@ -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.
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c static int sdma_v3_0_gfx_resume(struct amdgpu_device *adev) · line 651
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1
-1WREG32 (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 );
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx