drm/amdgpu/cz: force uvd clocks when sclks are forced
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 18 Dec 2015 16:28:49 +0000 (11:28 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Jan 2016 17:13:26 +0000 (12:13 -0500)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/cz_dpm.c

index 02cba49f13a80687ff1c85c64a1f406a7a85b5a8..bdf5a22ba450146b72875afb0f0ea48a28312732 100644 (file)
@@ -1971,23 +1971,47 @@ static int cz_dpm_force_dpm_level(struct amdgpu_device *adev,
 
        switch (level) {
        case AMDGPU_DPM_FORCED_LEVEL_HIGH:
+               /* sclk */
                ret = cz_dpm_unforce_dpm_levels(adev);
                if (ret)
                        return ret;
                ret = cz_dpm_force_highest(adev);
+               if (ret)
+                       return ret;
+
+               /* uvd */
+               ret = cz_dpm_unforce_uvd_dpm_levels(adev);
+               if (ret)
+                       return ret;
+               ret = cz_dpm_uvd_force_highest(adev);
                if (ret)
                        return ret;
                break;
        case AMDGPU_DPM_FORCED_LEVEL_LOW:
+               /* sclk */
                ret = cz_dpm_unforce_dpm_levels(adev);
                if (ret)
                        return ret;
                ret = cz_dpm_force_lowest(adev);
+               if (ret)
+                       return ret;
+
+               /* uvd */
+               ret = cz_dpm_unforce_uvd_dpm_levels(adev);
+               if (ret)
+                       return ret;
+               ret = cz_dpm_uvd_force_lowest(adev);
                if (ret)
                        return ret;
                break;
        case AMDGPU_DPM_FORCED_LEVEL_AUTO:
+               /* sclk */
                ret = cz_dpm_unforce_dpm_levels(adev);
+               if (ret)
+                       return ret;
+
+               /* uvd */
+               ret = cz_dpm_unforce_uvd_dpm_levels(adev);
                if (ret)
                        return ret;
                break;