drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c- Extension
.c- Size
- 108125 bytes
- Lines
- 3391
- 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/firmware.hlinux/pci.hlinux/i2c.hamdgpu.hamdgpu_dpm.hamdgpu_smu.hatomfirmware.hamdgpu_atomfirmware.hamdgpu_atombios.hsoc15_common.hsmu_v11_0.hsmu11_driver_if_navi10.hatom.hnavi10_ppt.hsmu_v11_0_pptable.hsmu_v11_0_ppsmc.hnbio/nbio_2_3_offset.hnbio/nbio_2_3_sh_mask.hthm/thm_11_0_2_offset.hthm/thm_11_0_2_sh_mask.hasic_reg/mp/mp_11_0_sh_mask.hsmu_cmn.hsmu_11_0_cdr_table.h
Detected Declarations
function is_asic_securefunction navi10_init_allowed_featuresfunction navi10_check_bxco_supportfunction navi10_check_powerplay_tablefunction navi10_append_powerplay_tablefunction navi10_store_powerplay_tablefunction navi10_setup_pptablefunction navi10_tables_initfunction navi10_get_legacy_smu_metrics_datafunction navi10_get_smu_metrics_datafunction navi12_get_legacy_smu_metrics_datafunction navi12_get_smu_metrics_datafunction navi1x_get_smu_metrics_datafunction navi10_allocate_dpm_contextfunction navi10_init_smc_tablesfunction navi10_set_default_dpm_tablefunction navi10_dpm_set_vcn_enablefunction navi10_dpm_set_jpeg_enablefunction navi10_get_current_clk_freq_by_tablefunction navi10_is_support_fine_grained_dpmfunction navi10_od_feature_is_supportedfunction navi10_od_setting_get_rangefunction navi10_emit_clk_levelsfunction navi10_force_clk_levelsfunction navi10_populate_umd_state_clkfunction IP_VERSIONfunction IP_VERSIONfunction navi10_get_clock_by_type_with_latencyfunction navi10_pre_display_config_changedfunction navi10_display_config_changedfunction navi10_is_dpm_runningfunction navi10_get_fan_speed_rpmfunction navi10_get_fan_parametersfunction navi10_get_power_profile_modefunction navi10_set_power_profile_mode_coefffunction navi10_set_power_profile_modefunction navi10_notify_smc_display_configfunction navi10_set_watermarks_tablefunction navi10_read_sensorfunction navi10_get_uclk_dpm_statesfunction navi10_get_thermal_temperature_rangefunction navi10_display_disable_memory_clock_switchfunction navi10_get_power_limitfunction navi10_update_pcie_parametersfunction navi10_dump_od_tablefunction navi10_od_setting_check_rangefunction navi10_overdrive_get_gfx_clk_base_voltagefunction navi10_baco_enter
Annotated Snippet
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT)) {
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 1, NULL);
if (ret)
return ret;
}
} else {
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT)) {
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PowerDownVcn, NULL);
if (ret)
return ret;
}
}
return ret;
}
static int navi10_dpm_set_jpeg_enable(struct smu_context *smu, bool enable)
{
int ret = 0;
if (enable) {
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_JPEG_PG_BIT)) {
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PowerUpJpeg, NULL);
if (ret)
return ret;
}
} else {
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_JPEG_PG_BIT)) {
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PowerDownJpeg, NULL);
if (ret)
return ret;
}
}
return ret;
}
static int navi10_get_current_clk_freq_by_table(struct smu_context *smu,
enum smu_clk_type clk_type,
uint32_t *value)
{
MetricsMember_t member_type;
int clk_id = 0;
clk_id = smu_cmn_to_asic_specific_index(smu,
CMN2ASIC_MAPPING_CLK,
clk_type);
if (clk_id < 0)
return clk_id;
switch (clk_id) {
case PPCLK_GFXCLK:
member_type = METRICS_CURR_GFXCLK;
break;
case PPCLK_UCLK:
member_type = METRICS_CURR_UCLK;
break;
case PPCLK_SOCCLK:
member_type = METRICS_CURR_SOCCLK;
break;
case PPCLK_VCLK:
member_type = METRICS_CURR_VCLK;
break;
case PPCLK_DCLK:
member_type = METRICS_CURR_DCLK;
break;
case PPCLK_DCEFCLK:
member_type = METRICS_CURR_DCEFCLK;
break;
default:
return -EINVAL;
}
return navi1x_get_smu_metrics_data(smu,
member_type,
value);
}
static int navi10_is_support_fine_grained_dpm(struct smu_context *smu, enum smu_clk_type clk_type)
{
PPTable_t *pptable = smu->smu_table.driver_pptable;
DpmDescriptor_t *dpm_desc = NULL;
int clk_index = 0;
clk_index = smu_cmn_to_asic_specific_index(smu,
CMN2ASIC_MAPPING_CLK,
clk_type);
if (clk_index < 0)
return clk_index;
Annotation
- Immediate include surface: `linux/firmware.h`, `linux/pci.h`, `linux/i2c.h`, `amdgpu.h`, `amdgpu_dpm.h`, `amdgpu_smu.h`, `atomfirmware.h`, `amdgpu_atomfirmware.h`.
- Detected declarations: `function is_asic_secure`, `function navi10_init_allowed_features`, `function navi10_check_bxco_support`, `function navi10_check_powerplay_table`, `function navi10_append_powerplay_table`, `function navi10_store_powerplay_table`, `function navi10_setup_pptable`, `function navi10_tables_init`, `function navi10_get_legacy_smu_metrics_data`, `function navi10_get_smu_metrics_data`.
- 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.