aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuru Das Srinagesh <[email protected]>2020-06-02 15:31:05 -0700
committerThierry Reding <[email protected]>2020-06-16 11:16:07 +0200
commit899c537c25f9547a0f591ed2013be0f9f68f2df3 (patch)
tree2732f527c0abf37cb0f7d91245c2b71ac5f11df1
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff)
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]>
-rw-r--r--drivers/gpu/drm/i915/display/intel_panel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index 3c5056dbf607..31cb285e8b38 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -1929,7 +1929,7 @@ static int pwm_setup_backlight(struct intel_connector *connector,
return retval;
}
- level = DIV_ROUND_UP(pwm_get_duty_cycle(panel->backlight.pwm) * 100,
+ level = DIV_ROUND_UP_ULL(pwm_get_duty_cycle(panel->backlight.pwm) * 100,
CRC_PMIC_PWM_PERIOD_NS);
panel->backlight.level =
intel_panel_compute_brightness(connector, level);