drivers/gpu/drm/xe/xe_preempt_fence.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_preempt_fence.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_preempt_fence.h- Extension
.h- Size
- 1628 bytes
- Lines
- 62
- 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_preempt_fence_types.h
Detected Declarations
struct list_headfunction to_preempt_fencefunction xe_preempt_fence_linkfunction to_preempt_fence_from_link
Annotated Snippet
#ifndef _XE_PREEMPT_FENCE_H_
#define _XE_PREEMPT_FENCE_H_
#include "xe_preempt_fence_types.h"
struct list_head;
struct dma_fence *
xe_preempt_fence_create(struct xe_exec_queue *q,
u64 context, u32 seqno);
struct xe_preempt_fence *xe_preempt_fence_alloc(void);
void xe_preempt_fence_free(struct xe_preempt_fence *pfence);
struct dma_fence *
xe_preempt_fence_arm(struct xe_preempt_fence *pfence, struct xe_exec_queue *q,
u64 context, u32 seqno);
static inline struct xe_preempt_fence *
to_preempt_fence(struct dma_fence *fence)
{
return container_of(fence, struct xe_preempt_fence, base);
}
/**
* xe_preempt_fence_link() - Return a link used to keep unarmed preempt
* fences on a list.
* @pfence: Pointer to the preempt fence.
*
* The link is embedded in the struct xe_preempt_fence. Use
* link_to_preempt_fence() to convert back to the preempt fence.
*
* Return: A pointer to an embedded struct list_head.
*/
static inline struct list_head *
xe_preempt_fence_link(struct xe_preempt_fence *pfence)
{
return &pfence->link;
}
/**
* to_preempt_fence_from_link() - Convert back to a preempt fence pointer
* from a link obtained with xe_preempt_fence_link().
* @link: The struct list_head obtained from xe_preempt_fence_link().
*
* Return: A pointer to the embedding struct xe_preempt_fence.
*/
static inline struct xe_preempt_fence *
to_preempt_fence_from_link(struct list_head *link)
{
return container_of(link, struct xe_preempt_fence, link);
}
bool xe_fence_is_xe_preempt(const struct dma_fence *fence);
#endif
Annotation
- Immediate include surface: `xe_preempt_fence_types.h`.
- Detected declarations: `struct list_head`, `function to_preempt_fence`, `function xe_preempt_fence_link`, `function to_preempt_fence_from_link`.
- 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.