STRUCT INTEL_ENGINE_EXECLISTS(9)
π struct intel_engine_execlists β Kernel API Manual edition, bestie π
okay so picture this: it's a Kernel API Manual page, the whole thing is about struct intel_engine_execlists, and it's literally the execlist submission queue and the port state, like both of them, together, one struct. iconic behavior honestly β¨
β¨ NAME β¨
struct intel_engine_execlists β execlist submission queue and port state π¦
πΈ SYNOPSIS πΈ
struct intel_engine_execlists {
struct timer_list timer;
struct timer_list preempt;
const struct i915_request *preempt_target;
u32 ccid;
u32 yield;
u32 error_interrupt;
#define ERROR_CSB BIT(31);
#define ERROR_PREEMPT BIT(30);
u32 reset_ccid;
u32 __iomem *submit_reg;
u32 __iomem *ctrl_reg;
#define EXECLIST_MAX_PORTS 2;
struct i915_request * const *active;
struct i915_request *inflight[EXECLIST_MAX_PORTS + 1 ];
struct i915_request *pending[EXECLIST_MAX_PORTS + 1];
unsigned int port_mask;
struct rb_root_cached virtual;
u32 *csb_write;
u64 *csb_status;
u8 csb_size;
u8 csb_head;
};
no cap, that's the whole vibe of the struct π every field gets its own little moment below π
π«Ά Members π«Ά
timerβ kicks the current context if its timeslice expires, like a little alarm clock that says "girl, your turn is OVER" β°preemptβ resets the current context if it fails to give way. not mean, just boundary-setting πpreempt_targetβ the active request at the time of the preemption request.
so here's the tea π΅: we force a preemption to occur if the pending contexts have not been promoted to active upon receipt of the CS ack event within the timeout. This timeout maybe chosen based on the target, using a very short timeout if the context is no longer schedulable. That short timeout may not be applicable to other contexts, so if a context switch should happen within before the preemption timeout, we may shoot early at an innocent context. To prevent this, we record which context was active at the time of the preemption request and only reset that context upon the timeout. literally protecting the innocent, that's main character energy π‘οΈ
ccidβ identifier for contexts submitted to this engine πyieldβ CCID at the time of the last semaphore-wait interrupt.
Instead of leaving a semaphore busy-spinning on an engine, we would like to switch to another ready context, i.e. yielding the semaphore timeslice. sharing is caring, bestie π€
error_interruptβ CS Master EIR.
The CS generates an interrupt when it detects an error. We capture the first error interrupt, record the EIR and schedule the tasklet. In the tasklet, we process the pending CS events to ensure we have the guilty request, and then reset the engine. π¨
Low 16b are used by HW, with the upper 16b used as the enabling mask. Reserve the upper 16b for tracking internal errors. yes the bit math is real and yes it matters π
reset_ccidβ Active CCID [EXECLISTS_STATUS_HI] at the time of reset πsubmit_regβ gen-specific execlist submission register set to the ExecList Submission Port (elsp) register pre-Gen11 and to the ExecList Submission Queue Contents register array for Gen11+ π§¬ctrl_regβ the enhanced execlists control register, used to load the submit queue on the HW and to request preemptions to idle ποΈactiveβ the currently known context executing on HW. she's on stage rn πβ¨inflightβ the set of contexts submitted and acknowledged by HW.
The set of inflight contexts is managed by reading CS events from the HW. On a context-switch event (not preemption), we know the HW has transitioned from port0 to port1, and we advance our inflight/active tracking accordingly. port0 β port1, the glow-up pipeline π
pendingβ the next set of contexts submitted to ELSP.
We store the array of contexts that we submit to HW (via ELSP) and promote them to the inflight array once HW has signaled the preemption or idle-to-active event. it's giving waitlist, then vip list ποΈ
port_maskβ number of execlist ports - 1 π’virtualβ Queue of requests on a virtual engine, sorted by priority. Each RB entry is astruct i915_priolistcontaining a list of requests of the same priority. sorted by priority fr fr, no cutting the line πcsb_writeβ control register for Context Switch buffer.
Note this register may be either mmio or HWSP shadow. β οΈ like, either/or, don't assume
csb_statusβ status array for Context Switch buffer.
Note these register may be either mmio or HWSP shadow. β οΈ same deal, both options are valid
csb_sizeβ context status buffer FIFO size πcsb_headβ context status buffer head π―
π₯ Description π₯
The struct intel_engine_execlists represents the combined logical state of driver and the hardware state for execlist mode of submission. two states, one struct, one vibe check passed π
β SEE ALSO β
- Kernel file
./drivers/gpu/drm/i915/gt/intel_engine_types.hπ go read it, iykyk
and that's the whole page, bestie π«Ά this came out of ./drivers/gpu/drm/i915/gt, dated October 2026, and it goes by struct inte...ne_execlists(9) in the Kernel API Manual β slay, bye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms