aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-01-06 21:19:32 -0500
committerDave Airlie <airlied@redhat.com>2011-01-06 23:11:41 -0500
commited18a3603f5b466e0300fc5e0c349dbcce376861 (patch)
treee9eca7f6af8b08ed04bc7f866161dd1dc10d8b3c /drivers/gpu/drm/radeon/radeon_pm.c
parent0af62b0168043896a042b005ff88caa77dd94d04 (diff)
drm/radeon/kms/ni: load default sclk/mclk/vddc at pm init
The vbios only partially initializes the memory controller on NI, so now we need to load the MC ucode in the driver and set the default clocks once the ucode is loaded. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 9052d1e3a5fe..3b1b2bf9cdd5 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -530,6 +530,15 @@ void radeon_pm_suspend(struct radeon_device *rdev)
530 530
531void radeon_pm_resume(struct radeon_device *rdev) 531void radeon_pm_resume(struct radeon_device *rdev)
532{ 532{
533 /* set up the default clocks if the MC ucode is loaded */
534 if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) {
535 if (rdev->pm.default_vddc)
536 radeon_atom_set_voltage(rdev, rdev->pm.default_vddc);
537 if (rdev->pm.default_sclk)
538 radeon_set_engine_clock(rdev, rdev->pm.default_sclk);
539 if (rdev->pm.default_mclk)
540 radeon_set_memory_clock(rdev, rdev->pm.default_mclk);
541 }
533 /* asic init will reset the default power state */ 542 /* asic init will reset the default power state */
534 mutex_lock(&rdev->pm.mutex); 543 mutex_lock(&rdev->pm.mutex);
535 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; 544 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index;
@@ -571,6 +580,15 @@ int radeon_pm_init(struct radeon_device *rdev)
571 radeon_combios_get_power_modes(rdev); 580 radeon_combios_get_power_modes(rdev);
572 radeon_pm_print_states(rdev); 581 radeon_pm_print_states(rdev);
573 radeon_pm_init_profile(rdev); 582 radeon_pm_init_profile(rdev);
583 /* set up the default clocks if the MC ucode is loaded */
584 if (ASIC_IS_DCE5(rdev) && rdev->mc_fw) {
585 if (rdev->pm.default_vddc)
586 radeon_atom_set_voltage(rdev, rdev->pm.default_vddc);
587 if (rdev->pm.default_sclk)
588 radeon_set_engine_clock(rdev, rdev->pm.default_sclk);
589 if (rdev->pm.default_mclk)
590 radeon_set_memory_clock(rdev, rdev->pm.default_mclk);
591 }
574 } 592 }
575 593
576 /* set up the internal thermal sensor if applicable */ 594 /* set up the internal thermal sensor if applicable */