drm/amd/pm: add plpd_mode in smu_context to indicate current mode
authorLe Ma <le.ma@amd.com>
Tue, 29 Aug 2023 11:38:48 +0000 (19:38 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2023 21:00:23 +0000 (17:00 -0400)
Add enum pp_xgmi_plpd_mode to describe PLPD policies.

v2: move the enum from amdgpu_smu.h to kgd_pp_interface.h

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/kgd_pp_interface.h
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h

index 5a889f733462c6eed832e9130cb49771789ded4c..e0bb6d39f0c3a0c012744d2d02eeb788210c32bf 100644 (file)
@@ -265,6 +265,14 @@ enum pp_power_type
        PP_PWR_TYPE_FAST,
 };
 
+enum pp_xgmi_plpd_mode {
+       XGMI_PLPD_NONE = -1,
+       XGMI_PLPD_DISALLOW,
+       XGMI_PLPD_DEFAULT,
+       XGMI_PLPD_OPTIMIZED,
+       XGMI_PLPD_COUNT,
+};
+
 #define PP_GROUP_MASK        0xF0000000
 #define PP_GROUP_SHIFT       28
 
index 5a52098bcf1664c52fb8f9191d18919bb26da55c..5356b91c62927af4f598296fa52afe620e56fa2c 100644 (file)
@@ -563,6 +563,8 @@ struct smu_context {
        u32 debug_resp_reg;
 
        struct delayed_work             swctf_delayed_work;
+
+       enum pp_xgmi_plpd_mode plpd_mode;
 };
 
 struct i2c_adapter;