drivers/gpu/drm/xe/xe_tile_printk.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_tile_printk.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_tile_printk.h- Extension
.h- Size
- 3609 bytes
- Lines
- 128
- 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_printk.h
Detected Declarations
function __xe_tile_printfn_errfunction __xe_tile_printfn_infofunction __xe_tile_printfn_dbgfunction xe_tile_err_printerfunction xe_tile_info_printerfunction xe_tile_dbg_printer
Annotated Snippet
#ifndef _XE_TILE_PRINTK_H_
#define _XE_TILE_PRINTK_H_
#include "xe_printk.h"
#define __XE_TILE_PRINTK_FMT(_tile, _fmt, _args...) "Tile%u: " _fmt, (_tile)->id, ##_args
#define xe_tile_printk(_tile, _level, _fmt, ...) \
xe_printk((_tile)->xe, _level, __XE_TILE_PRINTK_FMT((_tile), _fmt, ##__VA_ARGS__))
#define xe_tile_err(_tile, _fmt, ...) \
xe_tile_printk((_tile), err, _fmt, ##__VA_ARGS__)
#define xe_tile_err_once(_tile, _fmt, ...) \
xe_tile_printk((_tile), err_once, _fmt, ##__VA_ARGS__)
#define xe_tile_err_ratelimited(_tile, _fmt, ...) \
xe_tile_printk((_tile), err_ratelimited, _fmt, ##__VA_ARGS__)
#define xe_tile_warn(_tile, _fmt, ...) \
xe_tile_printk((_tile), warn, _fmt, ##__VA_ARGS__)
#define xe_tile_notice(_tile, _fmt, ...) \
xe_tile_printk((_tile), notice, _fmt, ##__VA_ARGS__)
#define xe_tile_info(_tile, _fmt, ...) \
xe_tile_printk((_tile), info, _fmt, ##__VA_ARGS__)
#define xe_tile_dbg(_tile, _fmt, ...) \
xe_tile_printk((_tile), dbg, _fmt, ##__VA_ARGS__)
#define xe_tile_WARN_type(_tile, _type, _condition, _fmt, ...) \
xe_WARN##_type((_tile)->xe, _condition, _fmt, ## __VA_ARGS__)
#define xe_tile_WARN(_tile, _condition, _fmt, ...) \
xe_tile_WARN_type((_tile),, _condition, __XE_TILE_PRINTK_FMT((_tile), _fmt, ##__VA_ARGS__))
#define xe_tile_WARN_ONCE(_tile, _condition, _fmt, ...) \
xe_tile_WARN_type((_tile), _ONCE, _condition, __XE_TILE_PRINTK_FMT((_tile), _fmt, ##__VA_ARGS__))
#define xe_tile_WARN_ON(_tile, _condition) \
xe_tile_WARN((_tile), _condition, "%s(%s)", "WARN_ON", __stringify(_condition))
#define xe_tile_WARN_ON_ONCE(_tile, _condition) \
xe_tile_WARN_ONCE((_tile), _condition, "%s(%s)", "WARN_ON_ONCE", __stringify(_condition))
static inline void __xe_tile_printfn_err(struct drm_printer *p, struct va_format *vaf)
{
struct xe_tile *tile = p->arg;
xe_tile_err(tile, "%pV", vaf);
}
static inline void __xe_tile_printfn_info(struct drm_printer *p, struct va_format *vaf)
{
struct xe_tile *tile = p->arg;
xe_tile_info(tile, "%pV", vaf);
}
static inline void __xe_tile_printfn_dbg(struct drm_printer *p, struct va_format *vaf)
{
struct xe_tile *tile = p->arg;
struct drm_printer dbg;
/*
* The original xe_tile_dbg() callsite annotations are useless here,
* redirect to the tweaked xe_dbg_printer() instead.
*/
dbg = xe_dbg_printer(tile->xe);
dbg.origin = p->origin;
drm_printf(&dbg, __XE_TILE_PRINTK_FMT(tile, "%pV", vaf));
}
/**
* xe_tile_err_printer - Construct a &drm_printer that outputs to xe_tile_err()
* @tile: the &xe_tile pointer to use in xe_tile_err()
*
* Return: The &drm_printer object.
*/
static inline struct drm_printer xe_tile_err_printer(struct xe_tile *tile)
{
struct drm_printer p = {
.printfn = __xe_tile_printfn_err,
.arg = tile,
};
return p;
}
Annotation
- Immediate include surface: `xe_printk.h`.
- Detected declarations: `function __xe_tile_printfn_err`, `function __xe_tile_printfn_info`, `function __xe_tile_printfn_dbg`, `function xe_tile_err_printer`, `function xe_tile_info_printer`, `function xe_tile_dbg_printer`.
- 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.