diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-02-04 23:33:56 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-08 10:37:44 -0500 |
commit | 35e5912d0801184b57119383da003263a21eeed1 (patch) | |
tree | 7cf2273a567ae162b617f4c1485870337a00d0b3 /drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | |
parent | 0fd4af9e328c0f694d21a646232a7a62da7ec4ae (diff) | |
download | talos-op-linux-35e5912d0801184b57119383da003263a21eeed1.tar.gz talos-op-linux-35e5912d0801184b57119383da003263a21eeed1.zip |
drm/amdgpu: be consistent with uvd cg flags
Don't do anything if the uvd cg flags are not set.
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c index 9cb528740473..c982524d9287 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c @@ -830,6 +830,9 @@ static int uvd_v4_2_set_clockgating_state(void *handle, bool gate = false; struct amdgpu_device *adev = (struct amdgpu_device *)handle; + if (!(adev->cg_flags & AMDGPU_CG_SUPPORT_UVD_MGCG)) + return 0; + if (state == AMD_CG_STATE_GATE) gate = true; |