]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915: Simplify scanline_offset handling for gen2
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 28 May 2024 18:56:44 +0000 (21:56 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 31 May 2024 10:43:15 +0000 (13:43 +0300)
commit5316dd0d617bb98956f75cb33982efe1b26d8f19
treee07884fcee48ca7a15df3847e4258c51eefb0a5b
parent9677dd01ca1ada359f22cd129ccaeab9cd383567
drm/i915: Simplify scanline_offset handling for gen2

Currently intel_crtc_scanline_offset() is careful to always
return a positive offset. That is not actually necessary
as long as we take care of negative values when applying the
offset in __intel_get_crtc_scanline().

This simplifies intel_crtc_scanline_offset(), and makes
the scanline_offfset arithmetic more symmetric between
the forward (__intel_get_crtc_scanline()) and reverse
(intel_crtc_scanline_to_hw()) directions.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240528185647.7765-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_vblank.c