drivers/gpu/drm/xe/xe_sriov.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_sriov.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_sriov.h- Extension
.h- Size
- 1175 bytes
- Lines
- 46
- 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_device_types.hxe_sriov_types.h
Detected Declarations
struct drm_printerfunction xe_device_sriov_modefunction xe_device_is_sriov_pffunction xe_device_is_sriov_vf
Annotated Snippet
#ifndef _XE_SRIOV_H_
#define _XE_SRIOV_H_
#include "xe_assert.h"
#include "xe_device_types.h"
#include "xe_sriov_types.h"
struct drm_printer;
const char *xe_sriov_mode_to_string(enum xe_sriov_mode mode);
const char *xe_sriov_function_name(unsigned int n, char *buf, size_t len);
void xe_sriov_probe_early(struct xe_device *xe);
void xe_sriov_print_info(struct xe_device *xe, struct drm_printer *p);
int xe_sriov_init(struct xe_device *xe);
int xe_sriov_init_late(struct xe_device *xe);
static inline enum xe_sriov_mode xe_device_sriov_mode(const struct xe_device *xe)
{
xe_assert(xe, xe->sriov.__mode);
return xe->sriov.__mode;
}
static inline bool xe_device_is_sriov_pf(const struct xe_device *xe)
{
return IS_ENABLED(CONFIG_PCI_IOV) &&
xe_device_sriov_mode(xe) == XE_SRIOV_MODE_PF;
}
static inline bool xe_device_is_sriov_vf(const struct xe_device *xe)
{
return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_VF;
}
#define IS_SRIOV_PF(xe) xe_device_is_sriov_pf(xe)
#define IS_SRIOV_VF(xe) xe_device_is_sriov_vf(xe)
#define IS_SRIOV(xe) (IS_SRIOV_PF(xe) || IS_SRIOV_VF(xe))
#endif
Annotation
- Immediate include surface: `xe_assert.h`, `xe_device_types.h`, `xe_sriov_types.h`.
- Detected declarations: `struct drm_printer`, `function xe_device_sriov_mode`, `function xe_device_is_sriov_pf`, `function xe_device_is_sriov_vf`.
- 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.