All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amdgpu/psp: Adjust usleep_range in fence wait
@ 2026-02-10  7:52 Ce Sun
  2026-02-10  8:05 ` Sun, Ce(Overlord)
  0 siblings, 1 reply; 4+ messages in thread
From: Ce Sun @ 2026-02-10  7:52 UTC (permalink / raw)
  To: amd-gfx; +Cc: Lijo.Lazar, Ce Sun

Tune the sleep interval in the PSP fence wait loop from 10-100us to 30-100us.
This adjustment results in an overall wait window of 600ms (30us * 20000 iterations)
to 2 seconds (100us * 20000 iterations), which guarantees that we can retrieve
the correct fence value

Signed-off-by: Ce Sun <cesun102@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index b0540b009e84..b08a57a07331 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -735,7 +735,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 		ras_intr = amdgpu_ras_intr_triggered();
 		if (ras_intr)
 			break;
-		usleep_range(10, 100);
+		usleep_range(30, 100);
 		amdgpu_device_invalidate_hdp(psp->adev, NULL);
 	}
 
-- 
2.34.1


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

* Re: [PATCH] amdgpu/psp: Adjust usleep_range in fence wait
  2026-02-10  7:52 [PATCH] amdgpu/psp: Adjust usleep_range in fence wait Ce Sun
@ 2026-02-10  8:05 ` Sun, Ce(Overlord)
  0 siblings, 0 replies; 4+ messages in thread
From: Sun, Ce(Overlord) @ 2026-02-10  8:05 UTC (permalink / raw)
  To: amd-gfx@lists.freedesktop.org; +Cc: Lazar, Lijo

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

[AMD Official Use Only - AMD Internal Distribution Only]

Ignore this, I will send the next one.
________________________________
From: Sun, Ce(Overlord) <Ce.Sun@amd.com>
Sent: Tuesday, February 10, 2026 3:52 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Lazar, Lijo <Lijo.Lazar@amd.com>; Sun, Ce(Overlord) <Ce.Sun@amd.com>
Subject: [PATCH] amdgpu/psp: Adjust usleep_range in fence wait

Tune the sleep interval in the PSP fence wait loop from 10-100us to 30-100us.
This adjustment results in an overall wait window of 600ms (30us * 20000 iterations)
to 2 seconds (100us * 20000 iterations), which guarantees that we can retrieve
the correct fence value

Signed-off-by: Ce Sun <cesun102@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index b0540b009e84..b08a57a07331 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -735,7 +735,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
                 ras_intr = amdgpu_ras_intr_triggered();
                 if (ras_intr)
                         break;
-               usleep_range(10, 100);
+               usleep_range(30, 100);
                 amdgpu_device_invalidate_hdp(psp->adev, NULL);
         }

--
2.34.1


[-- Attachment #2: Type: text/html, Size: 3041 bytes --]

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

* [PATCH] amdgpu/psp: Adjust usleep_range in fence wait
@ 2026-02-10  8:08 Ce Sun
  2026-02-10  9:24 ` Lazar, Lijo
  0 siblings, 1 reply; 4+ messages in thread
From: Ce Sun @ 2026-02-10  8:08 UTC (permalink / raw)
  To: amd-gfx; +Cc: Lijo.Lazar, Ce Sun

Tune the sleep interval in the PSP fence wait loop from 10-100us to 60-100us.
This adjustment results in an overall wait window of 1.2s (60us * 20000 iterations)
to 2 seconds (100us * 20000 iterations), which guarantees that we can retrieve
the correct fence value

Signed-off-by: Ce Sun <cesun102@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index b0540b009e84..5eeea965032a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -735,7 +735,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 		ras_intr = amdgpu_ras_intr_triggered();
 		if (ras_intr)
 			break;
-		usleep_range(10, 100);
+		usleep_range(60, 100);
 		amdgpu_device_invalidate_hdp(psp->adev, NULL);
 	}
 
-- 
2.34.1


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

* Re: [PATCH] amdgpu/psp: Adjust usleep_range in fence wait
  2026-02-10  8:08 Ce Sun
@ 2026-02-10  9:24 ` Lazar, Lijo
  0 siblings, 0 replies; 4+ messages in thread
From: Lazar, Lijo @ 2026-02-10  9:24 UTC (permalink / raw)
  To: Ce Sun, amd-gfx



On 10-Feb-26 1:38 PM, Ce Sun wrote:
> Tune the sleep interval in the PSP fence wait loop from 10-100us to 60-100us.
> This adjustment results in an overall wait window of 1.2s (60us * 20000 iterations)
> to 2 seconds (100us * 20000 iterations), which guarantees that we can retrieve
> the correct fence value
> 
> Signed-off-by: Ce Sun <cesun102@amd.com>

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>

Thanks,
Lijo

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index b0540b009e84..5eeea965032a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -735,7 +735,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
>   		ras_intr = amdgpu_ras_intr_triggered();
>   		if (ras_intr)
>   			break;
> -		usleep_range(10, 100);
> +		usleep_range(60, 100);
>   		amdgpu_device_invalidate_hdp(psp->adev, NULL);
>   	}
>   


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

end of thread, other threads:[~2026-02-10  9:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10  7:52 [PATCH] amdgpu/psp: Adjust usleep_range in fence wait Ce Sun
2026-02-10  8:05 ` Sun, Ce(Overlord)
  -- strict thread matches above, loose matches on Subject: below --
2026-02-10  8:08 Ce Sun
2026-02-10  9:24 ` Lazar, Lijo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.