drivers/gpu/drm/i915/i915_request.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_request.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/i915_request.h
Extension
.h
Size
23520 bytes
Lines
734
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct i915_capture_list {
	struct i915_vma_resource *vma_res;
	struct i915_capture_list *next;
};

void i915_request_free_capture_list(struct i915_capture_list *capture);
#else
#define i915_request_free_capture_list(_a) do {} while (0)
#endif

#define RQ_TRACE(rq, fmt, ...) do {					\
	const struct i915_request *rq__ = (rq);				\
	ENGINE_TRACE(rq__->engine, "fence %llx:%lld, current %d " fmt,	\
		     rq__->fence.context, rq__->fence.seqno,		\
		     hwsp_seqno(rq__), ##__VA_ARGS__);			\
} while (0)

enum {
	/*
	 * I915_FENCE_FLAG_ACTIVE - this request is currently submitted to HW.
	 *
	 * Set by __i915_request_submit() on handing over to HW, and cleared
	 * by __i915_request_unsubmit() if we preempt this request.
	 *
	 * Finally cleared for consistency on retiring the request, when
	 * we know the HW is no longer running this request.
	 *
	 * See i915_request_is_active()
	 */
	I915_FENCE_FLAG_ACTIVE = DMA_FENCE_FLAG_USER_BITS,

	/*
	 * I915_FENCE_FLAG_PQUEUE - this request is ready for execution
	 *
	 * Using the scheduler, when a request is ready for execution it is put
	 * into the priority queue, and removed from that queue when transferred
	 * to the HW runlists. We want to track its membership within the
	 * priority queue so that we can easily check before rescheduling.
	 *
	 * See i915_request_in_priority_queue()
	 */
	I915_FENCE_FLAG_PQUEUE,

	/*
	 * I915_FENCE_FLAG_HOLD - this request is currently on hold
	 *
	 * This request has been suspended, pending an ongoing investigation.
	 */
	I915_FENCE_FLAG_HOLD,

	/*
	 * I915_FENCE_FLAG_INITIAL_BREADCRUMB - this request has the initial
	 * breadcrumb that marks the end of semaphore waits and start of the
	 * user payload.
	 */
	I915_FENCE_FLAG_INITIAL_BREADCRUMB,

	/*
	 * I915_FENCE_FLAG_SIGNAL - this request is currently on signal_list
	 *
	 * Internal bookkeeping used by the breadcrumb code to track when
	 * a request is on the various signal_list.
	 */
	I915_FENCE_FLAG_SIGNAL,

	/*
	 * I915_FENCE_FLAG_NOPREEMPT - this request should not be preempted
	 *
	 * The execution of some requests should not be interrupted. This is
	 * a sensitive operation as it makes the request super important,
	 * blocking other higher priority work. Abuse of this flag will
	 * lead to quality of service issues.
	 */
	I915_FENCE_FLAG_NOPREEMPT,

	/*
	 * I915_FENCE_FLAG_SENTINEL - this request should be last in the queue
	 *
	 * A high priority sentinel request may be submitted to clear the
	 * submission queue. As it will be the only request in-flight, upon
	 * execution all other active requests will have been preempted and
	 * unsubmitted. This preemptive pulse is used to re-evaluate the
	 * in-flight requests, particularly in cases where an active context
	 * is banned and those active requests need to be cancelled.
	 */
	I915_FENCE_FLAG_SENTINEL,

	/*
	 * I915_FENCE_FLAG_BOOST - upclock the gpu for this request
	 *

Annotation

Implementation Notes