drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_debugfs.c- Extension
.c- Size
- 2744 bytes
- Lines
- 105
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hlinux/device.hlinux/seq_file.hlinux/pci.hdrm/drm_drv.hdrm/drm_file.hdrm/drm_debugfs.hdrm/drm_edid.hhibmc_drm_drv.h
Detected Declarations
function hibmc_control_writefunction hibmc_dp_dbgfs_showfunction hibmc_openfunction hibmc_debugfs_init
Annotated Snippet
static const struct file_operations hibmc_dbg_fops = {
.owner = THIS_MODULE,
.write = hibmc_control_write,
.read = seq_read,
.open = hibmc_open,
.llseek = seq_lseek,
.release = single_release,
};
void hibmc_debugfs_init(struct drm_connector *connector, struct dentry *root)
{
struct drm_device *dev = connector->dev;
struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
/* create the file in drm directory, so we don't need to remove manually */
debugfs_create_file("colorbar-cfg", 0200,
root, priv, &hibmc_dbg_fops);
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/device.h`, `linux/seq_file.h`, `linux/pci.h`, `drm/drm_drv.h`, `drm/drm_file.h`, `drm/drm_debugfs.h`, `drm/drm_edid.h`.
- Detected declarations: `function hibmc_control_write`, `function hibmc_dp_dbgfs_show`, `function hibmc_open`, `function hibmc_debugfs_init`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.