From ca709397b5bf904ef04eb981d3b50e8e93c15394 Mon Sep 17 00:00:00 2001 From: Harry Wentland Date: Mon, 6 Feb 2017 11:23:20 -0500 Subject: [PATCH] drm/amd/display: Fix 64-bit division Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f4696bf14a70..7005ebb28d46 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; -- 2.30.2