]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reject excessive dotclocks early
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 27 Sep 2022 18:24:55 +0000 (21:24 +0300)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 3 Oct 2022 16:55:32 +0000 (17:55 +0100)
commitcd4afd8e4f7e94c06ebbc296a66cd9eef407a30f
tree5b06955c9306a8d2c30ddcbe95645a94ec7c738b
parent62d6c31451912353b13ee3e3b254c19eac9a0f88
drm/i915: Reject excessive dotclocks early

Make sure modes with crazy big dotclocks are rejected early,
so as to not cause problems for subsequent code via integer
overflows and whatnot.

These would eventually be rejected in intel_crtc_compute_pipe_mode()
but that is now too late as we do the clock computations a bit
earlier than that. And we don't want to just reorder the two since
we still want to check the final computed dotclock against the
hardware limit to make sure we didn't end up above the limit due
to rounding/etc.

Fixes: f8c9252309ac ("drm/i915: Compute clocks earlier")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220927182455.3422-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit df2f59c5857b56a5cc40b6562b032c5d8d50cdfc)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/display/intel_display.c