Commit ca709397 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Fix 64-bit division

Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 71f7256e
...@@ -94,7 +94,7 @@ static unsigned int get_current_backlight(struct dce_abm *abm_dce) ...@@ -94,7 +94,7 @@ static unsigned int get_current_backlight(struct dce_abm *abm_dce)
if (bl_period == 0) if (bl_period == 0)
bl_period = 0xFFFF; bl_period = 0xFFFF;
current_backlight /= bl_period; current_backlight = div_u64(current_backlight, bl_period);
current_backlight = (current_backlight + 1) >> 1; current_backlight = (current_backlight + 1) >> 1;
current_backlight = (uint64_t)(current_backlight) * bl_period; current_backlight = (uint64_t)(current_backlight) * bl_period;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment