diff options
author | Nils Wallménius <nils.wallmenius@gmail.com> | 2016-05-05 09:07:46 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 12:31:23 -0400 |
commit | 9887e425f91b063d68ee1fbec76dea15d6a82085 (patch) | |
tree | afc09c764d8a74ba359a207d9d87099a1318cb84 /drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | |
parent | 859b8b6a27eb6f22d082282f5fd234d6323f849d (diff) | |
download | op-kernel-dev-9887e425f91b063d68ee1fbec76dea15d6a82085.zip op-kernel-dev-9887e425f91b063d68ee1fbec76dea15d6a82085.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c index c574afd..9847e20 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c @@ -1903,8 +1903,7 @@ static uint8_t fiji_get_sleep_divider_id_from_clock(struct pp_hwmgr *hwmgr, { uint8_t i; uint32_t temp; - uint32_t min = clock_insr > FIJI_MINIMUM_ENGINE_CLOCK ? - clock_insr : FIJI_MINIMUM_ENGINE_CLOCK; + uint32_t min = max(clock_insr, (uint32_t)FIJI_MINIMUM_ENGINE_CLOCK); PP_ASSERT_WITH_CODE((clock >= min), "Engine clock can't satisfy stutter requirement!", return 0); for (i = FIJI_MAX_DEEPSLEEP_DIVIDER_ID; ; i--) { |