aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/smu_internal.h
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-06-08 16:41:16 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-01 01:59:18 -0400
commita141b4e3c722c1c0f72177e258f2cb591949018b (patch)
tree10105ad4438d1545968812b9d15b8b4d430e0d71 /drivers/gpu/drm/amd/powerplay/smu_internal.h
parentdrm/amd/powerplay: maximize code sharing around power limit (diff)
downloadlinux-dev-a141b4e3c722c1c0f72177e258f2cb591949018b.tar.xz
linux-dev-a141b4e3c722c1c0f72177e258f2cb591949018b.zip
drm/amd/powerplay: simplify the code around retrieving power limit
Use the cached max/current power limit for other cases except .late_init. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_internal.h')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smu_internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_internal.h b/drivers/gpu/drm/amd/powerplay/smu_internal.h
index 9c68c6c43f9d..346aea9198e9 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_internal.h
+++ b/drivers/gpu/drm/amd/powerplay/smu_internal.h
@@ -213,4 +213,7 @@ static inline int smu_send_smc_msg(struct smu_context *smu, enum smu_message_typ
#define smu_log_thermal_throttling(smu) \
((smu)->ppt_funcs->log_thermal_throttling_event ? (smu)->ppt_funcs->log_thermal_throttling_event((smu)) : 0)
+#define smu_get_asic_power_limits(smu) \
+ ((smu)->ppt_funcs->get_power_limit ? (smu)->ppt_funcs->get_power_limit((smu)) : 0)
+
#endif