diff options
author | Nils Wallménius <nils.wallmenius@gmail.com> | 2016-05-05 03:07:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 12:31:23 -0400 |
commit | 354ef928a0e67166249c0136cdba21fdfef31702 (patch) | |
tree | 4e336d646b7a8e2d02e48ffb795651f676b270e1 /drivers/gpu/drm/amd/amdgpu/ci_dpm.c | |
parent | 9887e425f91b063d68ee1fbec76dea15d6a82085 (diff) |
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/amdgpu/ci_dpm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c index 4d50c43c0939..b2c2f3761c68 100644 --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c | |||
@@ -2560,7 +2560,7 @@ static u8 ci_get_sleep_divider_id_from_clock(struct amdgpu_device *adev, | |||
2560 | return 0; | 2560 | return 0; |
2561 | 2561 | ||
2562 | for (i = CISLAND_MAX_DEEPSLEEP_DIVIDER_ID; ; i--) { | 2562 | for (i = CISLAND_MAX_DEEPSLEEP_DIVIDER_ID; ; i--) { |
2563 | tmp = sclk / (1 << i); | 2563 | tmp = sclk >> i; |
2564 | if (tmp >= min || i == 0) | 2564 | if (tmp >= min || i == 0) |
2565 | break; | 2565 | break; |
2566 | } | 2566 | } |