Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"
Subsystems (2)
PATCH 1/1 Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"
This reverts commit 75737cb4eb78c7f185e4700b4aa20cf7a3381aca.
Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted. So seems like whatever problem that change was addressing is not present anymore.
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3 -7
@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)/* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx])memcpy (mqd, adev->gfx.mec.mqd_backup[mqd_idx],sizeof (struct vi_mqd_allocation )); +/* reset ring buffer */ + ring->wptr =0 ; +amdgpu_ring_clear_ring (ring); }else {amdgpu_ring_clear_ring (ring); }
@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)/* Test KCQs */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i]; -if (adev->in_gpu_reset) { -/* move reset ring buffer to here to workaround -* compute ring test failed -*/ - ring->wptr =0 ; -amdgpu_ring_clear_ring (ring); - } ring->ready = true; r =amdgpu_ring_test_ring (ring);if (r)
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): 1516921601-15815-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Did you test reset case in sriov?
Quoted 58 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Andrey Grodzovsky
Sent: Friday, January 26, 2018 7:07 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Grodzovsky, Andrey <[email protected]>; Yu, Xiangliang <[email protected]>; Koenig, Christian <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"This reverts commit
75737cb4eb78c7f185e4700b4aa20cf7a3381aca.Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted. So seems like whatever problem that change was addressing is not present anymore.Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3
-0@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)/* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx])memcpy (mqd, adev- >gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation)); +/* reset ring buffer */ + ring->wptr =0 ; +amdgpu_ring_clear_ring (ring); }else {drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-7amdgpu_ring_clear_ring (ring); }@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)/* Test KCQs */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i]; -if (adev->in_gpu_reset) { -/* move reset ring buffer to here to workaround -* compute ring test failed -*/ - ring->wptr =0 ; -amdgpu_ring_clear_ring (ring); - } ring->ready = true; r =amdgpu_ring_test_ring (ring);if (r)
--
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
A message that is not in the archive (sent off-list or not yet received): BN3PR1201MB09307139AD6C494B5F502DC3EBE00-2IT6yTwQdphHRjfJ0jqoHGrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
No, just bare metal, I assumed your problem was with compute ring test failure which I didn't see. Can you please recheck if reverting this still failing on SRIOV ? If so we obviously need to keep looking how to fix it.
Thanks,
Andrey
________________________________________
From: Yu, Xiangliang
Sent: 25 January 2018 20:59:45
To: Grodzovsky, Andrey; [email protected]
Cc: Deucher, Alexander; Grodzovsky, Andrey; Koenig, Christian
Subject: RE: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"
Did you test reset case in sriov?
Quoted 55 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Andrey Grodzovsky
Sent: Friday, January 26, 2018 7:07 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Grodzovsky, Andrey <[email protected]>; Yu, Xiangliang <[email protected]>; Koenig, Christian <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"This reverts commit
75737cb4eb78c7f185e4700b4aa20cf7a3381aca.Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted. So seems like whatever problem that change was addressing is not present anymore.Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3
-0@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)/* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx])memcpy (mqd, adev- >gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation)); +/* reset ring buffer */ + ring->wptr =0 ; +amdgpu_ring_clear_ring (ring); }else {amdgpu_ring_clear_ring(ring); }drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-7@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)/* Test KCQs */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i]; -if (adev->in_gpu_reset) { -/* move reset ring buffer to here to workaround -* compute ring test failed -*/ - ring->wptr =0 ; -amdgpu_ring_clear_ring (ring); - } ring->ready = true; r =amdgpu_ring_test_ring (ring);if (r)
Quoted 7 lines
--
2.7.4_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): BN6PR1201MB0115889698061BCBB4545A79EAE00-6iU6OBHu2P+5DJ1TLF5OxWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
You can add amdgpu_sriov_vf() check to avoid breaking sriov.
Quoted 88 lines
-----Original Message-----
From: Grodzovsky, Andrey
Sent: Friday, January 26, 2018 11:29 AM
To: Yu, Xiangliang <[email protected]>; amd- [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Subject: Re: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"No, just bare metal, I assumed your problem was with compute ring test failure which I didn't see. Can you please recheck if reverting this still failing on SRIOV ?
If so we obviously need to keep looking how to fix it.Thanks,
Andrey________________________________________
From: Yu, Xiangliang
Sent: 25 January 2018 20:59:45
To: Grodzovsky, Andrey; [email protected]
Cc: Deucher, Alexander; Grodzovsky, Andrey; Koenig, Christian
Subject: RE: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"Did you test reset case in sriov?
Quoted 6 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Andrey Grodzovsky
Sent: Friday, January 26, 2018 7:07 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Grodzovsky,Andrey
Quoted 1 line
<[email protected]>; Yu, Xiangliang
Quoted 51 lines
Koenig, Christian <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"This reverts commit
75737cb4eb78c7f185e4700b4aa20cf7a3381aca.Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted. So seems like whatever problem that change was addressing is not present anymore.Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3
-0@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)/* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx])memcpy (mqd, adev- >gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation)); +/* reset ring buffer */ + ring->wptr =0 ; +amdgpu_ring_clear_ring (ring); }else {amdgpu_ring_clear_ring(ring); }drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-7@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)/* Test KCQs */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i]; -if (adev->in_gpu_reset) { -/* move reset ring buffer to here to workaround -* compute ring test failed -*/ - ring->wptr =0 ; -amdgpu_ring_clear_ring (ring); - } ring->ready = true; r =amdgpu_ring_test_ring (ring);if (r)--
2.7.4
Quoted 4 lines
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
A message that is not in the archive (sent off-list or not yet received): BY2PR1201MB09351A0D0D0D09849008B3B9EBE00-O28G1zQ8oGkaqtME6NEo1mrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]
Quoted 1 line · Xiangliang
You can add
amdgpu_sriov_vf()check to avoid breaking sriov.
+ Haisheng
As found out after more debugging and discussion with Haisheng from HW team, the sequence introduced by this change is is wrong, it causes compute rings test failure because "the ring buffer has to be filled with valid packets (such as NOPs) first before submitting MAP_QUEUEs packet into KIQ. Once a compute engine is mapped, it will immediately execute the ring buffer if the RTPR is not equal to the WTPR from the MQD. It could lead to engine hang if the ring buffer filled with random data."
Hence we would like to revert this change in amd-staging-drm-next and continue investigation on the SR-IOV side why the correct programming sequence doesn't work there. I myself currently working on setting up SR-IOV setup to take a look at that.
Thanks,
Andrey
Quoted 89 lines
Quoted 89 lines
-----Original Message-----
From: Grodzovsky, Andrey
Sent: Friday, January 26, 2018 11:29 AM
To: Yu, Xiangliang <[email protected]>; amd- [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Subject: Re: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"No, just bare metal, I assumed your problem was with compute ring test failure which I didn't see. Can you please recheck if reverting this still failing on SRIOV ?
If so we obviously need to keep looking how to fix it.Thanks,
Andrey________________________________________
From: Yu, Xiangliang
Sent: 25 January 2018 20:59:45
To: Grodzovsky, Andrey; [email protected]
Cc: Deucher, Alexander; Grodzovsky, Andrey; Koenig, Christian
Subject: RE: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"Did you test reset case in sriov?
Quoted 6 lines
-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Andrey Grodzovsky
Sent: Friday, January 26, 2018 7:07 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Grodzovsky,Andrey
Quoted 1 line
<[email protected]>; Yu, Xiangliang
Quoted 51 lines
Koenig, Christian <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"This reverts commit
75737cb4eb78c7f185e4700b4aa20cf7a3381aca.Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted. So seems like whatever problem that change was addressing is not present anymore.Signed-off-by Andrey Grodzovsky <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3
-0@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)/* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx])memcpy (mqd, adev- > gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation)); +/* reset ring buffer */ + ring->wptr =0 ; +amdgpu_ring_clear_ring (ring); }else {amdgpu_ring_clear_ring(ring); }drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-7@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)/* Test KCQs */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i]; -if (adev->in_gpu_reset) { -/* move reset ring buffer to here to workaround -* compute ring test failed -*/ - ring->wptr =0 ; -amdgpu_ring_clear_ring (ring); - } ring->ready = true; r =amdgpu_ring_test_ring (ring);if (r)--
2.7.4
Quoted 4 lines
Quoted 4 lines
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
A message that is not in the archive (sent off-list or not yet received): bb6b8b74-4587-8e56-9617-b03fe572eec7-5C7GfCeVMHo@public.gmane.org
Ok, thanks!
From: Grodzovsky, Andrey
Sent: Thursday, February 01, 2018 12:59 AM
To: Yu, Xiangliang <[email protected]>; [email protected]; Deng, Emily <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Wu, Haisheng <[email protected]>
Subject: Re: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure after resetting"
On 01/25/2018 11:33 PM, Yu, Xiangliang wrote:
You can add amdgpu_sriov_vf() check to avoid breaking sriov.
+ Haisheng
As found out after more debugging and discussion with Haisheng from HW team, the sequence introduced by this change is is wrong, it causes compute rings test failure because "the ring buffer has to be filled with valid packets (such as NOPs) first before submitting MAP_QUEUEs packet into KIQ. Once a compute engine is mapped, it will immediately execute the ring buffer if the RTPR is not equal to the WTPR from the MQD. It could lead to engine hang if the ring buffer filled with random data."
Hence we would like to revert this change in amd-staging-drm-next and continue investigation on the SR-IOV side why the correct programming sequence doesn't work there. I myself currently working on setting up SR-IOV setup to take a look at that.
Thanks,
Andrey
-----Original Message-----
From: Grodzovsky, Andrey
Sent: Friday, January 26, 2018 11:29 AM
To: Yu, Xiangliang <[email protected]><mailto:[email protected]>; amd-
[email protected]<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Subject: Re: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure
after resetting"
No, just bare metal, I assumed your problem was with compute ring test
failure which I didn't see. Can you please recheck if reverting this still failing
on SRIOV ?
If so we obviously need to keep looking how to fix it.
Thanks,
Andrey
________________________________________
From: Yu, Xiangliang
Sent: 25 January 2018 20:59:45
To: Grodzovsky, Andrey; [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure
after resetting"
Did you test reset case in sriov?
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf
Of Andrey Grodzovsky
Sent: Friday, January 26, 2018 7:07 AM
To: [email protected]<mailto:[email protected]>
Andrey
<[email protected]><mailto:[email protected]>; Yu, Xiangliang
<[email protected]><mailto:[email protected]>;
Koenig, Christian <[email protected]><mailto:[email protected]>
Subject: [PATCH] Revert "drm/amdgpu/gfx8: Fix compute ring failure
after resetting"
This reverts commit 75737cb4eb78c7f185e4700b4aa20cf7a3381aca.
Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted.
So seems like whatever problem that change was addressing is not
present anymore.
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
(quoted diff) +0 -0
b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 1207f36..8a65b53 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct
amdgpu_ring *ring)
/* reset MQD to a clean status */
if (adev->gfx.mec.mqd_backup[mqd_idx])
memcpy(mqd, adev-gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
+ /* reset ring buffer */
+ ring->wptr = 0;
+ amdgpu_ring_clear_ring(ring);
} else {
amdgpu_ring_clear_ring(ring);
}@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct
amdgpu_device *adev)
/* Test KCQs */
for (i = 0; i < adev->gfx.num_compute_rings; i++) {
ring = &adev->gfx.compute_ring[i];- if (adev->in_gpu_reset) {
- /* move reset ring buffer to here to workaround
- * compute ring test failed
- */
- ring->wptr = 0;
- amdgpu_ring_clear_ring(ring);
- }
ring->ready = true;
r = amdgpu_ring_test_ring(ring);
if (r)--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Reviewed-byAm 26.01.2018 um 00:06 schrieb Andrey Grodzovsky:
Quoted 8 lines
This reverts commit
75737cb4eb78c7f185e4700b4aa20cf7a3381aca.Fixes GFX ring test failure after HW reset.
No compute ring test failures were observed with the change reverted. So seems like whatever problem that change was addressing is not present anymore.Signed-off-by Andrey Grodzovsky <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3
-0@@ -4847,6 +4847,9 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)/* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx])memcpy (mqd, adev->gfx.mec.mqd_backup[mqd_idx],sizeof (struct vi_mqd_allocation )); +/* reset ring buffer */ + ring->wptr =0 ; +amdgpu_ring_clear_ring (ring); }else {amdgpu_ring_clear_ring (ring); }@@ -4921,13 +4924,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)/* Test KCQs */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i];
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev) · line 4929
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-7-if (adev->in_gpu_reset) { -/* move reset ring buffer to here to workaround -* compute ring test failed -*/ - ring->wptr =0 ; -amdgpu_ring_clear_ring (ring); - } ring->ready = true; r =amdgpu_ring_test_ring (ring);if (r)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx