[PATCH] drm/amdgpu/gfx9: reset compute ring wptr when gpu reset
Yintian Tao
yttao at amd.com
Tue Jun 4 15:44:39 UTC 2019
We need reset compute ring wptr to zero when gpu reset
in order to prevent CP hang.
Signed-off-by: Yintian Tao <yttao at amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 2e9cac1..25211ba 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -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
More information about the amd-gfx
mailing list