Display State Buffer

A DSB (Display State Buffer) is a queue of MMIO instructions in the memory which can be offloaded to DSB HW in Display Controller. DSB HW is a DMA engine that can be programmed to download the DSB from memory. It allows driver to batch submit display HW programming. This helps to reduce loading time and CPU activity, thereby making the context switch faster. DSB Support added from Gen12 Intel graphics based platform.

DSB’s can access only the pipe, plane, and transcoder Data Island Packet registers.

DSB HW can support only register writes (both indexed and direct MMIO writes). There are no registers reads possible with DSB HW engine.

void intel_dsb_reg_write_indexed(struct intel_dsb *dsb, i915_reg_t reg, u32 val)

Emit indexed register write to the DSB context

Parameters

struct intel_dsb *dsb

DSB context

i915_reg_t reg

register address.

u32 val

value.

Description

This function is used for writing register-value pair in command buffer of DSB.

Note that indexed writes are slower than normal MMIO writes for a small number (less than 5 or so) of writes to the same register.

void intel_dsb_commit(struct intel_dsb *dsb)

Trigger workload execution of DSB.

Parameters

struct intel_dsb *dsb

DSB context

Description

This function is used to do actual write to hardware using DSB.

struct intel_dsb *intel_dsb_prepare(struct intel_atomic_state *state, struct intel_crtc *crtc, enum intel_dsb_id dsb_id, unsigned int max_cmds)

Allocate, pin and map the DSB command buffer.

Parameters

struct intel_atomic_state *state

the atomic state

struct intel_crtc *crtc

the CRTC

enum intel_dsb_id dsb_id

the DSB engine to use

unsigned int max_cmds

number of commands we need to fit into command buffer

Description

This function prepare the command buffer which is used to store dsb instructions with data.

Return

DSB context, NULL on failure

void intel_dsb_cleanup(struct intel_dsb *dsb)

To cleanup DSB context.

Parameters

struct intel_dsb *dsb

DSB context

Description

This function cleanup the DSB context by unpinning and releasing the VMA object associated with it.