Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <gurus@codeaurora.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Guru Das Srinagesh and committed by
Thierry Reding
899c537c b3a9e3b9

+1 -1
+1 -1
drivers/gpu/drm/i915/display/intel_panel.c
··· 1929 1929 return retval; 1930 1930 } 1931 1931 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, 1933 1933 CRC_PMIC_PWM_PERIOD_NS); 1934 1934 panel->backlight.level = 1935 1935 intel_panel_compute_brightness(connector, level);