All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: reduce delay in psp command submit
@ 2020-12-25  6:31 Peng Ju Zhou
  0 siblings, 0 replies; only message in thread
From: Peng Ju Zhou @ 2020-12-25  6:31 UTC (permalink / raw)
  To: amd-gfx

From: pengzhou <PengJu.Zhou@amd.com>

In the psp command submit logic,
the function msleep(1) can be delayed to 10+ ms sometimes,
During the driver init, it will hit msleep(1)
several times which increased the total time of full access.

Changing msleep(1) to usleep_range(10, 100)
and it can reduce about 50ms delay of the total time of full access.

Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 523d22db094b..8d11b34fe40e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -249,7 +249,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 {
 	int ret;
 	int index;
-	int timeout = 2000;
+	int timeout = 20000;
 	bool ras_intr = false;
 	bool skip_unsupport = false;
 
@@ -282,7 +282,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
 		ras_intr = amdgpu_ras_intr_triggered();
 		if (ras_intr)
 			break;
-		msleep(1);
+		usleep_range(10, 100);
 		amdgpu_asic_invalidate_hdp(psp->adev, NULL);
 	}
 
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-25  6:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-25  6:31 [PATCH] drm/amdgpu: reduce delay in psp command submit Peng Ju Zhou

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.