[PATCH 1/2] drm/amdgpu: read reg in each iterate of psp_wait_for loop
Junwei Zhang
Jerry.Zhang at amd.com
Mon Jul 17 09:01:49 UTC 2017
From: "Zhang, Jerry" <Jerry.Zhang at amd.com>
Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
Acked-by: Huang Rui <ray.huang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index c919579..644941d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -98,9 +98,8 @@ int psp_wait_for(struct psp_context *psp, uint32_t reg_index,
int i;
struct amdgpu_device *adev = psp->adev;
- val = RREG32(reg_index);
-
for (i = 0; i < adev->usec_timeout; i++) {
+ val = RREG32(reg_index);
if (check_changed) {
if (val != reg_val)
return 0;
--
1.9.1
More information about the amd-gfx
mailing list