drivers/gpu/drm/xe/xe_huc_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_huc_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_huc_debugfs.c- Extension
.c- Size
- 1471 bytes
- Lines
- 70
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
xe_huc_debugfs.hdrm/drm_debugfs.hdrm/drm_managed.hdrm/drm_print.hxe_gt_types.hxe_huc.hxe_pm.h
Detected Declarations
function huc_to_gtfunction huc_to_xefunction huc_infofunction xe_huc_debugfs_register
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright © 2022 Intel Corporation
*/
#include "xe_huc_debugfs.h"
#include <drm/drm_debugfs.h>
#include <drm/drm_managed.h>
#include <drm/drm_print.h>
#include "xe_gt_types.h"
#include "xe_huc.h"
#include "xe_pm.h"
static struct xe_gt *
huc_to_gt(struct xe_huc *huc)
{
return container_of(huc, struct xe_gt, uc.huc);
}
static struct xe_device *
huc_to_xe(struct xe_huc *huc)
{
return gt_to_xe(huc_to_gt(huc));
}
static struct xe_huc *node_to_huc(struct drm_info_node *node)
{
return node->info_ent->data;
}
static int huc_info(struct seq_file *m, void *data)
{
struct xe_huc *huc = node_to_huc(m->private);
struct xe_device *xe = huc_to_xe(huc);
struct drm_printer p = drm_seq_file_printer(m);
guard(xe_pm_runtime)(xe);
xe_huc_print_info(huc, &p);
return 0;
}
static const struct drm_info_list debugfs_list[] = {
{"huc_info", huc_info, 0},
};
void xe_huc_debugfs_register(struct xe_huc *huc, struct dentry *parent)
{
struct drm_minor *minor = huc_to_xe(huc)->drm.primary;
struct drm_info_list *local;
int i;
#define DEBUGFS_SIZE (ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list))
local = drmm_kmalloc(&huc_to_xe(huc)->drm, DEBUGFS_SIZE, GFP_KERNEL);
if (!local)
return;
memcpy(local, debugfs_list, DEBUGFS_SIZE);
#undef DEBUGFS_SIZE
for (i = 0; i < ARRAY_SIZE(debugfs_list); ++i)
local[i].data = huc;
drm_debugfs_create_files(local,
ARRAY_SIZE(debugfs_list),
parent, minor);
}
Annotation
- Immediate include surface: `xe_huc_debugfs.h`, `drm/drm_debugfs.h`, `drm/drm_managed.h`, `drm/drm_print.h`, `xe_gt_types.h`, `xe_huc.h`, `xe_pm.h`.
- Detected declarations: `function huc_to_gt`, `function huc_to_xe`, `function huc_info`, `function xe_huc_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.