diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-06-26 00:20:28 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-27 19:16:13 -0400 |
commit | dbc341602444d7c0cdd1a75d7057a4a16c96fb3d (patch) | |
tree | 2e02bc889ad932877f851bffedf0f8ce55491a40 /drivers/gpu/drm/radeon/btc_dpm.c | |
parent | 5d77d776416a8881e49d42a30e0eaa919fc98ba5 (diff) |
drm/radeon/dpm/evergreen: restructure code
Needed to properly handle dynamic state adjustment.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/btc_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/btc_dpm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c index e4609fe2228..db76e9a56e7 100644 --- a/drivers/gpu/drm/radeon/btc_dpm.c +++ b/drivers/gpu/drm/radeon/btc_dpm.c @@ -2243,26 +2243,26 @@ int btc_dpm_set_power_state(struct radeon_device *rdev) rv770_restrict_performance_levels_before_switch(rdev); if (eg_pi->pcie_performance_request) - cypress_notify_link_speed_change_before_state_change(rdev); + cypress_notify_link_speed_change_before_state_change(rdev, new_ps, old_ps); rv770_set_uvd_clock_before_set_eng_clock(rdev, new_ps, old_ps); rv770_halt_smc(rdev); btc_set_at_for_uvd(rdev); if (eg_pi->smu_uvd_hs) btc_notify_uvd_to_smc(rdev); - cypress_upload_sw_state(rdev); + cypress_upload_sw_state(rdev, new_ps); if (eg_pi->dynamic_ac_timing) - cypress_upload_mc_reg_table(rdev); + cypress_upload_mc_reg_table(rdev, new_ps); - cypress_program_memory_timing_parameters(rdev); + cypress_program_memory_timing_parameters(rdev, new_ps); rv770_resume_smc(rdev); rv770_set_sw_state(rdev); rv770_set_uvd_clock_after_set_eng_clock(rdev, new_ps, old_ps); if (eg_pi->pcie_performance_request) - cypress_notify_link_speed_change_after_state_change(rdev); + cypress_notify_link_speed_change_after_state_change(rdev, new_ps, old_ps); btc_set_power_state_conditionally_enable_ulv(rdev); @@ -2278,6 +2278,7 @@ int btc_dpm_enable(struct radeon_device *rdev) { struct rv7xx_power_info *pi = rv770_get_pi(rdev); struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev); + struct radeon_ps *boot_ps = rdev->pm.dpm.boot_ps; if (pi->gfx_clock_gating) btc_cg_clock_gating_default(rdev); @@ -2330,7 +2331,7 @@ int btc_dpm_enable(struct radeon_device *rdev) btc_init_smc_table(rdev); if (eg_pi->dynamic_ac_timing) - cypress_populate_mc_reg_table(rdev); + cypress_populate_mc_reg_table(rdev, boot_ps); cypress_program_response_times(rdev); r7xx_start_smc(rdev); |