summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-06-08 17:04:04 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-01 01:59:18 -0400
commit4cb738ab7853c66ca563246cc8b74ac7e88e02d2 (patch)
tree2d46b493c2c3c2f4cb983aa44df9ca73b8ece463 /drivers/gpu/drm/amd/powerplay/navi10_ppt.c
parent5213e49df397e6056c30b368e2f986950f0b4bbb (diff)
drm/amd/powerplay: drop unused code around power limit
Drop unused APIs, variables and argument. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/navi10_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/navi10_ppt.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 2e0836976001..186cdf6696f8 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -1916,12 +1916,6 @@ static int navi10_display_disable_memory_clock_switch(struct smu_context *smu,
return ret;
}
-static uint32_t navi10_get_pptable_power_limit(struct smu_context *smu)
-{
- PPTable_t *pptable = smu->smu_table.driver_pptable;
- return pptable->SocketPowerLimitAc[PPT_THROTTLER_PPT0];
-}
-
static int navi10_get_power_limit(struct smu_context *smu)
{
struct smu_11_0_powerplay_table *powerplay_table =
@@ -2380,33 +2374,6 @@ static int navi10_set_thermal_range(struct smu_context *smu,
return 0;
}
-static uint32_t navi10_get_max_power_limit(struct smu_context *smu) {
- uint32_t od_limit, max_power_limit;
- struct smu_11_0_powerplay_table *powerplay_table = NULL;
- struct smu_table_context *table_context = &smu->smu_table;
- powerplay_table = table_context->power_play_table;
-
- max_power_limit = navi10_get_pptable_power_limit(smu);
-
- if (!max_power_limit) {
- // If we couldn't get the table limit, fall back on first-read value
- if (!smu->default_power_limit)
- smu->default_power_limit = smu->power_limit;
- max_power_limit = smu->default_power_limit;
- }
-
- if (smu->od_enabled) {
- od_limit = le32_to_cpu(powerplay_table->overdrive_table.max[SMU_11_0_ODSETTING_POWERPERCENTAGE]);
-
- dev_dbg(smu->adev->dev, "ODSETTING_POWERPERCENTAGE: %d (default: %d)\n", od_limit, smu->default_power_limit);
-
- max_power_limit *= (100 + od_limit);
- max_power_limit /= 100;
- }
-
- return max_power_limit;
-}
-
static const struct pptable_funcs navi10_ppt_funcs = {
.tables_init = navi10_tables_init,
.alloc_dpm_context = navi10_allocate_dpm_context,
@@ -2497,7 +2464,6 @@ static const struct pptable_funcs navi10_ppt_funcs = {
.disable_umc_cdr_12gbps_workaround = navi10_disable_umc_cdr_12gbps_workaround,
.set_power_source = smu_v11_0_set_power_source,
.set_thermal_range = navi10_set_thermal_range,
- .get_max_power_limit = navi10_get_max_power_limit,
};
void navi10_set_ppt_funcs(struct smu_context *smu)