drivers/gpu/drm/i915/gt/uc/intel_huc_debugfs.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/uc/intel_huc_debugfs.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/gt/uc/intel_huc_debugfs.c
Extension
.c
Size
795 bytes
Lines
37
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.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2020 Intel Corporation
 */

#include <drm/drm_print.h>

#include "gt/intel_gt_debugfs.h"
#include "intel_huc.h"
#include "intel_huc_debugfs.h"

static int huc_info_show(struct seq_file *m, void *data)
{
	struct intel_huc *huc = m->private;
	struct drm_printer p = drm_seq_file_printer(m);

	if (!intel_huc_is_supported(huc))
		return -ENODEV;

	intel_huc_load_status(huc, &p);

	return 0;
}
DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(huc_info);

void intel_huc_debugfs_register(struct intel_huc *huc, struct dentry *root)
{
	static const struct intel_gt_debugfs_file files[] = {
		{ .name = "huc_info", .fops = &huc_info_fops },
	};

	if (!intel_huc_is_supported(huc))
		return;

	intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), huc);
}

Annotation

Implementation Notes