drivers/gpu/drm/msm/dp/dp_debug.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/dp/dp_debug.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/dp/dp_debug.c- Extension
.c- Size
- 6257 bytes
- Lines
- 241
- 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.
- 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
linux/debugfs.hdrm/drm_connector.hdrm/drm_file.hdp_aux.hdp_ctrl.hdp_debug.hdp_display.h
Detected Declarations
struct msm_dp_debug_privatefunction msm_dp_debug_showfunction msm_dp_test_data_showfunction msm_dp_test_type_showfunction msm_dp_test_active_writefunction msm_dp_test_active_showfunction msm_dp_test_active_openfunction msm_dp_debug_init
Annotated Snippet
static const struct file_operations test_active_fops = {
.owner = THIS_MODULE,
.open = msm_dp_test_active_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = msm_dp_test_active_write
};
int msm_dp_debug_init(struct device *dev, struct msm_dp_panel *panel,
struct msm_dp_link *link,
struct drm_connector *connector,
struct dentry *root, bool is_edp)
{
struct msm_dp_debug_private *debug;
if (!dev || !panel || !link) {
DRM_ERROR("invalid input\n");
return -EINVAL;
}
debug = devm_kzalloc(dev, sizeof(*debug), GFP_KERNEL);
if (!debug)
return -ENOMEM;
debug->link = link;
debug->panel = panel;
debugfs_create_file("dp_debug", 0444, root,
debug, &msm_dp_debug_fops);
if (!is_edp) {
debugfs_create_file("dp_test_active", 0444,
root,
debug, &test_active_fops);
debugfs_create_file("dp_test_data", 0444,
root,
debug, &msm_dp_test_data_fops);
debugfs_create_file("dp_test_type", 0444,
root,
debug, &msm_dp_test_type_fops);
}
return 0;
}
#endif
Annotation
- Immediate include surface: `linux/debugfs.h`, `drm/drm_connector.h`, `drm/drm_file.h`, `dp_aux.h`, `dp_ctrl.h`, `dp_debug.h`, `dp_display.h`.
- Detected declarations: `struct msm_dp_debug_private`, `function msm_dp_debug_show`, `function msm_dp_test_data_show`, `function msm_dp_test_type_show`, `function msm_dp_test_active_write`, `function msm_dp_test_active_show`, `function msm_dp_test_active_open`, `function msm_dp_debug_init`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern 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.