]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dsb: Introduce intel_dsb_wait_vblanks()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 30 Sep 2024 17:04:09 +0000 (20:04 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 3 Oct 2024 21:33:13 +0000 (00:33 +0300)
Add a function to emit a DSB wait for vblank instruction. This
just waits until the specified number of vblanks.

Note that this triggers on the transcoder's undelayed vblank,
as opposed to the pipe's delayed vblank.

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

index 3aaed94c7e657f8da881e76f168969a077cdbc71..373e815a7639ff59fd34ada27a45e3a7081fca0a 100644 (file)
@@ -399,6 +399,12 @@ void intel_dsb_wait_usec(struct intel_dsb *dsb, int count)
                       DSB_OPCODE_WAIT_USEC << DSB_OPCODE_SHIFT);
 }
 
+void intel_dsb_wait_vblanks(struct intel_dsb *dsb, int count)
+{
+       intel_dsb_emit(dsb, count,
+                      DSB_OPCODE_WAIT_VBLANKS << DSB_OPCODE_SHIFT);
+}
+
 static void intel_dsb_emit_wait_dsl(struct intel_dsb *dsb,
                                    u32 opcode, int lower, int upper)
 {
index 882088f55580aadb1aa94fff1c3f2e42ac9f5ef0..115f51c75a1e46e357cba50f74e1e8056a93f91d 100644 (file)
@@ -41,6 +41,7 @@ void intel_dsb_nonpost_start(struct intel_dsb *dsb);
 void intel_dsb_nonpost_end(struct intel_dsb *dsb);
 void intel_dsb_interrupt(struct intel_dsb *dsb);
 void intel_dsb_wait_usec(struct intel_dsb *dsb, int count);
+void intel_dsb_wait_vblanks(struct intel_dsb *dsb, int count);
 void intel_dsb_wait_scanline_in(struct intel_atomic_state *state,
                                struct intel_dsb *dsb,
                                int lower, int upper);