drm/amdgpu: Fix compute ring 1.0.0 failure after reset
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix compute ring 1.0.0 failure after reset
Problem: After GPU reset on dGPUs with gfx8 compute ring 1.0.0 fails to pass the ring test. Ring registers inspection shows that it's active and no hang is observed (rptr == wptr) No significant diffs were observed between CP_HQD* registers for the ring in good and bad shape.
Fix: No clear reason why but reversing the order of ring tests fixes the problem.
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4 -2
@@ -4811,8 +4811,10 @@ static int gfx_v8_0_kcq_resume(struct amdgpu_device *adev)if (r) goto done; -/* Test KCQs */ -for (i =0 ; i < adev->gfx.num_compute_rings; i++) { +/* Test KCQs - reversing the order of rings seems to fix ring test failure +* after GPU reset +*/ +for (i = adev->gfx.num_compute_rings -1 ; i >=0 ; i--) { ring = &adev->gfx.compute_ring[i]; r =amdgpu_ring_test_helper (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): 1540498601-5270-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Am 25.10.18 um 22:16 schrieb Andrey Grodzovsky:
Quoted 10 lines
Problem: After GPU reset on dGPUs with gfx8 compute ring 1.0.0 fails to pass the ring test. Ring registers inspection shows that it's active and no hang is observed (rptr == wptr) No significant diffs were observed between CP_HQD* registers for the ring in good and bad shape.
Fix: No clear reason why but reversing the order of ring tests fixes the problem.
Signed-off-by Andrey Grodzovsky <[email protected]>
Mhm, maybe try adding a delay before the ring test?
Could be that the rings are started in reverse order as well and for some reason the first one is start tested to quickly after a reset.
Anyway patch is Acked-by: Christian König <[email protected]>
Thanks,
Christian.
Quoted 11 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0@@ -4811,8 +4811,10 @@ static int gfx_v8_0_kcq_resume(struct amdgpu_device *adev)if (r) goto done;
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_kcq_resume(struct amdgpu_device *adev) · line 4820
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4
-2-/* Test KCQs */ -for (i =0 ; i < adev->gfx.num_compute_rings; i++) { +/* Test KCQs - reversing the order of rings seems to fix ring test failure +* after GPU reset +*/ +for (i = adev->gfx.num_compute_rings -1 ; i >=0 ; i--) { ring = &adev->gfx.compute_ring[i]; r =amdgpu_ring_test_helper (ring); }
_______________________________________________
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): c402ce16-e8e3-78ee-3fb2-666d09b0807b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 7 lines · Christian König
Am 25.10.18 um 22:16 schrieb Andrey Grodzovsky:
Quoted 6 lines
Problem: After GPU reset on dGPUs with gfx8 compute ring 1.0.0 fails to pass the ring test. Ring registers inspection shows that it's active and no hang is observed (rptr == wptr) No significant diffs were observed between CP_HQD* registers for the ring in good and bad shape.
Quoted 6 lines
Quoted 4 lines
Fix: No clear reason why but reversing the order of ring tests fixes the problem.
Signed-off-by Andrey Grodzovsky <[email protected]>Mhm, maybe try adding a delay before the ring test?
First thing I tried, didn't help.
Quoted 3 lines
Could be that the rings are started in reverse order as well and for some reason the first one is start tested to quickly after a reset.
No, KCQ queues mapping just before the test goes in 0..max order.
Andrey
Quoted 21 lines
Anyway patch is Acked-by: Christian König <[email protected]>
Thanks,
Christian.Quoted 15 lines
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0@@ -4811,8 +4811,10 @@ static int gfx_v8_0_kcq_resume(struct amdgpu_device *adev) if (r) goto done;- /* Test KCQs */
- for (i = 0; i <adev->gfx.num_compute_rings; i++) {
Quoted 9 lines
Quoted 8 lines
+ /* Test KCQs - reversing the order of rings seems to fix ring test failure
+ * after GPU reset
+ */
+ for (i =adev->gfx.num_compute_rings- 1; i >= 0; i--) { ring = &adev->gfx.compute_ring[i];
r =amdgpu_ring_test_helper(ring);
}
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx