From: Mitul Golani Date: Fri, 21 Jun 2024 07:34:54 +0000 (+0530) Subject: drm/i915/display: Consider adjusted_pixel_rate to be u64 X-Git-Tag: v6.11-rc1~141^2~2^2~2^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=213cc30331e9e8c92458c57a9565efc47933f34b;p=thirdparty%2Flinux.git drm/i915/display: Consider adjusted_pixel_rate to be u64 Consider adjusted_pixel_rate to be a u64 to match the return type of mul_u32_u32() and avoid any compiler dependency for do_div. Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") Cc: Mitul Golani Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Nathan Chancellor Cc: intel-xe@lists.freedesktop.org Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/r/20240619154207.GA1125704@thelio-3990X Signed-off-by: Mitul Golani Reviewed-by: Rodrigo Vivi Signed-off-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240621073454.1421676-1-mitulkumar.ajitkumar.golani@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 6430da25957dd..5a0da64c7db33 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -137,7 +137,7 @@ static unsigned int cmrr_get_vtotal(struct intel_crtc_state *crtc_state, bool video_mode_required) { int multiplier_m = 1, multiplier_n = 1, vtotal, desired_refresh_rate; - long long adjusted_pixel_rate; + u64 adjusted_pixel_rate; struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; desired_refresh_rate = drm_mode_vrefresh(adjusted_mode);