DMC Firmware Support¶
From gen9 onwards we have newly added DMC (Display microcontroller) in display engine to save and restore the state of display engine when it enter into low-power state and comes back to normal.
-
void intel_dmc_block_pkgc(struct intel_display *display, enum pipe pipe, bool block)¶
block PKG C-state
Parameters
struct intel_display *displaydisplay instance
enum pipe pipepipe which register use to block
bool blockblock/unblock
Description
This interface is target for Wa_16025596647 usage. I.e. to set/clear PIPEDMC_BLOCK_PKGC_SW_BLOCK_PKGC_ALWAYS bit in PIPEDMC_BLOCK_PKGC_SW register.
-
void intel_dmc_start_pkgc_exit_at_start_of_undelayed_vblank(struct intel_display *display, enum pipe pipe, bool enable)¶
start of PKG C-state exit
Parameters
struct intel_display *displaydisplay instance
enum pipe pipepipe which register use to block
bool enableenable/disable
Description
This interface is target for Wa_16025596647 usage. I.e. start the package C exit at the start of the undelayed vblank
-
void intel_dmc_load_program(struct intel_display *display)¶
write the firmware from memory to register.
Parameters
struct intel_display *displaydisplay instance
Description
DMC firmware is read from a .bin file and kept in internal memory one time. Everytime display comes back from low power state this function is called to copy the firmware from internal memory to registers.
-
void intel_dmc_disable_program(struct intel_display *display)¶
disable the firmware
Parameters
struct intel_display *displaydisplay instance
Description
Disable all event handlers in the firmware, making sure the firmware is inactive after the display is uninitialized.
-
void intel_dmc_init(struct intel_display *display)¶
initialize the firmware loading.
Parameters
struct intel_display *displaydisplay instance
Description
This function is called at the time of loading the display driver to read firmware from a .bin file and copied into a internal memory.
-
void intel_dmc_suspend(struct intel_display *display)¶
prepare DMC firmware before system suspend
Parameters
struct intel_display *displaydisplay instance
Description
Prepare the DMC firmware before entering system suspend. This includes flushing pending work items and releasing any resources acquired during init.
-
void intel_dmc_resume(struct intel_display *display)¶
init DMC firmware during system resume
Parameters
struct intel_display *displaydisplay instance
Description
Reinitialize the DMC firmware during system resume, reacquiring any
resources released in intel_dmc_suspend().
-
void intel_dmc_fini(struct intel_display *display)¶
unload the DMC firmware.
Parameters
struct intel_display *displaydisplay instance
Description
Firmmware unloading includes freeing the internal memory and reset the firmware loading status.
DMC Flip Queue¶
A flip queue is a ring buffer implemented by the pipe DMC firmware. The driver inserts entries into the queues to be executed by the pipe DMC at a specified presentation timestamp (PTS).
Each pipe DMC provides several queues:
1 general queue (two DSB buffers executed per entry)
3 plane queues (one DSB buffer executed per entry)
1 fast queue (deprecated)
DMC wakelock support¶
Wake lock is the mechanism to cause display engine to exit DC states to allow programming to registers that are powered down in those states. Previous projects exited DC states automatically when detecting programming. Now software controls the exit by programming the wake lock. This improves system performance and system interactions and better fits the flip queue style of programming. Wake lock is only required when DC5, DC6, or DC6v have been enabled in DC_STATE_EN and the wake lock mode of operation has been enabled.
The wakelock mechanism in DMC allows the display engine to exit DC states explicitly before programming registers that may be powered down. In earlier hardware, this was done automatically and implicitly when the display engine accessed a register. With the wakelock implementation, the driver asserts a wakelock in DMC, which forces it to exit the DC state until the wakelock is deasserted.
The mechanism can be enabled and disabled by writing to the DMC_WAKELOCK_CFG register. There are also 13 control registers that can be used to hold and release different wakelocks. In the current implementation, we only need one wakelock, so only DMC_WAKELOCK1_CTL is used. The other definitions are here for potential future use.