Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/dsb: add intel_dsb_gosub_finish()

A DSB buffer which will be used for GOSUB execution does not need
the DEWAKE mechanism but still need to be 64 bit aligned. Add helper
to finish preparation of a dsb buffer to be executed with GOSUB
instruction.

v2: Add a cacheline of noops at the end of GOSUB buffer (Ville)

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Link: https://lore.kernel.org/r/20250523062041.166468-6-chaitanya.kumar.borah@intel.com

authored by

Chaitanya Kumar Borah and committed by
Animesh Manna
796b6df0 2c41d62f

+14
+13
drivers/gpu/drm/i915/display/intel_dsb.c
··· 606 606 intel_dsb_align_tail(dsb); 607 607 } 608 608 609 + void intel_dsb_gosub_finish(struct intel_dsb *dsb) 610 + { 611 + intel_dsb_align_tail(dsb); 612 + 613 + /* 614 + * "All subroutines called by the GOSUB instruction 615 + * must end with a cacheline of NOPs" 616 + */ 617 + intel_dsb_noop(dsb, 8); 618 + 619 + intel_dsb_buffer_flush_map(&dsb->dsb_buf); 620 + } 621 + 609 622 void intel_dsb_finish(struct intel_dsb *dsb) 610 623 { 611 624 struct intel_crtc *crtc = dsb->crtc;
+1
drivers/gpu/drm/i915/display/intel_dsb.h
··· 31 31 enum intel_dsb_id dsb_id, 32 32 unsigned int max_cmds); 33 33 void intel_dsb_finish(struct intel_dsb *dsb); 34 + void intel_dsb_gosub_finish(struct intel_dsb *dsb); 34 35 void intel_dsb_cleanup(struct intel_dsb *dsb); 35 36 void intel_dsb_reg_write(struct intel_dsb *dsb, 36 37 i915_reg_t reg, u32 val);