Skip to content

Commit 4c83d45

Browse files
Dr. David Alan Gilbertalexdeucher
authored andcommitted
drm/amd/pm/smu13: Remove unused smu_v3 functions
smu_v13_0_display_clock_voltage_request() and smu_v13_0_set_min_deep_sleep_dcefclk() were added in 2020 by commit c05d1c4 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)") but have remained unused. Remove them. smu_v13_0_display_clock_voltage_request() was the only user of smu_v13_0_set_hard_freq_limited_range(). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2c599d6 commit 4c83d45

File tree

2 files changed

+0
-113
lines changed

2 files changed

+0
-113
lines changed

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,6 @@ int smu_v13_0_disable_thermal_alert(struct smu_context *smu);
184184

185185
int smu_v13_0_get_gfx_vdd(struct smu_context *smu, uint32_t *value);
186186

187-
int smu_v13_0_set_min_deep_sleep_dcefclk(struct smu_context *smu, uint32_t clk);
188-
189-
int
190-
smu_v13_0_display_clock_voltage_request(struct smu_context *smu,
191-
struct pp_display_clock_request
192-
*clock_req);
193-
194187
uint32_t
195188
smu_v13_0_get_fan_control_mode(struct smu_context *smu);
196189

@@ -227,11 +220,6 @@ int smu_v13_0_get_dpm_ultimate_freq(struct smu_context *smu, enum smu_clk_type c
227220
int smu_v13_0_set_soft_freq_limited_range(struct smu_context *smu, enum smu_clk_type clk_type,
228221
uint32_t min, uint32_t max, bool automatic);
229222

230-
int smu_v13_0_set_hard_freq_limited_range(struct smu_context *smu,
231-
enum smu_clk_type clk_type,
232-
uint32_t min,
233-
uint32_t max);
234-
235223
int smu_v13_0_set_performance_level(struct smu_context *smu,
236224
enum amd_dpm_forced_level level);
237225

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -709,18 +709,6 @@ int smu_v13_0_notify_memory_pool_location(struct smu_context *smu)
709709
return ret;
710710
}
711711

712-
int smu_v13_0_set_min_deep_sleep_dcefclk(struct smu_context *smu, uint32_t clk)
713-
{
714-
int ret;
715-
716-
ret = smu_cmn_send_smc_msg_with_param(smu,
717-
SMU_MSG_SetMinDeepSleepDcefclk, clk, NULL);
718-
if (ret)
719-
dev_err(smu->adev->dev, "SMU13 attempt to set divider for DCEFCLK Failed!");
720-
721-
return ret;
722-
}
723-
724712
int smu_v13_0_set_driver_table_location(struct smu_context *smu)
725713
{
726714
struct smu_table *driver_table = &smu->smu_table.driver_table;
@@ -1073,56 +1061,6 @@ int smu_v13_0_get_gfx_vdd(struct smu_context *smu, uint32_t *value)
10731061

10741062
}
10751063

1076-
int
1077-
smu_v13_0_display_clock_voltage_request(struct smu_context *smu,
1078-
struct pp_display_clock_request
1079-
*clock_req)
1080-
{
1081-
enum amd_pp_clock_type clk_type = clock_req->clock_type;
1082-
int ret = 0;
1083-
enum smu_clk_type clk_select = 0;
1084-
uint32_t clk_freq = clock_req->clock_freq_in_khz / 1000;
1085-
1086-
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_DCEFCLK_BIT) ||
1087-
smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_UCLK_BIT)) {
1088-
switch (clk_type) {
1089-
case amd_pp_dcef_clock:
1090-
clk_select = SMU_DCEFCLK;
1091-
break;
1092-
case amd_pp_disp_clock:
1093-
clk_select = SMU_DISPCLK;
1094-
break;
1095-
case amd_pp_pixel_clock:
1096-
clk_select = SMU_PIXCLK;
1097-
break;
1098-
case amd_pp_phy_clock:
1099-
clk_select = SMU_PHYCLK;
1100-
break;
1101-
case amd_pp_mem_clock:
1102-
clk_select = SMU_UCLK;
1103-
break;
1104-
default:
1105-
dev_info(smu->adev->dev, "[%s] Invalid Clock Type!", __func__);
1106-
ret = -EINVAL;
1107-
break;
1108-
}
1109-
1110-
if (ret)
1111-
goto failed;
1112-
1113-
if (clk_select == SMU_UCLK && smu->disable_uclk_switch)
1114-
return 0;
1115-
1116-
ret = smu_v13_0_set_hard_freq_limited_range(smu, clk_select, clk_freq, 0);
1117-
1118-
if (clk_select == SMU_UCLK)
1119-
smu->hard_min_uclk_req_from_dal = clk_freq;
1120-
}
1121-
1122-
failed:
1123-
return ret;
1124-
}
1125-
11261064
uint32_t smu_v13_0_get_fan_control_mode(struct smu_context *smu)
11271065
{
11281066
if (!smu_cmn_feature_is_enabled(smu, SMU_FEATURE_FAN_CONTROL_BIT))
@@ -1647,45 +1585,6 @@ int smu_v13_0_set_soft_freq_limited_range(struct smu_context *smu,
16471585
return ret;
16481586
}
16491587

1650-
int smu_v13_0_set_hard_freq_limited_range(struct smu_context *smu,
1651-
enum smu_clk_type clk_type,
1652-
uint32_t min,
1653-
uint32_t max)
1654-
{
1655-
int ret = 0, clk_id = 0;
1656-
uint32_t param;
1657-
1658-
if (min <= 0 && max <= 0)
1659-
return -EINVAL;
1660-
1661-
if (!smu_cmn_clk_dpm_is_enabled(smu, clk_type))
1662-
return 0;
1663-
1664-
clk_id = smu_cmn_to_asic_specific_index(smu,
1665-
CMN2ASIC_MAPPING_CLK,
1666-
clk_type);
1667-
if (clk_id < 0)
1668-
return clk_id;
1669-
1670-
if (max > 0) {
1671-
param = (uint32_t)((clk_id << 16) | (max & 0xffff));
1672-
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetHardMaxByFreq,
1673-
param, NULL);
1674-
if (ret)
1675-
return ret;
1676-
}
1677-
1678-
if (min > 0) {
1679-
param = (uint32_t)((clk_id << 16) | (min & 0xffff));
1680-
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetHardMinByFreq,
1681-
param, NULL);
1682-
if (ret)
1683-
return ret;
1684-
}
1685-
1686-
return ret;
1687-
}
1688-
16891588
int smu_v13_0_set_performance_level(struct smu_context *smu,
16901589
enum amd_dpm_forced_level level)
16911590
{

0 commit comments

Comments
 (0)