drm/amd/powerplay: simplify the code around setting power limit
authorEvan Quan <evan.quan@amd.com>
Mon, 8 Jun 2020 08:47:59 +0000 (16:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:18 +0000 (01:59 -0400)
commit5213e49df397e6056c30b368e2f986950f0b4bbb
tree6b78bd328af3d0fdc571553b29af00d23e61d661
parenta141b4e3c722c1c0f72177e258f2cb591949018b
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>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
drivers/gpu/drm/amd/powerplay/smu_v11_0.c