Skip to contentSkip to conversation

amdgpu/psp: Adjust usleep_range in fence wait

PATCH In review Ce Sun 2 participants 2 messages Feb 10

Subsystems (2)
lore
Share & tools
lore

Ce Sun

author
#0 lore raw

PATCH 1/1 amdgpu/psp: Adjust usleep_range in fence wait

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index b0540b009e84..5eeea965032a 100644
@@ -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);
 	}
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · 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

Thanks,
Lijo

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index b0540b009e84..5eeea965032a 100644
@@ -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);
  	}