drivers/gpu/drm/radeon/rs780_dpm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/radeon/rs780_dpm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/radeon/rs780_dpm.c- Extension
.c- Size
- 33183 bytes
- Lines
- 1077
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pci.hlinux/seq_file.hatom.hr600_dpm.hradeon.hradeon_asic.hrs780_dpm.hrs780d.h
Detected Declarations
function filesfunction rs780_get_pm_mode_parametersfunction rs780_initialize_dpm_power_statefunction rs780_initialize_dpm_parametersfunction rs780_start_dpmfunction rs780_preset_ranges_slow_clk_fbdiv_enfunction rs780_preset_starting_fbdivfunction rs780_voltage_scaling_initfunction rs780_clk_scaling_enablefunction rs780_voltage_scaling_enablefunction rs780_set_engine_clock_wfcfunction rs780_set_engine_clock_scfunction rs780_set_engine_clock_tdcfunction rs780_set_engine_clock_sscfunction rs780_program_atfunction rs780_disable_vbios_powersavingfunction rs780_force_voltagefunction rs780_force_fbdivfunction rs780_set_engine_clock_scalingfunction rs780_set_engine_clock_spcfunction rs780_activate_engine_clk_scalingfunction rs780_get_voltage_for_vddc_levelfunction rs780_enable_voltage_scalingfunction rs780_set_uvd_clock_before_set_eng_clockfunction rs780_set_uvd_clock_after_set_eng_clockfunction rs780_dpm_enablefunction rs780_dpm_disablefunction rs780_dpm_set_power_statefunction rs780_dpm_setup_asicfunction rs780_parse_pplib_non_clock_infofunction rs780_parse_pplib_clock_infofunction rs780_parse_power_tablefunction rs780_dpm_initfunction rs780_dpm_print_power_statefunction rs780_dpm_finifunction rs780_dpm_get_sclkfunction rs780_dpm_get_mclkfunction rs780_dpm_debugfs_print_current_performance_levelfunction rs780_dpm_get_current_sclkfunction rs780_dpm_get_current_mclkfunction rs780_dpm_force_performance_level
Annotated Snippet
if (crtc && crtc->enabled) {
radeon_crtc = to_radeon_crtc(crtc);
pi->crtc_id = radeon_crtc->crtc_id;
if (crtc->mode.htotal && crtc->mode.vtotal)
pi->refresh_rate = drm_mode_vrefresh(&crtc->mode);
break;
}
}
}
static void rs780_voltage_scaling_enable(struct radeon_device *rdev, bool enable);
static int rs780_initialize_dpm_power_state(struct radeon_device *rdev,
struct radeon_ps *boot_ps)
{
struct atom_clock_dividers dividers;
struct igp_ps *default_state = rs780_get_ps(boot_ps);
int i, ret;
ret = radeon_atom_get_clock_dividers(rdev, COMPUTE_ENGINE_PLL_PARAM,
default_state->sclk_low, false, ÷rs);
if (ret)
return ret;
r600_engine_clock_entry_set_reference_divider(rdev, 0, dividers.ref_div);
r600_engine_clock_entry_set_feedback_divider(rdev, 0, dividers.fb_div);
r600_engine_clock_entry_set_post_divider(rdev, 0, dividers.post_div);
if (dividers.enable_post_div)
r600_engine_clock_entry_enable_post_divider(rdev, 0, true);
else
r600_engine_clock_entry_enable_post_divider(rdev, 0, false);
r600_engine_clock_entry_set_step_time(rdev, 0, R600_SST_DFLT);
r600_engine_clock_entry_enable_pulse_skipping(rdev, 0, false);
r600_engine_clock_entry_enable(rdev, 0, true);
for (i = 1; i < R600_PM_NUMBER_OF_SCLKS; i++)
r600_engine_clock_entry_enable(rdev, i, false);
r600_enable_mclk_control(rdev, false);
r600_voltage_control_enable_pins(rdev, 0);
return 0;
}
static int rs780_initialize_dpm_parameters(struct radeon_device *rdev,
struct radeon_ps *boot_ps)
{
int ret = 0;
int i;
r600_set_bsp(rdev, R600_BSU_DFLT, R600_BSP_DFLT);
r600_set_at(rdev, 0, 0, 0, 0);
r600_set_git(rdev, R600_GICST_DFLT);
for (i = 0; i < R600_PM_NUMBER_OF_TC; i++)
r600_set_tc(rdev, i, 0, 0);
r600_select_td(rdev, R600_TD_DFLT);
r600_set_vrc(rdev, 0);
r600_set_tpu(rdev, R600_TPU_DFLT);
r600_set_tpc(rdev, R600_TPC_DFLT);
r600_set_sstu(rdev, R600_SSTU_DFLT);
r600_set_sst(rdev, R600_SST_DFLT);
r600_set_fctu(rdev, R600_FCTU_DFLT);
r600_set_fct(rdev, R600_FCT_DFLT);
r600_set_vddc3d_oorsu(rdev, R600_VDDC3DOORSU_DFLT);
r600_set_vddc3d_oorphc(rdev, R600_VDDC3DOORPHC_DFLT);
r600_set_vddc3d_oorsdc(rdev, R600_VDDC3DOORSDC_DFLT);
r600_set_ctxcgtt3d_rphc(rdev, R600_CTXCGTT3DRPHC_DFLT);
r600_set_ctxcgtt3d_rsdc(rdev, R600_CTXCGTT3DRSDC_DFLT);
r600_vid_rt_set_vru(rdev, R600_VRU_DFLT);
r600_vid_rt_set_vrt(rdev, R600_VOLTAGERESPONSETIME_DFLT);
r600_vid_rt_set_ssu(rdev, R600_SPLLSTEPUNIT_DFLT);
ret = rs780_initialize_dpm_power_state(rdev, boot_ps);
r600_power_level_set_voltage_index(rdev, R600_POWER_LEVEL_LOW, 0);
r600_power_level_set_voltage_index(rdev, R600_POWER_LEVEL_MEDIUM, 0);
r600_power_level_set_voltage_index(rdev, R600_POWER_LEVEL_HIGH, 0);
r600_power_level_set_mem_clock_index(rdev, R600_POWER_LEVEL_LOW, 0);
Annotation
- Immediate include surface: `linux/pci.h`, `linux/seq_file.h`, `atom.h`, `r600_dpm.h`, `radeon.h`, `radeon_asic.h`, `rs780_dpm.h`, `rs780d.h`.
- Detected declarations: `function files`, `function rs780_get_pm_mode_parameters`, `function rs780_initialize_dpm_power_state`, `function rs780_initialize_dpm_parameters`, `function rs780_start_dpm`, `function rs780_preset_ranges_slow_clk_fbdiv_en`, `function rs780_preset_starting_fbdiv`, `function rs780_voltage_scaling_init`, `function rs780_clk_scaling_enable`, `function rs780_voltage_scaling_enable`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.