drivers/gpu/drm/xe/xe_guc_buf.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_guc_buf.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_guc_buf.h- Extension
.h- Size
- 1629 bytes
- Lines
- 50
- 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
linux/cleanup.hlinux/err.hxe_guc_buf_types.h
Detected Declarations
function xe_guc_buf_is_valid
Annotated Snippet
#ifndef _XE_GUC_BUF_H_
#define _XE_GUC_BUF_H_
#include <linux/cleanup.h>
#include <linux/err.h>
#include "xe_guc_buf_types.h"
int xe_guc_buf_cache_init(struct xe_guc_buf_cache *cache);
int xe_guc_buf_cache_init_with_size(struct xe_guc_buf_cache *cache, u32 size);
u32 xe_guc_buf_cache_dwords(struct xe_guc_buf_cache *cache);
struct xe_guc_buf xe_guc_buf_reserve(struct xe_guc_buf_cache *cache, u32 dwords);
struct xe_guc_buf xe_guc_buf_from_data(struct xe_guc_buf_cache *cache,
const void *data, size_t size);
void xe_guc_buf_release(const struct xe_guc_buf buf);
/**
* xe_guc_buf_is_valid() - Check if a buffer reference is valid.
* @buf: the &xe_guc_buf reference to check
*
* Return: true if @ref represents a valid sub-allication.
*/
static inline bool xe_guc_buf_is_valid(const struct xe_guc_buf buf)
{
return !IS_ERR_OR_NULL(buf.sa);
}
void *xe_guc_buf_cpu_ptr(const struct xe_guc_buf buf);
void *xe_guc_buf_sync_read(const struct xe_guc_buf buf);
u64 xe_guc_buf_flush(const struct xe_guc_buf buf);
u64 xe_guc_buf_gpu_addr(const struct xe_guc_buf buf);
u64 xe_guc_cache_gpu_addr_from_ptr(struct xe_guc_buf_cache *cache, const void *ptr, u32 size);
DEFINE_CLASS(xe_guc_buf, struct xe_guc_buf,
xe_guc_buf_release(_T),
xe_guc_buf_reserve(cache, num),
struct xe_guc_buf_cache *cache, u32 num);
DEFINE_CLASS(xe_guc_buf_from_data, struct xe_guc_buf,
xe_guc_buf_release(_T),
xe_guc_buf_from_data(cache, data, size),
struct xe_guc_buf_cache *cache, const void *data, size_t size);
#endif
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/err.h`, `xe_guc_buf_types.h`.
- Detected declarations: `function xe_guc_buf_is_valid`.
- 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.