mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/amd/display: Fix 64-bit division
Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
71f7256e41
commit
ca709397b5
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ static unsigned int get_current_backlight(struct dce_abm *abm_dce)
|
|||
if (bl_period == 0)
|
||||
bl_period = 0xFFFF;
|
||||
|
||||
current_backlight /= bl_period;
|
||||
current_backlight = div_u64(current_backlight, bl_period);
|
||||
current_backlight = (current_backlight + 1) >> 1;
|
||||
|
||||
current_backlight = (uint64_t)(current_backlight) * bl_period;
|
||||
|
|
Loading…
Add table
Reference in a new issue