drm/amd/pm: Add xgmi plpd policy to pm_policy

Add support to set XGMI PLPD policy levels through 'pm_policy/xgmi_plpd'
sysfs node.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Lijo Lazar 2024-05-16 13:49:11 +05:30 committed by Alex Deucher
parent e07c5a35d1
commit 83b90b138b
3 changed files with 4 additions and 0 deletions

View File

@ -276,6 +276,7 @@ enum pp_xgmi_plpd_mode {
enum pp_pm_policy {
PP_PM_POLICY_NONE = -1,
PP_PM_POLICY_SOC_PSTATE = 0,
PP_PM_POLICY_XGMI_PLPD,
PP_PM_POLICY_NUM,
};

View File

@ -2373,9 +2373,11 @@ static ssize_t amdgpu_set_pm_policy_attr(struct device *dev,
#define AMDGPU_PM_POLICY_ATTR_VAR(_name) pm_policy_attr_##_name.dev_attr.attr
AMDGPU_PM_POLICY_ATTR(soc_pstate, SOC_PSTATE)
AMDGPU_PM_POLICY_ATTR(xgmi_plpd, XGMI_PLPD)
static struct attribute *pm_policy_attrs[] = {
&AMDGPU_PM_POLICY_ATTR_VAR(soc_pstate),
&AMDGPU_PM_POLICY_ATTR_VAR(xgmi_plpd),
NULL
};

View File

@ -1574,6 +1574,7 @@ typedef struct {
} WifiBandEntryTable_t;
#define STR_SOC_PSTATE_POLICY "soc_pstate"
#define STR_XGMI_PLPD_POLICY "xgmi_plpd"
struct smu_dpm_policy *smu_get_pm_policy(struct smu_context *smu,
enum pp_pm_policy p_type);