drivers/gpu/drm/xe/xe_exec_queue.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_exec_queue.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_exec_queue.h- Extension
.h- Size
- 5176 bytes
- Lines
- 166
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
xe_exec_queue_types.hxe_vm_types.h
Detected Declarations
struct drm_devicestruct drm_filestruct xe_devicestruct xe_filefunction xe_exec_queue_get_unless_zerofunction xe_exec_queue_putfunction xe_exec_queue_is_parallelfunction xe_exec_queue_uses_pxpfunction xe_exec_queue_is_multi_queuefunction xe_exec_queue_is_multi_queue_primaryfunction xe_exec_queue_is_multi_queue_secondaryfunction xe_exec_queue_multi_queue_primary
Annotated Snippet
#ifndef _XE_EXEC_QUEUE_H_
#define _XE_EXEC_QUEUE_H_
#include "xe_exec_queue_types.h"
#include "xe_vm_types.h"
struct drm_device;
struct drm_file;
struct xe_device;
struct xe_file;
#define for_each_tlb_inval(__i) \
for (__i = XE_EXEC_QUEUE_TLB_INVAL_PRIMARY_GT; \
__i <= XE_EXEC_QUEUE_TLB_INVAL_MEDIA_GT; ++__i)
struct xe_exec_queue *xe_exec_queue_create(struct xe_device *xe, struct xe_vm *vm,
u32 logical_mask, u16 width,
struct xe_hw_engine *hw_engine, u32 flags,
u64 extensions);
struct xe_exec_queue *xe_exec_queue_create_class(struct xe_device *xe, struct xe_gt *gt,
struct xe_vm *vm,
enum xe_engine_class class,
u32 flags, u64 extensions);
struct xe_exec_queue *xe_exec_queue_create_bind(struct xe_device *xe,
struct xe_tile *tile,
struct xe_vm *user_vm,
u32 flags, u64 extensions);
void xe_exec_queue_fini(struct xe_exec_queue *q);
void xe_exec_queue_destroy(struct kref *ref);
void xe_exec_queue_assign_name(struct xe_exec_queue *q, u32 instance);
static inline struct xe_exec_queue *
xe_exec_queue_get_unless_zero(struct xe_exec_queue *q)
{
if (kref_get_unless_zero(&q->refcount))
return q;
return NULL;
}
struct xe_exec_queue *xe_exec_queue_lookup(struct xe_file *xef, u32 id);
static inline struct xe_exec_queue *xe_exec_queue_get(struct xe_exec_queue *q)
{
kref_get(&q->refcount);
return q;
}
static inline void xe_exec_queue_put(struct xe_exec_queue *q)
{
kref_put(&q->refcount, xe_exec_queue_destroy);
}
static inline bool xe_exec_queue_is_parallel(struct xe_exec_queue *q)
{
return q->width > 1;
}
static inline bool xe_exec_queue_uses_pxp(struct xe_exec_queue *q)
{
return q->pxp.type;
}
/**
* xe_exec_queue_is_multi_queue() - Whether an exec_queue is part of a queue group.
* @q: The exec_queue
*
* Return: True if the exec_queue is part of a queue group, false otherwise.
*/
static inline bool xe_exec_queue_is_multi_queue(struct xe_exec_queue *q)
{
return q->multi_queue.valid;
}
/**
* xe_exec_queue_is_multi_queue_primary() - Whether an exec_queue is primary queue
* of a multi queue group.
* @q: The exec_queue
*
* Return: True if @q is primary queue of a queue group, false otherwise.
*/
static inline bool xe_exec_queue_is_multi_queue_primary(struct xe_exec_queue *q)
{
return q->multi_queue.is_primary;
}
/**
* xe_exec_queue_is_multi_queue_secondary() - Whether an exec_queue is secondary queue
* of a multi queue group.
Annotation
- Immediate include surface: `xe_exec_queue_types.h`, `xe_vm_types.h`.
- Detected declarations: `struct drm_device`, `struct drm_file`, `struct xe_device`, `struct xe_file`, `function xe_exec_queue_get_unless_zero`, `function xe_exec_queue_put`, `function xe_exec_queue_is_parallel`, `function xe_exec_queue_uses_pxp`, `function xe_exec_queue_is_multi_queue`, `function xe_exec_queue_is_multi_queue_primary`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.