drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c- Extension
.c- Size
- 61026 bytes
- Lines
- 1805
- 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
pp_debug.hlinux/types.hlinux/kernel.hlinux/slab.hlinux/pci.hdrm/amdgpu_drm.hprocesspptables.hatom-types.hatombios.hpptable.hpower_state.hhwmgr.hhardwaremanager.h
Detected Declarations
function filesfunction get_vce_clock_info_array_offsetfunction get_vce_clock_info_array_sizefunction get_vce_clock_voltage_limit_table_offsetfunction get_vce_clock_voltage_limit_table_sizefunction get_vce_state_table_offsetfunction get_uvd_table_offsetfunction get_uvd_clock_info_array_offsetfunction get_uvd_clock_info_array_sizefunction get_uvd_clock_voltage_limit_table_offsetfunction get_samu_table_offsetfunction get_samu_clock_voltage_limit_table_offsetfunction get_acp_table_offsetfunction get_acp_clock_voltage_limit_table_offsetfunction get_cacp_tdp_table_offsetfunction get_cac_tdp_tablefunction get_sclk_vdd_gfx_table_offsetfunction get_sclk_vdd_gfx_clock_voltage_dependency_table_offsetfunction get_clock_voltage_dependency_tablefunction get_valid_clkfunction get_clock_voltage_limitfunction set_hw_capfunction set_platform_capsfunction make_classification_flagsfunction init_non_clock_fieldsfunction size_of_entry_v2function pp_tables_get_response_timesfunction pp_tables_get_num_of_entriesfunction pp_tables_get_entryfunction init_powerplay_tablesfunction init_thermal_controllerfunction init_overdrive_limits_V1_4function init_overdrive_limits_V2_1function init_overdrive_limitsfunction get_uvd_clock_voltage_limit_tablefunction get_vce_clock_voltage_limit_tablefunction get_samu_clock_voltage_limit_tablefunction get_acp_clock_voltage_limit_tablefunction init_clock_voltage_dependencyfunction get_cac_leakage_tablefunction get_platform_power_management_tablefunction init_dpm2_parametersfunction init_phase_shedding_tablefunction get_number_of_vce_state_table_entriesfunction get_vce_state_table_entryfunction pp_tables_initializefunction pp_tables_uninitialize
Annotated Snippet
sizeof(ATOM_PPLIB_POWERPLAYTABLE3)) {
const ATOM_PPLIB_POWERPLAYTABLE3 *powerplay_table3 =
(const ATOM_PPLIB_POWERPLAYTABLE3 *)powerplay_table;
if (powerplay_table3->usExtendendedHeaderOffset > 0) {
const ATOM_PPLIB_EXTENDEDHEADER *extended_header =
(const ATOM_PPLIB_EXTENDEDHEADER *)
(((unsigned long)powerplay_table3) +
le16_to_cpu(powerplay_table3->usExtendendedHeaderOffset));
if (le16_to_cpu(extended_header->usSize) >=
SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V2)
vce_table_offset = le16_to_cpu(extended_header->usVCETableOffset);
}
}
return vce_table_offset;
}
static uint16_t get_vce_clock_info_array_offset(struct pp_hwmgr *hwmgr,
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
{
uint16_t table_offset = get_vce_table_offset(hwmgr,
powerplay_table);
if (table_offset > 0)
return table_offset + 1;
return 0;
}
static uint16_t get_vce_clock_info_array_size(struct pp_hwmgr *hwmgr,
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
{
uint16_t table_offset = get_vce_clock_info_array_offset(hwmgr,
powerplay_table);
uint16_t table_size = 0;
if (table_offset > 0) {
const VCEClockInfoArray *p = (const VCEClockInfoArray *)
(((unsigned long) powerplay_table) + table_offset);
table_size = sizeof(uint8_t) + p->ucNumEntries * sizeof(VCEClockInfo);
}
return table_size;
}
static uint16_t get_vce_clock_voltage_limit_table_offset(struct pp_hwmgr *hwmgr,
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
{
uint16_t table_offset = get_vce_clock_info_array_offset(hwmgr,
powerplay_table);
if (table_offset > 0)
return table_offset + get_vce_clock_info_array_size(hwmgr,
powerplay_table);
return 0;
}
static uint16_t get_vce_clock_voltage_limit_table_size(struct pp_hwmgr *hwmgr,
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
{
uint16_t table_offset = get_vce_clock_voltage_limit_table_offset(hwmgr, powerplay_table);
uint16_t table_size = 0;
if (table_offset > 0) {
const ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table *ptable =
(const ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table *)(((unsigned long) powerplay_table) + table_offset);
table_size = sizeof(uint8_t) + ptable->numEntries * sizeof(ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record);
}
return table_size;
}
static uint16_t get_vce_state_table_offset(struct pp_hwmgr *hwmgr, const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
{
uint16_t table_offset = get_vce_clock_voltage_limit_table_offset(hwmgr, powerplay_table);
if (table_offset > 0)
return table_offset + get_vce_clock_voltage_limit_table_size(hwmgr, powerplay_table);
return 0;
}
static const ATOM_PPLIB_VCE_State_Table *get_vce_state_table(
struct pp_hwmgr *hwmgr,
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
{
uint16_t table_offset = get_vce_state_table_offset(hwmgr, powerplay_table);
Annotation
- Immediate include surface: `pp_debug.h`, `linux/types.h`, `linux/kernel.h`, `linux/slab.h`, `linux/pci.h`, `drm/amdgpu_drm.h`, `processpptables.h`, `atom-types.h`.
- Detected declarations: `function files`, `function get_vce_clock_info_array_offset`, `function get_vce_clock_info_array_size`, `function get_vce_clock_voltage_limit_table_offset`, `function get_vce_clock_voltage_limit_table_size`, `function get_vce_state_table_offset`, `function get_uvd_table_offset`, `function get_uvd_clock_info_array_offset`, `function get_uvd_clock_info_array_size`, `function get_uvd_clock_voltage_limit_table_offset`.
- 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.