From: Harry Wentland Date: Mon, 6 Feb 2017 16:23:20 +0000 (-0500) Subject: drm/amd/display: Fix 64-bit division X-Git-Tag: v5.15~9960^2~23^2~724 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca709397b5bf904ef04eb981d3b50e8e93c15394;p=platform%2Fkernel%2Flinux-starfive.git drm/amd/display: Fix 64-bit division Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c index f4696bf..7005ebb 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c @@ -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;