drm/radeon: fix multi-head power profile stability on BTC+ asics
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 11 Feb 2013 13:44:48 +0000 (08:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Feb 2013 13:51:10 +0000 (08:51 -0500)
vddci needs to track mclk for multi-head.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/radeon_pm.c

index 2916de896a60e5e149d140cb5364a7b9529e363c..3c38ea46531cfe6b9bc6397c01337393fe3e8a51 100644 (file)
@@ -403,6 +403,19 @@ void evergreen_pm_misc(struct radeon_device *rdev)
                        rdev->pm.current_vddc = voltage->voltage;
                        DRM_DEBUG("Setting: vddc: %d\n", voltage->voltage);
                }
+
+               /* starting with BTC, there is one state that is used for both
+                * MH and SH.  Difference is that we always use the high clock index for
+                * mclk and vddci.
+                */
+               if ((rdev->pm.pm_method == PM_METHOD_PROFILE) &&
+                   (rdev->family >= CHIP_BARTS) &&
+                   rdev->pm.active_crtc_count &&
+                   ((rdev->pm.profile_index == PM_PROFILE_MID_MH_IDX) ||
+                    (rdev->pm.profile_index == PM_PROFILE_LOW_MH_IDX)))
+                       voltage = &rdev->pm.power_state[req_ps_idx].
+                               clock_info[rdev->pm.profiles[PM_PROFILE_HIGH_MH_IDX].dpms_on_cm_idx].voltage;
+
                /* 0xff01 is a flag rather then an actual voltage */
                if (voltage->vddci == 0xff01)
                        return;
index 0bfa656aa87d482fead90b86c73aac94e94849de..338fd6a74e8715e8db2335a90043242870e094f6 100644 (file)
@@ -169,7 +169,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
 
                /* starting with BTC, there is one state that is used for both
                 * MH and SH.  Difference is that we always use the high clock index for
-                * mclk.
+                * mclk and vddci.
                 */
                if ((rdev->pm.pm_method == PM_METHOD_PROFILE) &&
                    (rdev->family >= CHIP_BARTS) &&