Skip to content

Commit de96853

Browse files
committed
drm/i915/dsb: Introduce intel_dsb_wait_usec()
Add a function to emit the DSB "wait usecs" instruction. This is just a usleep() for the DSB. As a lower bound it seems pretty accurate, but the upper bound seemed oddly relaxed (ie. sometimes I've seen waits that are quite a bit longer than specified, not sure why). 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-7-ville.syrjala@linux.intel.com
1 parent 63b41d2 commit de96853

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/gpu/drm/i915/display/intel_dsb.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ void intel_dsb_interrupt(struct intel_dsb *dsb)
393393
DSB_OPCODE_INTERRUPT << DSB_OPCODE_SHIFT);
394394
}
395395

396+
void intel_dsb_wait_usec(struct intel_dsb *dsb, int count)
397+
{
398+
intel_dsb_emit(dsb, count,
399+
DSB_OPCODE_WAIT_USEC << DSB_OPCODE_SHIFT);
400+
}
401+
396402
static void intel_dsb_emit_wait_dsl(struct intel_dsb *dsb,
397403
u32 opcode, int lower, int upper)
398404
{

drivers/gpu/drm/i915/display/intel_dsb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ void intel_dsb_noop(struct intel_dsb *dsb, int count);
4040
void intel_dsb_nonpost_start(struct intel_dsb *dsb);
4141
void intel_dsb_nonpost_end(struct intel_dsb *dsb);
4242
void intel_dsb_interrupt(struct intel_dsb *dsb);
43+
void intel_dsb_wait_usec(struct intel_dsb *dsb, int count);
4344
void intel_dsb_wait_scanline_in(struct intel_atomic_state *state,
4445
struct intel_dsb *dsb,
4546
int lower, int upper);

0 commit comments

Comments
 (0)