提交 6d7f2d8d 编写于 作者: A Alex Deucher 提交者: Dave Airlie

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: NAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 a0eb38eb
...@@ -549,7 +549,7 @@ static struct radeon_asic r600_asic = { ...@@ -549,7 +549,7 @@ static struct radeon_asic r600_asic = {
.set_memory_clock = &radeon_atom_set_memory_clock, .set_memory_clock = &radeon_atom_set_memory_clock,
.get_pcie_lanes = NULL, .get_pcie_lanes = NULL,
.set_pcie_lanes = NULL, .set_pcie_lanes = NULL,
.set_clock_gating = &radeon_atom_set_clock_gating, .set_clock_gating = NULL,
.set_surface_reg = r600_set_surface_reg, .set_surface_reg = r600_set_surface_reg,
.clear_surface_reg = r600_clear_surface_reg, .clear_surface_reg = r600_clear_surface_reg,
.bandwidth_update = &rv515_bandwidth_update, .bandwidth_update = &rv515_bandwidth_update,
......
...@@ -1780,16 +1780,6 @@ void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable) ...@@ -1780,16 +1780,6 @@ void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable)
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
} }
void radeon_atom_static_pwrmgt_setup(struct radeon_device *rdev, int enable)
{
ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION args;
int index = GetIndexIntoMasterTable(COMMAND, EnableASIC_StaticPwrMgt);
args.ucEnable = enable;
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
}
uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev) uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev)
{ {
GET_ENGINE_CLOCK_PS_ALLOCATION args; GET_ENGINE_CLOCK_PS_ALLOCATION args;
......
...@@ -846,9 +846,11 @@ int radeon_static_clocks_init(struct drm_device *dev) ...@@ -846,9 +846,11 @@ int radeon_static_clocks_init(struct drm_device *dev)
/* XXX make sure engine is idle */ /* XXX make sure engine is idle */
if (radeon_dynclks != -1) { if (radeon_dynclks != -1) {
if (radeon_dynclks) if (radeon_dynclks) {
if (rdev->asic->set_clock_gating)
radeon_set_clock_gating(rdev, 1); radeon_set_clock_gating(rdev, 1);
} }
}
radeon_apply_clock_quirks(rdev); radeon_apply_clock_quirks(rdev);
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册