diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2024-06-24 22:10:27 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2024-08-29 14:54:03 +0300 |
commit | 2039809783d630c1022bb3debe648abced7861c4 (patch) | |
tree | 9f8a666ad0712b6119cc699d0f0e51a543adffca /drivers/gpu/drm/i915/display/intel_dsb.h | |
parent | 8d5ac8efb6d94efda53f604fd9c072b4754a3d85 (diff) | |
download | lwn-2039809783d630c1022bb3debe648abced7861c4.tar.gz lwn-2039809783d630c1022bb3debe648abced7861c4.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dsb.h')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dsb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h b/drivers/gpu/drm/i915/display/intel_dsb.h index 84fc2f8434d1..d0737cefb393 100644 --- a/drivers/gpu/drm/i915/display/intel_dsb.h +++ b/drivers/gpu/drm/i915/display/intel_dsb.h @@ -39,6 +39,12 @@ void intel_dsb_reg_write_masked(struct intel_dsb *dsb, void intel_dsb_noop(struct intel_dsb *dsb, int count); void intel_dsb_nonpost_start(struct intel_dsb *dsb); void intel_dsb_nonpost_end(struct intel_dsb *dsb); +void intel_dsb_wait_scanline_in(struct intel_atomic_state *state, + struct intel_dsb *dsb, + int lower, int upper); +void intel_dsb_wait_scanline_out(struct intel_atomic_state *state, + struct intel_dsb *dsb, + int lower, int upper); void intel_dsb_commit(struct intel_dsb *dsb, bool wait_for_vblank); |