include/drm/drm_debugfs.h
Source file repositories/reference/linux-study-clean/include/drm/drm_debugfs.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_debugfs.h- Extension
.h- Size
- 6076 bytes
- Lines
- 198
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/seq_file.hdrm/drm_gpuvm.h
Detected Declarations
struct drm_info_liststruct drm_info_nodestruct drm_debugfs_infostruct drm_debugfs_entryfunction Copyrightfunction drm_debugfs_create_filesfunction drm_debugfs_add_filefunction drm_debugfs_clients_add
Annotated Snippet
struct drm_info_list {
/** @name: file name */
const char *name;
/**
* @show:
*
* Show callback. &seq_file->private will be set to the &struct
* drm_info_node corresponding to the instance of this info on a given
* &struct drm_minor.
*/
int (*show)(struct seq_file*, void*);
/** @driver_features: Required driver features for this entry */
u32 driver_features;
/** @data: Driver-private data, should not be device-specific. */
void *data;
};
/**
* struct drm_info_node - Per-minor debugfs node structure
*
* This structure represents a debugfs file, as an instantiation of a &struct
* drm_info_list on a &struct drm_minor.
*
* FIXME:
*
* No it doesn't make a hole lot of sense that we duplicate debugfs entries for
* both the render and the primary nodes, but that's how this has organically
* grown. It should probably be fixed, with a compatibility link, if needed.
*/
struct drm_info_node {
/** @minor: &struct drm_minor for this node. */
struct drm_minor *minor;
/** @info_ent: template for this node. */
const struct drm_info_list *info_ent;
/* private: */
struct list_head list;
struct dentry *dent;
};
/**
* struct drm_debugfs_info - debugfs info list entry
*
* This structure represents a debugfs file to be created by the drm
* core.
*/
struct drm_debugfs_info {
/** @name: File name */
const char *name;
/**
* @show:
*
* Show callback. &seq_file->private will be set to the &struct
* drm_debugfs_entry corresponding to the instance of this info
* on a given &struct drm_device.
*/
int (*show)(struct seq_file*, void*);
/** @driver_features: Required driver features for this entry. */
u32 driver_features;
/** @data: Driver-private data, should not be device-specific. */
void *data;
};
/**
* struct drm_debugfs_entry - Per-device debugfs node structure
*
* This structure represents a debugfs file, as an instantiation of a &struct
* drm_debugfs_info on a &struct drm_device.
*/
struct drm_debugfs_entry {
/** @dev: &struct drm_device for this node. */
struct drm_device *dev;
/** @file: Template for this node. */
struct drm_debugfs_info file;
/** @list: Linked list of all device nodes. */
struct list_head list;
};
#if defined(CONFIG_DEBUG_FS)
void drm_debugfs_create_files(const struct drm_info_list *files,
int count, struct dentry *root,
struct drm_minor *minor);
int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
struct dentry *root, struct drm_minor *minor);
void drm_debugfs_add_file(struct drm_device *dev, const char *name,
Annotation
- Immediate include surface: `linux/types.h`, `linux/seq_file.h`, `drm/drm_gpuvm.h`.
- Detected declarations: `struct drm_info_list`, `struct drm_info_node`, `struct drm_debugfs_info`, `struct drm_debugfs_entry`, `function Copyright`, `function drm_debugfs_create_files`, `function drm_debugfs_add_file`, `function drm_debugfs_clients_add`.
- Atlas domain: Repository Root And Misc / include.
- 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.