drm/amd/pm: Add support for DPM policies

Add support to set/get information about different DPM policies. The
support is only available on SOCs which use swsmu architecture.

A DPM policy type may be defined with different levels. For example, a
policy may be defined to select Pstate preference and then later a
pstate preference may be chosen.

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-02-21 14:54:49 +05:30
committed by Alex Deucher
parent f6bce954f4
commit 4d154b1ca5
6 changed files with 315 additions and 0 deletions

View File

@@ -273,6 +273,22 @@ enum pp_xgmi_plpd_mode {
XGMI_PLPD_COUNT,
};
enum pp_pm_policy {
PP_PM_POLICY_NONE = -1,
PP_PM_POLICY_SOC_PSTATE = 0,
PP_PM_POLICY_NUM,
};
enum pp_policy_soc_pstate {
SOC_PSTATE_DEFAULT = 0,
SOC_PSTATE_0,
SOC_PSTATE_1,
SOC_PSTATE_2,
SOC_PSTAT_COUNT,
};
#define PP_POLICY_MAX_LEVELS 5
#define PP_GROUP_MASK 0xF0000000
#define PP_GROUP_SHIFT 28