diff options
author | Lijo Lazar <[email protected]> | 2024-03-04 18:55:27 +0530 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2024-05-17 17:40:39 -0400 |
commit | 546e6309d14cfdc584b92eb6f2274618e629b3f5 (patch) | |
tree | 2700e9975de8668163789229d64df95b69d76982 /drivers/gpu/drm/amd/pm/amdgpu_dpm.c | |
parent | 5d6f66b542a6a6f8b0c5b4698fefe0f7fd5e065a (diff) |
drm/amd/pm: Remove legacy interface for xgmi plpd
Replace the legacy interface with amdgpu_dpm_set_pm_policy to set XGMI
PLPD mode. Also, xgmi_plpd_policy sysfs node is not used by any client.
Remove that as well.
Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_dpm.c')
-rw-r--r-- | drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c index 9c991362b398..b3b5e7b74c85 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_dpm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_dpm.c @@ -368,49 +368,6 @@ int amdgpu_dpm_set_df_cstate(struct amdgpu_device *adev, return ret; } -int amdgpu_dpm_get_xgmi_plpd_mode(struct amdgpu_device *adev, char **mode_desc) -{ - struct smu_context *smu = adev->powerplay.pp_handle; - int mode = XGMI_PLPD_NONE; - - if (is_support_sw_smu(adev)) { - mode = smu->plpd_mode; - if (mode_desc == NULL) - return mode; - switch (smu->plpd_mode) { - case XGMI_PLPD_DISALLOW: - *mode_desc = "disallow"; - break; - case XGMI_PLPD_DEFAULT: - *mode_desc = "default"; - break; - case XGMI_PLPD_OPTIMIZED: - *mode_desc = "optimized"; - break; - case XGMI_PLPD_NONE: - default: - *mode_desc = "none"; - break; - } - } - - return mode; -} - -int amdgpu_dpm_set_xgmi_plpd_mode(struct amdgpu_device *adev, int mode) -{ - struct smu_context *smu = adev->powerplay.pp_handle; - int ret = -EOPNOTSUPP; - - if (is_support_sw_smu(adev)) { - mutex_lock(&adev->pm.mutex); - ret = smu_set_xgmi_plpd_mode(smu, mode); - mutex_unlock(&adev->pm.mutex); - } - - return ret; -} - ssize_t amdgpu_dpm_get_pm_policy_info(struct amdgpu_device *adev, enum pp_pm_policy p_type, char *buf) { |