summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-02-04 23:26:56 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-02-08 10:37:42 -0500
commitb6df77fc5c42041a11ff094e5595d1e7379c917f (patch)
treedf63099a0b0fe78f2c499333b219b4118131d7b0 /drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
parent50171ebecf87521056db2b3d5654c4348f32c9bd (diff)
downloadlinux-b6df77fc5c42041a11ff094e5595d1e7379c917f.tar.gz
linux-b6df77fc5c42041a11ff094e5595d1e7379c917f.tar.bz2
linux-b6df77fc5c42041a11ff094e5595d1e7379c917f.zip
drm/amdgpu: handle uvd pg flags properly
Don't attempt to start/stop the uvd block if pg is disabled. Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
index 38864f562981..b4623deac8ef 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
@@ -789,6 +789,9 @@ static int uvd_v5_0_set_powergating_state(void *handle,
*/
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_UVD))
+ return 0;
+
if (state == AMD_PG_STATE_GATE) {
uvd_v5_0_stop(adev);
return 0;