]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/pm: Delete non-functional SMU8 get_dal_power_level implementation
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 19 May 2026 10:21:15 +0000 (12:21 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 May 2026 14:45:09 +0000 (10:45 -0400)
This function was effectively a no-op because it always
returned the maximum possible power level, because the
maximum voltage is in millivolts while the dependency
table didn't contain actual voltages.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c

index 5ad6ab3d2d375918a0df12264a9185651aa9fa4f..7034041cef73ceda26d8080a1a1f9026b44db31d 100644 (file)
@@ -1521,27 +1521,6 @@ static int smu8_store_cc6_data(struct pp_hwmgr *hwmgr, uint32_t separation_time,
        return 0;
 }
 
-static int smu8_get_dal_power_level(struct pp_hwmgr *hwmgr,
-               struct amd_pp_simple_clock_info *info)
-{
-       uint32_t i;
-       const struct phm_clock_voltage_dependency_table *table =
-                       hwmgr->dyn_state.vddc_dep_on_dal_pwrl;
-       const struct phm_clock_and_voltage_limits *limits =
-                       &hwmgr->dyn_state.max_clock_voltage_on_ac;
-
-       info->engine_max_clock = limits->sclk;
-       info->memory_max_clock = limits->mclk;
-
-       for (i = table->count - 1; i > 0; i--) {
-               if (limits->vddc >= table->entries[i].v) {
-                       info->level = table->entries[i].clk;
-                       return 0;
-               }
-       }
-       return -EINVAL;
-}
-
 static int smu8_force_clock_level(struct pp_hwmgr *hwmgr,
                enum pp_clock_type type, uint32_t mask)
 {
@@ -2062,7 +2041,6 @@ static const struct pp_hwmgr_func smu8_hwmgr_funcs = {
        .store_cc6_data = smu8_store_cc6_data,
        .force_clock_level = smu8_force_clock_level,
        .emit_clock_levels = smu8_emit_clock_levels,
-       .get_dal_power_level = smu8_get_dal_power_level,
        .get_performance_level = smu8_get_performance_level,
        .get_current_shallow_sleep_clocks = smu8_get_current_shallow_sleep_clocks,
        .get_clock_by_type = smu8_get_clock_by_type,