summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
diff options
context:
space:
mode:
authorNils Wallménius <nils.wallmenius@gmail.com>2016-05-05 09:07:47 +0200
committerAlex Deucher <alexander.deucher@amd.com>2016-05-11 12:31:23 -0400
commit354ef928a0e67166249c0136cdba21fdfef31702 (patch)
tree4e336d646b7a8e2d02e48ffb795651f676b270e1 /drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
parent9887e425f91b063d68ee1fbec76dea15d6a82085 (diff)
downloadop-kernel-dev-354ef928a0e67166249c0136cdba21fdfef31702.zip
op-kernel-dev-354ef928a0e67166249c0136cdba21fdfef31702.tar.gz
drm/amdgpu: Simplify calculation in *get_sleep_divider_id_from_clock
a / (1 << b) is equivalent to a >> b for unsigned values 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/tonga_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
index 8969f1e..13f97708 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
@@ -2426,7 +2426,7 @@ static uint8_t tonga_get_sleep_divider_id_from_clock(struct pp_hwmgr *hwmgr,
"Engine clock can't satisfy stutter requirement!", return 0);
for (i = TONGA_MAX_DEEPSLEEP_DIVIDER_ID;; i--) {
- temp = engine_clock / (1 << i);
+ temp = engine_clock >> i;
if(temp >= min || i == 0)
break;
OpenPOWER on IntegriCloud