]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/dsb: Introduce intel_dsb_wait_scanline_{in,out}()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 24 Jun 2024 19:10:27 +0000 (22:10 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 29 Aug 2024 11:54:03 +0000 (14:54 +0300)
commit2039809783d630c1022bb3debe648abced7861c4
tree9f8a666ad0712b6119cc699d0f0e51a543adffca
parent8d5ac8efb6d94efda53f604fd9c072b4754a3d85
drm/i915/dsb: Introduce intel_dsb_wait_scanline_{in,out}()

Add functions to emit a DSB scanline window wait instructions.
We can either wait for the scanline to be IN the window
or OUT of the window.

The hardware doesn't handle wraparound so we must manually
deal with it by swapping the IN range to the inverse OUT
range, or vice versa.

Also add a bit of paranoia to catch the edge case of waiting
for the entire frame. That doesn't make sense since an IN
wait would be a nop, and an OUT wait would imply waiting
forever. Most of the time this also results in both scanline
ranges (original and inverted) to have lower=upper+1
which is nonsense from the hw POV.

For now we are only handling the case where the scanline wait
happens prior to latching the double buffered registers during
the commit (which might change the timings due to LRR/VRR/etc.)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240624191032.27333-10-ville.syrjala@linux.intel.com
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
drivers/gpu/drm/i915/display/intel_dsb.c
drivers/gpu/drm/i915/display/intel_dsb.h