diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-02-05 07:29:45 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-08 18:37:43 +0300 |
commit | 808a934fd47c1c4a1670069cbe2fae7c23068b14 (patch) | |
tree | 0b1b9dafe384f51944d9b569b1717e704deb08f7 /drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | |
parent | b6df77fc5c42041a11ff094e5595d1e7379c917f (diff) | |
download | linux-808a934fd47c1c4a1670069cbe2fae7c23068b14.tar.xz |
drm/amdgpu: handle vce pg flags properly
Don't attempt to start/stop the vce 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/vce_v2_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c index 52ac7a8f1e58..d3ce6085ccd2 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c @@ -608,6 +608,9 @@ static int vce_v2_0_set_powergating_state(void *handle, */ struct amdgpu_device *adev = (struct amdgpu_device *)handle; + if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_VCE)) + return 0; + if (state == AMD_PG_STATE_GATE) /* XXX do we need a vce_v2_0_stop()? */ return 0; |