amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend
@ 2024-04-19  7:52 Lang Yu
  2024-04-19  8:43 ` Gopalakrishnan, Veerabadhran (Veera)
  2024-04-19  9:50 ` Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Lang Yu @ 2024-04-19  7:52 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Veerabadhran Gopalakrishnan, Lang Yu

umsch test needs full GPU functionality(e.g., VM update, TLB flush,
possibly buffer moving under memory pressure) which may be not ready
under these states. Just skip it to avoid potential issues.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 06ad68714172..9f9d6a6d5cf3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
@@ -774,6 +774,9 @@ static int umsch_mm_late_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	if (amdgpu_in_reset(adev) || adev->in_s0ix || adev->in_suspend)
+		return 0;
+
 	return umsch_mm_test(adev);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend
  2024-04-19  7:52 [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend Lang Yu
@ 2024-04-19  8:43 ` Gopalakrishnan, Veerabadhran (Veera)
  2024-04-19  9:50 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Gopalakrishnan, Veerabadhran (Veera) @ 2024-04-19  8:43 UTC (permalink / raw)
  To: Yu, Lang, amd-gfx; +Cc: Deucher, Alexander

[AMD Official Use Only - General]

Looks good to me.

Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>

Regards,
Veera

-----Original Message-----
From: Yu, Lang <Lang.Yu@amd.com>
Sent: Friday, April 19, 2024 1:22 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Gopalakrishnan, Veerabadhran (Veera) <Veerabadhran.Gopalakrishnan@amd.com>; Yu, Lang <Lang.Yu@amd.com>
Subject: [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend

umsch test needs full GPU functionality(e.g., VM update, TLB flush, possibly buffer moving under memory pressure) which may be not ready under these states. Just skip it to avoid potential issues.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 06ad68714172..9f9d6a6d5cf3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
@@ -774,6 +774,9 @@ static int umsch_mm_late_init(void *handle)  {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;

+       if (amdgpu_in_reset(adev) || adev->in_s0ix || adev->in_suspend)
+               return 0;
+
        return umsch_mm_test(adev);
 }

--
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend
  2024-04-19  7:52 [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend Lang Yu
  2024-04-19  8:43 ` Gopalakrishnan, Veerabadhran (Veera)
@ 2024-04-19  9:50 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2024-04-19  9:50 UTC (permalink / raw)
  To: Lang Yu, amd-gfx; +Cc: Alex Deucher, Veerabadhran Gopalakrishnan

Am 19.04.24 um 09:52 schrieb Lang Yu:
> umsch test needs full GPU functionality(e.g., VM update, TLB flush,
> possibly buffer moving under memory pressure) which may be not ready
> under these states. Just skip it to avoid potential issues.
>
> Signed-off-by: Lang Yu <Lang.Yu@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
> index 06ad68714172..9f9d6a6d5cf3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
> @@ -774,6 +774,9 @@ static int umsch_mm_late_init(void *handle)
>   {
>   	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>   
> +	if (amdgpu_in_reset(adev) || adev->in_s0ix || adev->in_suspend)
> +		return 0;
> +
>   	return umsch_mm_test(adev);
>   }
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-19  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19  7:52 [PATCH] drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend Lang Yu
2024-04-19  8:43 ` Gopalakrishnan, Veerabadhran (Veera)
2024-04-19  9:50 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).