aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
diff options
context:
space:
mode:
authorZhang, Jerry <[email protected]>2017-07-14 10:20:17 +0000
committerAlex Deucher <[email protected]>2017-07-25 20:28:02 +0000
commit2890decfd9969cac21067ca0c734fbccaf74d634 (patch)
tree99ce7988ec5882125cbb5179b4d1c90c1e91956f /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
parentdrm/amdgpu/gfx9: simplify and fix GRBM index selection (diff)
downloadkernel-2890decfd9969cac21067ca0c734fbccaf74d634.tar.gz
kernel-2890decfd9969cac21067ca0c734fbccaf74d634.zip
drm/amdgpu: read reg in each iterator of psp_wait_for loop
v2: fix the SOS loading failure for PSP v3.1 Signed-off-by: Junwei Zhang <[email protected]> Cc: [email protected] Acked-by: Alex Deucher <[email protected]> (v1) Acked-by: Huang Rui <[email protected]> (v1) Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 9f83264ba9eb..68def1057f0e 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;