aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-02-05 00:55:32 -0500
committerDave Airlie <airlied@redhat.com>2010-02-08 18:32:31 -0500
commit6d7f2d8da106ecf794a5a3e98c4239f348119e3c (patch)
tree93f72b1ee3c3532fde235517f71dbd1a87585bfb /drivers
parenta0eb38eb8637a81bb7770d34036e498d2ba63a26 (diff)
drm/radeon/kms: dynclks fixes
- only r4xx/r5xx/rs6xx/rs740 have clock gating atom table, so disable it on r6xx. it's already disabled on r7xx - check to make sure the clock_gating hook exists before calling it. This avoids a segfault on asics without that function. - remove unused static power management function. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.h2
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c10
-rw-r--r--drivers/gpu/drm/radeon/radeon_clocks.c6
3 files changed, 5 insertions, 13 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index d758b1ffb74..3f3c7a2169f 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -549,7 +549,7 @@ static struct radeon_asic r600_asic = {
549 .set_memory_clock = &radeon_atom_set_memory_clock, 549 .set_memory_clock = &radeon_atom_set_memory_clock,
550 .get_pcie_lanes = NULL, 550 .get_pcie_lanes = NULL,
551 .set_pcie_lanes = NULL, 551 .set_pcie_lanes = NULL,
552 .set_clock_gating = &radeon_atom_set_clock_gating, 552 .set_clock_gating = NULL,
553 .set_surface_reg = r600_set_surface_reg, 553 .set_surface_reg = r600_set_surface_reg,
554 .clear_surface_reg = r600_clear_surface_reg, 554 .clear_surface_reg = r600_clear_surface_reg,
555 .bandwidth_update = &rv515_bandwidth_update, 555 .bandwidth_update = &rv515_bandwidth_update,
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index b55012fedb9..c3198453528 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1780,16 +1780,6 @@ void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable)
1780 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); 1780 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
1781} 1781}
1782 1782
1783void radeon_atom_static_pwrmgt_setup(struct radeon_device *rdev, int enable)
1784{
1785 ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION args;
1786 int index = GetIndexIntoMasterTable(COMMAND, EnableASIC_StaticPwrMgt);
1787
1788 args.ucEnable = enable;
1789
1790 atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
1791}
1792
1793uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev) 1783uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev)
1794{ 1784{
1795 GET_ENGINE_CLOCK_PS_ALLOCATION args; 1785 GET_ENGINE_CLOCK_PS_ALLOCATION args;
diff --git a/drivers/gpu/drm/radeon/radeon_clocks.c b/drivers/gpu/drm/radeon/radeon_clocks.c
index 73c4405bf42..3ec94a0d310 100644
--- a/drivers/gpu/drm/radeon/radeon_clocks.c
+++ b/drivers/gpu/drm/radeon/radeon_clocks.c
@@ -846,8 +846,10 @@ int radeon_static_clocks_init(struct drm_device *dev)
846 /* XXX make sure engine is idle */ 846 /* XXX make sure engine is idle */
847 847
848 if (radeon_dynclks != -1) { 848 if (radeon_dynclks != -1) {
849 if (radeon_dynclks) 849 if (radeon_dynclks) {
850 radeon_set_clock_gating(rdev, 1); 850 if (rdev->asic->set_clock_gating)
851 radeon_set_clock_gating(rdev, 1);
852 }
851 } 853 }
852 radeon_apply_clock_quirks(rdev); 854 radeon_apply_clock_quirks(rdev);
853 return 0; 855 return 0;