diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-02-05 05:26:56 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-08 16:37:42 +0100 |
commit | b6df77fc5c42041a11ff094e5595d1e7379c917f (patch) | |
tree | df63099a0b0fe78f2c499333b219b4118131d7b0 /drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | |
parent | drm/amdgpu/dpm/ci: switch over to the common pcie caps interface (diff) | |
download | linux-b6df77fc5c42041a11ff094e5595d1e7379c917f.tar.xz 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_v4_2.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c index 5e9f73af83a8..9cb528740473 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c @@ -848,7 +848,10 @@ static int uvd_v4_2_set_powergating_state(void *handle, * revisit this when there is a cleaner line between * the smc and the hw blocks */ - struct amdgpu_device *adev = (struct amdgpu_device *)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_v4_2_stop(adev); |