drivers/gpu/drm/xe/xe_force_wake.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_force_wake.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_force_wake.h- Extension
.h- Size
- 3577 bytes
- Lines
- 116
- 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_assert.hxe_force_wake_types.h
Detected Declarations
struct xe_gtstruct xe_force_wake_reffunction for_each_iffunction domainsfunction xe_force_wake_ref_has_domainfunction xe_force_wake_constructor
Annotated Snippet
struct xe_force_wake_ref {
struct xe_force_wake *fw;
unsigned int domains;
};
static struct xe_force_wake_ref
xe_force_wake_constructor(struct xe_force_wake *fw, unsigned int domains)
{
struct xe_force_wake_ref fw_ref = { .fw = fw };
fw_ref.domains = xe_force_wake_get(fw, domains);
return fw_ref;
}
DEFINE_CLASS(xe_force_wake, struct xe_force_wake_ref,
xe_force_wake_put(_T.fw, _T.domains),
xe_force_wake_constructor(fw, domains),
struct xe_force_wake *fw, unsigned int domains);
/*
* Scoped helper for the forcewake class, using the same trick as scoped_guard()
* to bind the lifetime to the next statement/block.
*/
#define __xe_with_force_wake(ref, fw, domains, done) \
for (CLASS(xe_force_wake, ref)(fw, domains), *(done) = NULL; \
!(done); (done) = (void *)1)
#define xe_with_force_wake(ref, fw, domains) \
__xe_with_force_wake(ref, fw, domains, __UNIQUE_ID(done))
/*
* Used when xe_force_wake_constructor() has already been called by another
* function and the current function is responsible for releasing the forcewake
* reference in all possible cases and error paths.
*/
DEFINE_CLASS(xe_force_wake_release_only, struct xe_force_wake_ref,
if (_T.fw) xe_force_wake_put(_T.fw, _T.domains), fw_ref,
struct xe_force_wake_ref fw_ref);
#endif
Annotation
- Immediate include surface: `xe_assert.h`, `xe_force_wake_types.h`.
- Detected declarations: `struct xe_gt`, `struct xe_force_wake_ref`, `function for_each_if`, `function domains`, `function xe_force_wake_ref_has_domain`, `function xe_force_wake_constructor`.
- 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.