drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gt/uc/intel_guc_log.h- Extension
.h- Size
- 3266 bytes
- Lines
- 114
- 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/mutex.hlinux/relay.hlinux/workqueue.hintel_guc_fwif.hi915_gem.h
Detected Declarations
struct intel_gucstruct intel_guc_logfunction intel_guc_log_get_level
Annotated Snippet
struct intel_guc_log {
u32 level;
/*
* Protects concurrent access and modification of intel_guc_log->level.
*
* This lock replaces the legacy struct_mutex usage in
* intel_guc_log system.
*/
struct mutex guc_lock;
/* Allocation settings */
struct {
s32 bytes; /* Size in bytes */
s32 units; /* GuC API units - 1MB or 4KB */
s32 count; /* Number of API units */
u32 flag; /* GuC API units flag */
} sizes[GUC_LOG_SECTIONS_LIMIT];
bool sizes_initialised;
/* Combined buffer allocation */
struct i915_vma *vma;
void *buf_addr;
/* RelayFS support */
struct {
bool buf_in_use;
bool started;
struct work_struct flush_work;
struct rchan *channel;
struct mutex lock;
u32 full_count;
} relay;
/* logging related stats */
struct {
u32 sampled_overflow;
u32 overflow;
u32 flush;
} stats[GUC_MAX_LOG_BUFFER];
};
void intel_guc_log_init_early(struct intel_guc_log *log);
bool intel_guc_check_log_buf_overflow(struct intel_guc_log *log, enum guc_log_buffer_type type,
unsigned int full_cnt);
unsigned int intel_guc_get_log_buffer_size(struct intel_guc_log *log,
enum guc_log_buffer_type type);
size_t intel_guc_get_log_buffer_offset(struct intel_guc_log *log, enum guc_log_buffer_type type);
int intel_guc_log_create(struct intel_guc_log *log);
void intel_guc_log_destroy(struct intel_guc_log *log);
int intel_guc_log_set_level(struct intel_guc_log *log, u32 level);
bool intel_guc_log_relay_created(const struct intel_guc_log *log);
int intel_guc_log_relay_open(struct intel_guc_log *log);
int intel_guc_log_relay_start(struct intel_guc_log *log);
void intel_guc_log_relay_flush(struct intel_guc_log *log);
void intel_guc_log_relay_close(struct intel_guc_log *log);
void intel_guc_log_handle_flush_event(struct intel_guc_log *log);
static inline u32 intel_guc_log_get_level(struct intel_guc_log *log)
{
return log->level;
}
void intel_guc_log_info(struct intel_guc_log *log, struct drm_printer *p);
int intel_guc_log_dump(struct intel_guc_log *log, struct drm_printer *p,
bool dump_load_err);
u32 intel_guc_log_section_size_capture(struct intel_guc_log *log);
#endif
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/relay.h`, `linux/workqueue.h`, `intel_guc_fwif.h`, `i915_gem.h`.
- Detected declarations: `struct intel_guc`, `struct intel_guc_log`, `function intel_guc_log_get_level`.
- 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.