drm/amd/powerplay: simplify the code around setting power limit

Use the cached max/current power limit and move the input check
to the top layer.

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>
This commit is contained in:
Evan Quan 2020-06-08 16:47:59 +08:00 • committed by Alex Deucher
commit 5213e49df3
2 changed files with 13 additions and 14 deletions