From: pengzhou Date: Wed, 16 Dec 2020 05:14:15 +0000 (+0800) Subject: drm/amdgpu: do optimization for psp command submit X-Git-Tag: v5.15~1634^2~22^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57995aa8ffb3e47a74763cf9106d34e9e8be9d8d;p=platform%2Fkernel%2Flinux-starfive.git drm/amdgpu: do optimization for psp command submit In the psp command submit logic, the function msleep(1) delayed too long, Changing it to usleep_range(10, 100) to have a better performance. Signed-off-by: Peng Ju Zhou Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 5d6fc369e32c..2921f881fc66 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); }