drm/amdgpu: Use max macro in *get_sleep_divider_id_from_clock
Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
859b8b6a27
commit
9887e425f9
@@ -2554,8 +2554,7 @@ static u8 ci_get_sleep_divider_id_from_clock(struct amdgpu_device *adev,
|
||||
{
|
||||
u32 i;
|
||||
u32 tmp;
|
||||
u32 min = (min_sclk_in_sr > CISLAND_MINIMUM_ENGINE_CLOCK) ?
|
||||
min_sclk_in_sr : CISLAND_MINIMUM_ENGINE_CLOCK;
|
||||
u32 min = max(min_sclk_in_sr, (u32)CISLAND_MINIMUM_ENGINE_CLOCK);
|
||||
|
||||
if (sclk < min)
|
||||
return 0;
|
||||
|
@@ -2176,8 +2176,7 @@ static u8 kv_get_sleep_divider_id_from_clock(struct amdgpu_device *adev,
|
||||
struct kv_power_info *pi = kv_get_pi(adev);
|
||||
u32 i;
|
||||
u32 temp;
|
||||
u32 min = (min_sclk_in_sr > KV_MINIMUM_ENGINE_CLOCK) ?
|
||||
min_sclk_in_sr : KV_MINIMUM_ENGINE_CLOCK;
|
||||
u32 min = max(min_sclk_in_sr, (u32)KV_MINIMUM_ENGINE_CLOCK);
|
||||
|
||||
if (sclk < min)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user