summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
diff options
context:
space:
mode:
authorKevin Wang <kevin1.wang@amd.com>2019-07-25 11:57:25 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-07-30 23:48:32 -0500
commit26dd668155b24eb24401aed9d73e2f9c7b694ea6 (patch)
tree6d51b980c1cbf14b111ea61372f0c2eaf4997846 /drivers/gpu/drm/amd/powerplay/smu_v11_0.c
parentcb33363d0e85341c8781d9095341a981ab410a80 (diff)
drm/amd/powerplay: move smu_feature_update_enable_state to up level
this function is not ip or asic related function, so move it to top level as public api in smu. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_v11_0.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smu_v11_0.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index a6398cf961f7..be93b3b9fd58 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -798,44 +798,6 @@ static int smu_v11_0_init_display_count(struct smu_context *smu, uint32_t count)
return ret;
}
-static int smu_v11_0_update_feature_enable_state(struct smu_context *smu, uint32_t feature_id, bool enabled)
-{
- uint32_t feature_low = 0, feature_high = 0;
- int ret = 0;
-
- if (!smu->pm_enabled)
- return ret;
- if (feature_id >= 0 && feature_id < 31)
- feature_low = (1 << feature_id);
- else if (feature_id > 31 && feature_id < 63)
- feature_high = (1 << feature_id);
- else
- return -EINVAL;
-
- if (enabled) {
- ret = smu_send_smc_msg_with_param(smu, SMU_MSG_EnableSmuFeaturesLow,
- feature_low);
- if (ret)
- return ret;
- ret = smu_send_smc_msg_with_param(smu, SMU_MSG_EnableSmuFeaturesHigh,
- feature_high);
- if (ret)
- return ret;
-
- } else {
- ret = smu_send_smc_msg_with_param(smu, SMU_MSG_DisableSmuFeaturesLow,
- feature_low);
- if (ret)
- return ret;
- ret = smu_send_smc_msg_with_param(smu, SMU_MSG_DisableSmuFeaturesHigh,
- feature_high);
- if (ret)
- return ret;
-
- }
-
- return ret;
-}
static int smu_v11_0_set_allowed_mask(struct smu_context *smu)
{
@@ -1783,7 +1745,6 @@ static const struct smu_funcs smu_v11_0_funcs = {
.set_allowed_mask = smu_v11_0_set_allowed_mask,
.get_enabled_mask = smu_v11_0_get_enabled_mask,
.system_features_control = smu_v11_0_system_features_control,
- .update_feature_enable_state = smu_v11_0_update_feature_enable_state,
.notify_display_change = smu_v11_0_notify_display_change,
.get_power_limit = smu_v11_0_get_power_limit,
.set_power_limit = smu_v11_0_set_power_limit,