* [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode
@ 2018-04-25 3:26 Emily Deng
[not found] ` <1524626770-30269-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Emily Deng @ 2018-04-25 3:26 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
When put the IB test out of exclusive mode, and do sriov reset,
the IB test will randomly fail. As out of exclusive mode it uses
kiq to do read and write registers, but as it has world switch,
the kiq read and write time will be random, sometimes it will
beyond the MAX_KIQ_REG_WAIT and then the read or write register
will fail, which will result the IB test fail. So move the
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 211f1af..dc921d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3156,20 +3156,19 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
/* now we are okay to resume SMC/CP/SDMA */
r = amdgpu_device_ip_reinit_late_sriov(adev);
- amdgpu_virt_release_full_gpu(adev, true);
if (r)
goto error;
amdgpu_irq_gpu_reset_resume_helper(adev);
r = amdgpu_ib_ring_tests(adev);
+error:
+ amdgpu_virt_release_full_gpu(adev, true);
if (!r && adev->virt.gim_feature & AMDGIM_FEATURE_GIM_FLR_VRAMLOST) {
atomic_inc(&adev->vram_lost_counter);
r = amdgpu_device_handle_vram_lost(adev);
}
-error:
-
return r;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1524626770-30269-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode [not found] ` <1524626770-30269-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org> @ 2018-04-26 2:06 ` Deng, Emily [not found] ` <CY4PR12MB112591A8C93613C0B367B2A28F8E0-rpdhrqHFk07v2MZdTKcfDgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Deng, Emily @ 2018-04-26 2:06 UTC (permalink / raw) To: Deng, Emily, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Ping... > -----Original Message----- > From: Emily Deng [mailto:Emily.Deng@amd.com] > Sent: Wednesday, April 25, 2018 11:26 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deng, Emily <Emily.Deng@amd.com> > Subject: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive > mode > > When put the IB test out of exclusive mode, and do sriov reset, the IB test > will randomly fail. As out of exclusive mode it uses kiq to do read and write > registers, but as it has world switch, the kiq read and write time will be > random, sometimes it will beyond the MAX_KIQ_REG_WAIT and then the > read or write register will fail, which will result the IB test fail. So move the > > Signed-off-by: Emily Deng <Emily.Deng@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 211f1af..dc921d6 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -3156,20 +3156,19 @@ static int amdgpu_device_reset_sriov(struct > amdgpu_device *adev, > > /* now we are okay to resume SMC/CP/SDMA */ > r = amdgpu_device_ip_reinit_late_sriov(adev); > - amdgpu_virt_release_full_gpu(adev, true); > if (r) > goto error; > > amdgpu_irq_gpu_reset_resume_helper(adev); > r = amdgpu_ib_ring_tests(adev); > > +error: > + amdgpu_virt_release_full_gpu(adev, true); > if (!r && adev->virt.gim_feature & > AMDGIM_FEATURE_GIM_FLR_VRAMLOST) { > atomic_inc(&adev->vram_lost_counter); > r = amdgpu_device_handle_vram_lost(adev); > } > > -error: > - > return r; > } > > -- > 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CY4PR12MB112591A8C93613C0B367B2A28F8E0-rpdhrqHFk07v2MZdTKcfDgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode [not found] ` <CY4PR12MB112591A8C93613C0B367B2A28F8E0-rpdhrqHFk07v2MZdTKcfDgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> @ 2018-05-03 11:53 ` Christian König 0 siblings, 0 replies; 6+ messages in thread From: Christian König @ 2018-05-03 11:53 UTC (permalink / raw) To: Deng, Emily, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org At least of hand sounds like it makes sense. But one comment below. Am 26.04.2018 um 04:06 schrieb Deng, Emily: > Ping... > >> -----Original Message----- >> From: Emily Deng [mailto:Emily.Deng@amd.com] >> Sent: Wednesday, April 25, 2018 11:26 AM >> To: amd-gfx@lists.freedesktop.org >> Cc: Deng, Emily <Emily.Deng@amd.com> >> Subject: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive >> mode >> >> When put the IB test out of exclusive mode, and do sriov reset, the IB test >> will randomly fail. As out of exclusive mode it uses kiq to do read and write >> registers, but as it has world switch, the kiq read and write time will be >> random, sometimes it will beyond the MAX_KIQ_REG_WAIT and then the >> read or write register will fail, which will result the IB test fail. So move the Looks like your commit message was cut of. With that fixed the patch is Reviewed-by: Christian König <christian.koenig@amd.com>. Regards, Christian. >> >> Signed-off-by: Emily Deng <Emily.Deng@amd.com> >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> index 211f1af..dc921d6 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> @@ -3156,20 +3156,19 @@ static int amdgpu_device_reset_sriov(struct >> amdgpu_device *adev, >> >> /* now we are okay to resume SMC/CP/SDMA */ >> r = amdgpu_device_ip_reinit_late_sriov(adev); >> - amdgpu_virt_release_full_gpu(adev, true); >> if (r) >> goto error; >> >> amdgpu_irq_gpu_reset_resume_helper(adev); >> r = amdgpu_ib_ring_tests(adev); >> >> +error: >> + amdgpu_virt_release_full_gpu(adev, true); >> if (!r && adev->virt.gim_feature & >> AMDGIM_FEATURE_GIM_FLR_VRAMLOST) { >> atomic_inc(&adev->vram_lost_counter); >> r = amdgpu_device_handle_vram_lost(adev); >> } >> >> -error: >> - >> return r; >> } >> >> -- >> 2.7.4 > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode
@ 2018-04-26 4:06 Emily Deng
[not found] ` <1524715601-2955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Emily Deng @ 2018-04-26 4:06 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
When put the IB test out of exclusive mode, and do sriov reset,
the IB test will randomly fail. As out of exclusive mode it uses
kiq to do read and write registers, but as it has world switch,
the kiq read and write time will be random, sometimes it will
beyond the MAX_KIQ_REG_WAIT and then the read or write register
will fail, which will result the IB test fail.
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index f509d32..692d172 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3140,20 +3140,19 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
/* now we are okay to resume SMC/CP/SDMA */
r = amdgpu_device_ip_reinit_late_sriov(adev);
- amdgpu_virt_release_full_gpu(adev, true);
if (r)
goto error;
amdgpu_irq_gpu_reset_resume_helper(adev);
r = amdgpu_ib_ring_tests(adev);
+error:
+ amdgpu_virt_release_full_gpu(adev, true);
if (!r && adev->virt.gim_feature & AMDGIM_FEATURE_GIM_FLR_VRAMLOST) {
atomic_inc(&adev->vram_lost_counter);
r = amdgpu_device_handle_vram_lost(adev);
}
-error:
-
return r;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1524715601-2955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode [not found] ` <1524715601-2955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org> @ 2018-04-26 6:00 ` Deng, Emily 2018-04-26 7:39 ` Liu, Monk 1 sibling, 0 replies; 6+ messages in thread From: Deng, Emily @ 2018-04-26 6:00 UTC (permalink / raw) To: Liu, Monk, Yu, Xiangliang, Ding, Pixel Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Hi all, Please help review this. Best Wishes, Emily Deng > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of > Emily Deng > Sent: Thursday, April 26, 2018 12:07 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deng, Emily <Emily.Deng@amd.com> > Subject: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive > mode > > When put the IB test out of exclusive mode, and do sriov reset, the IB test > will randomly fail. As out of exclusive mode it uses kiq to do read and write > registers, but as it has world switch, the kiq read and write time will be > random, sometimes it will beyond the MAX_KIQ_REG_WAIT and then the > read or write register will fail, which will result the IB test fail. > > Signed-off-by: Emily Deng <Emily.Deng@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index f509d32..692d172 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -3140,20 +3140,19 @@ static int amdgpu_device_reset_sriov(struct > amdgpu_device *adev, > > /* now we are okay to resume SMC/CP/SDMA */ > r = amdgpu_device_ip_reinit_late_sriov(adev); > - amdgpu_virt_release_full_gpu(adev, true); > if (r) > goto error; > > amdgpu_irq_gpu_reset_resume_helper(adev); > r = amdgpu_ib_ring_tests(adev); > > +error: > + amdgpu_virt_release_full_gpu(adev, true); > if (!r && adev->virt.gim_feature & > AMDGIM_FEATURE_GIM_FLR_VRAMLOST) { > atomic_inc(&adev->vram_lost_counter); > r = amdgpu_device_handle_vram_lost(adev); > } > > -error: > - > return r; > } > > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode [not found] ` <1524715601-2955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org> 2018-04-26 6:00 ` Deng, Emily @ 2018-04-26 7:39 ` Liu, Monk 1 sibling, 0 replies; 6+ messages in thread From: Liu, Monk @ 2018-04-26 7:39 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: Deng, Emily Reviewed-by: Monk Liu -----Original Message----- From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Emily Deng Sent: 2018年4月26日 12:07 To: amd-gfx@lists.freedesktop.org Cc: Deng, Emily <Emily.Deng@amd.com> Subject: [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode When put the IB test out of exclusive mode, and do sriov reset, the IB test will randomly fail. As out of exclusive mode it uses kiq to do read and write registers, but as it has world switch, the kiq read and write time will be random, sometimes it will beyond the MAX_KIQ_REG_WAIT and then the read or write register will fail, which will result the IB test fail. Signed-off-by: Emily Deng <Emily.Deng@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index f509d32..692d172 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3140,20 +3140,19 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev, /* now we are okay to resume SMC/CP/SDMA */ r = amdgpu_device_ip_reinit_late_sriov(adev); - amdgpu_virt_release_full_gpu(adev, true); if (r) goto error; amdgpu_irq_gpu_reset_resume_helper(adev); r = amdgpu_ib_ring_tests(adev); +error: + amdgpu_virt_release_full_gpu(adev, true); if (!r && adev->virt.gim_feature & AMDGIM_FEATURE_GIM_FLR_VRAMLOST) { atomic_inc(&adev->vram_lost_counter); r = amdgpu_device_handle_vram_lost(adev); } -error: - return r; } -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-03 11:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-25 3:26 [PATCH] drm/amdgpu: For sriov reset, move IB test into exclusive mode Emily Deng
[not found] ` <1524626770-30269-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-26 2:06 ` Deng, Emily
[not found] ` <CY4PR12MB112591A8C93613C0B367B2A28F8E0-rpdhrqHFk07v2MZdTKcfDgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-05-03 11:53 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2018-04-26 4:06 Emily Deng
[not found] ` <1524715601-2955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-26 6:00 ` Deng, Emily
2018-04-26 7:39 ` Liu, Monk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox