aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_atombios.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-01-06 21:19:26 -0500
committerDave Airlie <airlied@redhat.com>2011-01-06 23:11:34 -0500
commit9ace9f7b168fef492f731ba60da5c76bc0776e6d (patch)
tree7cc2fa7be499117334a40eeb1ead7929f1728825 /drivers/gpu/drm/radeon/radeon_atombios.c
parent03f40090555bd3de9fc80aa4e805ac7fa9c39dfe (diff)
drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5
NI chips no longer load the MC ucode in the asic_init sequence so the asic comes up in a basic mode with low engine/memory clocks and a voltage. Once the MC ucode is loaded by the driver the card can be programmed to it's proper default clocks and voltage. As such the default clocks in the firmware info table as the post clocks, not the default running clocks. Track the default post clocks and default running clocks separately to handle this. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_atombios.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 03f1c9a10ba4..1573202a6418 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -2249,15 +2249,22 @@ static void radeon_atombios_parse_pplib_non_clock_info(struct radeon_device *rde
2249 rdev->pm.default_power_state_index = state_index; 2249 rdev->pm.default_power_state_index = state_index;
2250 rdev->pm.power_state[state_index].default_clock_mode = 2250 rdev->pm.power_state[state_index].default_clock_mode =
2251 &rdev->pm.power_state[state_index].clock_info[mode_index - 1]; 2251 &rdev->pm.power_state[state_index].clock_info[mode_index - 1];
2252 /* patch the table values with the default slck/mclk from firmware info */ 2252 if (ASIC_IS_DCE5(rdev)) {
2253 for (j = 0; j < mode_index; j++) { 2253 /* NI chips post without MC ucode, so default clocks are strobe mode only */
2254 rdev->pm.power_state[state_index].clock_info[j].mclk = 2254 rdev->pm.default_sclk = rdev->pm.power_state[state_index].clock_info[0].sclk;
2255 rdev->clock.default_mclk; 2255 rdev->pm.default_mclk = rdev->pm.power_state[state_index].clock_info[0].mclk;
2256 rdev->pm.power_state[state_index].clock_info[j].sclk = 2256 rdev->pm.default_vddc = rdev->pm.power_state[state_index].clock_info[0].voltage.voltage;
2257 rdev->clock.default_sclk; 2257 } else {
2258 if (vddc) 2258 /* patch the table values with the default slck/mclk from firmware info */
2259 rdev->pm.power_state[state_index].clock_info[j].voltage.voltage = 2259 for (j = 0; j < mode_index; j++) {
2260 vddc; 2260 rdev->pm.power_state[state_index].clock_info[j].mclk =
2261 rdev->clock.default_mclk;
2262 rdev->pm.power_state[state_index].clock_info[j].sclk =
2263 rdev->clock.default_sclk;
2264 if (vddc)
2265 rdev->pm.power_state[state_index].clock_info[j].voltage.voltage =
2266 vddc;
2267 }
2261 } 2268 }
2262 } 2269 }
2263} 2270}