summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
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/arcturus_ppt.c
parent1e239fdd31cdf1729bc1e8b4538bf590bd28de57 (diff)
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/arcturus_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/arcturus_ppt.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
index 2c78271123f7..66b8f143cc46 100644
--- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
@@ -1409,9 +1409,7 @@ arcturus_get_profiling_clk_mask(struct smu_context *smu,
return 0;
}
-static int arcturus_get_power_limit(struct smu_context *smu,
- uint32_t *limit,
- bool cap)
+static int arcturus_get_power_limit(struct smu_context *smu)
{
struct smu_11_0_powerplay_table *powerplay_table =
(struct smu_11_0_powerplay_table *)smu->smu_table.power_play_table;
@@ -1439,8 +1437,6 @@ static int arcturus_get_power_limit(struct smu_context *smu,
}
smu->max_power_limit = power_limit;
- *limit = (cap ? smu->max_power_limit : smu->current_power_limit);
-
return 0;
}