Commit d3e80f2d authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Switch intel_usecs_to_scanlines() to 64bit maths

Dotclocks can reach ~1GHz these days, so intel_usecs_to_scanlines(),
with its 32bit maths, is currently limited to a few milliseconds.
I want bigger numbers in DSB selftests, so switch over to 64bit
maths.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-7-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 5b7f65ac
...@@ -454,7 +454,7 @@ int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode, ...@@ -454,7 +454,7 @@ int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
if (!adjusted_mode->crtc_htotal) if (!adjusted_mode->crtc_htotal)
return 1; return 1;
return DIV_ROUND_UP(usecs * adjusted_mode->crtc_clock, return DIV_ROUND_UP_ULL(mul_u32_u32(usecs, adjusted_mode->crtc_clock),
1000 * adjusted_mode->crtc_htotal); 1000 * adjusted_mode->crtc_htotal);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment