Skip to contentSkip to conversation

drm/amdgpu: do optimization for psp command submit

PATCH In review Peng Ju Zhou 2 participants 2 messages Dec 25, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: do optimization for psp command submit

From: pengzhou <[email protected]>

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -2
index 523d22db094b..8d11b34fe40e 100644
@@ -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);
 	}
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Quoted 43 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Peng Ju Zhou
Sent: Friday, December 25, 2020 3:02 PM
To: [email protected]
Subject: [PATCH] drm/amdgpu: do optimization for psp command submit

From: pengzhou <[email protected]>

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.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -3
index 523d22db094b..8d11b34fe40e 100644
@@ -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

Quoted 11 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=04%7C01%7CEmily.Deng%40amd.com%7C57638b8bb2ed443 d966d08d8a8a30448%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0% 7C637444765410848027%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;s data=Ypcwgp0epONjbZGria4RwVRRnrIQs%2F36%2FnzWNXUDPRU%3D&amp; reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx