drm/i915: Use min() instead of hand rolling it
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 4 Apr 2023 17:54:31 +0000 (20:54 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 13 Apr 2023 18:02:49 +0000 (21:02 +0300)
commite13b3f65af719e79046df2b1da6599eb387752e0
tree67a4f80e4a86e0404f29c62f4a22bc25570d9ebd
parent435db526a68b6454a882eae7a3768c516d4b540e
drm/i915: Use min() instead of hand rolling it

Most places in the vblank code use min() to clamp scanline
counters below vtotal. But we missed one in the gen3/4
pixel counter based codepath.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230404175431.23064-3-ville.syrjala@linux.intel.com
Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
drivers/gpu/drm/i915/display/intel_vblank.c