diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-04-29 16:33:38 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 04:21:42 -0400 |
commit | 536fcd5124df6af3b95f1bffc925d9ccb6d5b9df (patch) | |
tree | 5188fd38872f43803916a1aff976262c7f9232af /drivers/gpu/drm/radeon/rs600.c | |
parent | 4f3218cbc34f4ffd88f4b3ea0d2f6999aea7b3e6 (diff) |
drm/radeon/kms: enable misc pm power state features on r5xx, rs6xx
voltage drop, dynamic voltage, dynamic sclk, pcie lane adjust, etc,
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rs600.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index c3890b76a1c..8e0c46060b3 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c | |||
@@ -48,12 +48,11 @@ int rs600_mc_wait_for_idle(struct radeon_device *rdev); | |||
48 | 48 | ||
49 | void rs600_pm_misc(struct radeon_device *rdev) | 49 | void rs600_pm_misc(struct radeon_device *rdev) |
50 | { | 50 | { |
51 | #if 0 | ||
52 | int requested_index = rdev->pm.requested_power_state_index; | 51 | int requested_index = rdev->pm.requested_power_state_index; |
53 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 52 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; |
54 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 53 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; |
55 | u32 tmp, dyn_pwrmgt_sclk_length, dyn_sclk_vol_cntl; | 54 | u32 tmp, dyn_pwrmgt_sclk_length, dyn_sclk_vol_cntl; |
56 | u32 hdp_dyn_cntl, mc_host_dyn_cntl; | 55 | u32 hdp_dyn_cntl, /*mc_host_dyn_cntl,*/ dyn_backbias_cntl; |
57 | 56 | ||
58 | if ((voltage->type == VOLTAGE_GPIO) && (voltage->gpio.valid)) { | 57 | if ((voltage->type == VOLTAGE_GPIO) && (voltage->gpio.valid)) { |
59 | if (ps->misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) { | 58 | if (ps->misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) { |
@@ -112,13 +111,21 @@ void rs600_pm_misc(struct radeon_device *rdev) | |||
112 | else | 111 | else |
113 | hdp_dyn_cntl |= HDP_FORCEON; | 112 | hdp_dyn_cntl |= HDP_FORCEON; |
114 | WREG32_PLL(HDP_DYN_CNTL, hdp_dyn_cntl); | 113 | WREG32_PLL(HDP_DYN_CNTL, hdp_dyn_cntl); |
115 | 114 | #if 0 | |
115 | /* mc_host_dyn seems to cause hangs from time to time */ | ||
116 | mc_host_dyn_cntl = RREG32_PLL(MC_HOST_DYN_CNTL); | 116 | mc_host_dyn_cntl = RREG32_PLL(MC_HOST_DYN_CNTL); |
117 | if (ps->misc & ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN) | 117 | if (ps->misc & ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN) |
118 | mc_host_dyn_cntl &= ~MC_HOST_FORCEON; | 118 | mc_host_dyn_cntl &= ~MC_HOST_FORCEON; |
119 | else | 119 | else |
120 | mc_host_dyn_cntl |= MC_HOST_FORCEON; | 120 | mc_host_dyn_cntl |= MC_HOST_FORCEON; |
121 | WREG32_PLL(MC_HOST_DYN_CNTL, mc_host_dyn_cntl); | 121 | WREG32_PLL(MC_HOST_DYN_CNTL, mc_host_dyn_cntl); |
122 | #endif | ||
123 | dyn_backbias_cntl = RREG32_PLL(DYN_BACKBIAS_CNTL); | ||
124 | if (ps->misc & ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN) | ||
125 | dyn_backbias_cntl |= IO_CG_BACKBIAS_EN; | ||
126 | else | ||
127 | dyn_backbias_cntl &= ~IO_CG_BACKBIAS_EN; | ||
128 | WREG32_PLL(DYN_BACKBIAS_CNTL, dyn_backbias_cntl); | ||
122 | 129 | ||
123 | /* set pcie lanes */ | 130 | /* set pcie lanes */ |
124 | if ((rdev->flags & RADEON_IS_PCIE) && | 131 | if ((rdev->flags & RADEON_IS_PCIE) && |
@@ -130,7 +137,6 @@ void rs600_pm_misc(struct radeon_device *rdev) | |||
130 | ps->pcie_lanes); | 137 | ps->pcie_lanes); |
131 | DRM_INFO("Setting: p: %d\n", ps->pcie_lanes); | 138 | DRM_INFO("Setting: p: %d\n", ps->pcie_lanes); |
132 | } | 139 | } |
133 | #endif | ||
134 | } | 140 | } |
135 | 141 | ||
136 | void rs600_pm_prepare(struct radeon_device *rdev) | 142 | void rs600_pm_prepare(struct radeon_device *rdev) |