drivers/gpu/drm/i915/gt/uc/intel_guc_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/uc/intel_guc_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gt/uc/intel_guc_debugfs.c- Extension
.c- Size
- 3968 bytes
- Lines
- 150
- 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
drm/drm_print.hgt/intel_gt_debugfs.hgt/uc/intel_guc_ads.hgt/uc/intel_guc_ct.hgt/uc/intel_guc_slpc.hgt/uc/intel_guc_submission.hintel_guc.hintel_guc_debugfs.hintel_guc_log_debugfs.h
Detected Declarations
function guc_info_showfunction guc_registered_contexts_showfunction guc_slpc_info_showfunction intel_eval_slpc_supportfunction guc_sched_disable_delay_ms_getfunction guc_sched_disable_delay_ms_setfunction guc_sched_disable_gucid_threshold_getfunction guc_sched_disable_gucid_threshold_setfunction intel_guc_debugfs_register
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright © 2020 Intel Corporation
*/
#include <drm/drm_print.h>
#include "gt/intel_gt_debugfs.h"
#include "gt/uc/intel_guc_ads.h"
#include "gt/uc/intel_guc_ct.h"
#include "gt/uc/intel_guc_slpc.h"
#include "gt/uc/intel_guc_submission.h"
#include "intel_guc.h"
#include "intel_guc_debugfs.h"
#include "intel_guc_log_debugfs.h"
static int guc_info_show(struct seq_file *m, void *data)
{
struct intel_guc *guc = m->private;
struct drm_printer p = drm_seq_file_printer(m);
if (!intel_guc_is_supported(guc))
return -ENODEV;
intel_guc_load_status(guc, &p);
drm_puts(&p, "\n");
intel_guc_log_info(&guc->log, &p);
if (!intel_guc_submission_is_used(guc))
return 0;
intel_guc_ct_print_info(&guc->ct, &p);
intel_guc_submission_print_info(guc, &p);
intel_guc_ads_print_policy_info(guc, &p);
return 0;
}
DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_info);
static int guc_registered_contexts_show(struct seq_file *m, void *data)
{
struct intel_guc *guc = m->private;
struct drm_printer p = drm_seq_file_printer(m);
if (!intel_guc_submission_is_used(guc))
return -ENODEV;
intel_guc_submission_print_context_info(guc, &p);
return 0;
}
DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_registered_contexts);
static int guc_slpc_info_show(struct seq_file *m, void *unused)
{
struct intel_guc *guc = m->private;
struct intel_guc_slpc *slpc = &guc->slpc;
struct drm_printer p = drm_seq_file_printer(m);
if (!intel_guc_slpc_is_used(guc))
return -ENODEV;
return intel_guc_slpc_print_info(slpc, &p);
}
DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_slpc_info);
static bool intel_eval_slpc_support(void *data)
{
struct intel_guc *guc = (struct intel_guc *)data;
return intel_guc_slpc_is_used(guc);
}
static int guc_sched_disable_delay_ms_get(void *data, u64 *val)
{
struct intel_guc *guc = data;
if (!intel_guc_submission_is_used(guc))
return -ENODEV;
*val = (u64)guc->submission_state.sched_disable_delay_ms;
return 0;
}
static int guc_sched_disable_delay_ms_set(void *data, u64 val)
{
struct intel_guc *guc = data;
if (!intel_guc_submission_is_used(guc))
Annotation
- Immediate include surface: `drm/drm_print.h`, `gt/intel_gt_debugfs.h`, `gt/uc/intel_guc_ads.h`, `gt/uc/intel_guc_ct.h`, `gt/uc/intel_guc_slpc.h`, `gt/uc/intel_guc_submission.h`, `intel_guc.h`, `intel_guc_debugfs.h`.
- Detected declarations: `function guc_info_show`, `function guc_registered_contexts_show`, `function guc_slpc_info_show`, `function intel_eval_slpc_support`, `function guc_sched_disable_delay_ms_get`, `function guc_sched_disable_delay_ms_set`, `function guc_sched_disable_gucid_threshold_get`, `function guc_sched_disable_gucid_threshold_set`, `function intel_guc_debugfs_register`.
- 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.