summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2017-02-13 14:11:40 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-02-16 11:43:44 -0500
commite89d5b5c202831648b853be20a5b9f8170d642d5 (patch)
tree91e66d6c5684e40f077f5b28b1ec3e9867eea150 /drivers/gpu
parentfce293ca3d088b9a398c4fa3f7e9489283a70cf5 (diff)
downloadop-kernel-dev-e89d5b5c202831648b853be20a5b9f8170d642d5.zip
op-kernel-dev-e89d5b5c202831648b853be20a5b9f8170d642d5.tar.gz
drm/amd/amdgpu: Fix flow control in uvd_v4_2_stop()
Break out of outer loop properly. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index 97af482..b34cefc 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -401,7 +401,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break;
mdelay(1);
}
- break;
+ if (status & 2)
+ break;
}
for (i = 0; i < 10; ++i) {
@@ -411,7 +412,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break;
mdelay(1);
}
- break;
+ if (status & 0xf)
+ break;
}
/* Stall UMC and register bus before resetting VCPU */
@@ -424,7 +426,8 @@ static void uvd_v4_2_stop(struct amdgpu_device *adev)
break;
mdelay(1);
}
- break;
+ if (status & 0x240)
+ break;
}
WREG32_P(0x3D49, 0, ~(1 << 2));
OpenPOWER on IntegriCloud