drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h- Extension
.h- Size
- 62345 bytes
- Lines
- 2186
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/acpi_amd_wbrf.hlinux/units.hamdgpu.hkgd_pp_interface.hdm_pp_interface.hdm_pp_smu.hsmu_types.hlinux/firmware.h
Detected Declarations
struct smu_hw_power_statestruct smu_power_statestruct smu_state_classification_blockstruct smu_state_pcie_blockstruct smu_state_display_blockstruct smu_state_memory_blockstruct smu_state_software_algorithm_blockstruct smu_temperature_rangestruct smu_state_validation_blockstruct smu_uvd_clocksstruct smu_power_statestruct smu_user_dpm_profilestruct smu_table_cachestruct smu_tablestruct smu_driver_tablestruct smu_performance_levelstruct smu_clock_infostruct smu_dpm_clk_levelstruct smu_dpm_tablestruct smu_pcie_tablestruct smu_bios_boot_up_valuesstruct smu_table_contextstruct smu_contextstruct smu_dpm_policystruct smu_dpm_policy_descstruct smu_dpm_policystruct smu_dpm_policy_ctxtstruct smu_dpm_contextstruct smu_temp_contextstruct smu_power_gatestruct smu_power_contextstruct smu_feature_bitsstruct smu_featurestruct smu_clocksstruct mclk_latency_entriesstruct mclock_latency_tablestruct smu_baco_contextstruct smu_freq_infostruct pstates_clk_freqstruct smu_umd_pstate_tablestruct cmn2asic_msg_mappingstruct cmn2asic_mappingstruct smu_msg_ctlstruct smu_msg_configstruct smu_msg_argsstruct smu_msg_opsstruct smu_msg_ctlstruct stb_context
Annotated Snippet
struct smu_hw_power_state {
unsigned int magic;
};
struct smu_power_state;
enum smu_state_ui_label {
SMU_STATE_UI_LABEL_NONE,
SMU_STATE_UI_LABEL_BATTERY,
SMU_STATE_UI_TABEL_MIDDLE_LOW,
SMU_STATE_UI_LABEL_BALLANCED,
SMU_STATE_UI_LABEL_MIDDLE_HIGHT,
SMU_STATE_UI_LABEL_PERFORMANCE,
SMU_STATE_UI_LABEL_BACO,
};
enum smu_state_classification_flag {
SMU_STATE_CLASSIFICATION_FLAG_BOOT = 0x0001,
SMU_STATE_CLASSIFICATION_FLAG_THERMAL = 0x0002,
SMU_STATE_CLASSIFICATIN_FLAG_LIMITED_POWER_SOURCE = 0x0004,
SMU_STATE_CLASSIFICATION_FLAG_RESET = 0x0008,
SMU_STATE_CLASSIFICATION_FLAG_FORCED = 0x0010,
SMU_STATE_CLASSIFICATION_FLAG_USER_3D_PERFORMANCE = 0x0020,
SMU_STATE_CLASSIFICATION_FLAG_USER_2D_PERFORMANCE = 0x0040,
SMU_STATE_CLASSIFICATION_FLAG_3D_PERFORMANCE = 0x0080,
SMU_STATE_CLASSIFICATION_FLAG_AC_OVERDIRVER_TEMPLATE = 0x0100,
SMU_STATE_CLASSIFICATION_FLAG_UVD = 0x0200,
SMU_STATE_CLASSIFICATION_FLAG_3D_PERFORMANCE_LOW = 0x0400,
SMU_STATE_CLASSIFICATION_FLAG_ACPI = 0x0800,
SMU_STATE_CLASSIFICATION_FLAG_HD2 = 0x1000,
SMU_STATE_CLASSIFICATION_FLAG_UVD_HD = 0x2000,
SMU_STATE_CLASSIFICATION_FLAG_UVD_SD = 0x4000,
SMU_STATE_CLASSIFICATION_FLAG_USER_DC_PERFORMANCE = 0x8000,
SMU_STATE_CLASSIFICATION_FLAG_DC_OVERDIRVER_TEMPLATE = 0x10000,
SMU_STATE_CLASSIFICATION_FLAG_BACO = 0x20000,
SMU_STATE_CLASSIFICATIN_FLAG_LIMITED_POWER_SOURCE2 = 0x40000,
SMU_STATE_CLASSIFICATION_FLAG_ULV = 0x80000,
SMU_STATE_CLASSIFICATION_FLAG_UVD_MVC = 0x100000,
};
struct smu_state_classification_block {
enum smu_state_ui_label ui_label;
enum smu_state_classification_flag flags;
int bios_index;
bool temporary_state;
bool to_be_deleted;
};
struct smu_state_pcie_block {
unsigned int lanes;
};
enum smu_refreshrate_source {
SMU_REFRESHRATE_SOURCE_EDID,
SMU_REFRESHRATE_SOURCE_EXPLICIT
};
struct smu_state_display_block {
bool disable_frame_modulation;
bool limit_refreshrate;
enum smu_refreshrate_source refreshrate_source;
int explicit_refreshrate;
int edid_refreshrate_index;
bool enable_vari_bright;
};
struct smu_state_memory_block {
bool dll_off;
uint8_t m3arb;
uint8_t unused[3];
};
struct smu_state_software_algorithm_block {
bool disable_load_balancing;
bool enable_sleep_for_timestamps;
};
struct smu_temperature_range {
int min;
int max;
int edge_emergency_max;
int hotspot_min;
int hotspot_crit_max;
int hotspot_emergency_max;
int mem_min;
int mem_crit_max;
int mem_emergency_max;
int software_shutdown_temp;
int software_shutdown_temp_offset;
};
Annotation
- Immediate include surface: `linux/acpi_amd_wbrf.h`, `linux/units.h`, `amdgpu.h`, `kgd_pp_interface.h`, `dm_pp_interface.h`, `dm_pp_smu.h`, `smu_types.h`, `linux/firmware.h`.
- Detected declarations: `struct smu_hw_power_state`, `struct smu_power_state`, `struct smu_state_classification_block`, `struct smu_state_pcie_block`, `struct smu_state_display_block`, `struct smu_state_memory_block`, `struct smu_state_software_algorithm_block`, `struct smu_temperature_range`, `struct smu_state_validation_block`, `struct smu_uvd_clocks`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.