Skip to contentSkip to conversation

drm/amdgpu/gfx9: reset compute ring wptr when gpu reset

PATCH In review Yintian Tao 2 participants 2 messages Jun 4, 2019 – Jun 11, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx9: reset compute ring wptr when gpu reset

We need reset compute ring wptr to zero when gpu reset in order to prevent CP hang.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
index 2e9cac1..25211ba 100644
@@ -3175,6 +3175,7 @@ static int gfx_v9_0_kcq_init_queue(struct amdgpu_ring *ring)
 
 		/* reset ring buffer */
 		ring->wptr = 0;
+		amdgpu_ring_set_wptr(ring);
 		amdgpu_ring_clear_ring(ring);
 	} else {
 		amdgpu_ring_clear_ring(ring);
Signature · 6 lines
2.7.4

_______________________________________________
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): 1559663079-2448-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org

Acked-by
#2 lore raw
Quoted 5 lines · Yintian Tao

We need reset compute ring wptr to zero when gpu reset in order to prevent CP hang.

Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
index 2e9cac1..25211ba 100644
@@ -3175,6 +3175,7 @@ static int gfx_v9_0_kcq_init_queue(struct amdgpu_ring *ring)
 
                /* reset ring buffer */
                ring->wptr = 0;
+               amdgpu_ring_set_wptr(ring);
                amdgpu_ring_clear_ring(ring);
        } else {
                amdgpu_ring_clear_ring(ring);
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx