Skip to content

Commit 899c537

Browse files
Guru Das Srinageshthierryreding
authored andcommitted
drm/i915: Use 64-bit division macro
Since the PWM framework is switching struct pwm_state.duty_cycle's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Signed-off-by: Guru Das Srinagesh <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Acked-by: Jani Nikula <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent b3a9e3b commit 899c537

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/display/intel_panel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ static int pwm_setup_backlight(struct intel_connector *connector,
19291929
return retval;
19301930
}
19311931

1932-
level = DIV_ROUND_UP(pwm_get_duty_cycle(panel->backlight.pwm) * 100,
1932+
level = DIV_ROUND_UP_ULL(pwm_get_duty_cycle(panel->backlight.pwm) * 100,
19331933
CRC_PMIC_PWM_PERIOD_NS);
19341934
panel->backlight.level =
19351935
intel_panel_compute_brightness(connector, level);

0 commit comments

Comments
 (0)