drm/amdgpu: handle uvd pg flags properly
[deliverable/linux.git] / drivers / gpu / drm / amd / amdgpu / uvd_v4_2.c
index 5e9f73af83a8431b25d6d153132df3a22ce31e31..9cb528740473f46ddb8723cbb1de054a636548b4 100644 (file)
@@ -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);
This page took 0.024155 seconds and 5 git commands to generate.