include/drm/drm_ras.h
Source file repositories/reference/linux-study-clean/include/drm/drm_ras.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_ras.h- Extension
.h- Size
- 2608 bytes
- Lines
- 87
- 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
uapi/drm/drm_ras.h
Detected Declarations
struct drm_ras_nodestruct drm_devicefunction drm_ras_node_registerfunction drm_ras_node_unregister
Annotated Snippet
struct drm_ras_node {
/** @id: Unique identifier for the node. Dynamically assigned. */
u32 id;
/**
* @device_name: Human-readable name of the device. Given by the driver.
*/
const char *device_name;
/** @node_name: Human-readable name of the node. Given by the driver. */
const char *node_name;
/** @type: Type of the node (enum drm_ras_node_type). */
enum drm_ras_node_type type;
/* Error-Counter Related Callback and Variables */
/** @error_counter_range: Range of valid Error IDs for this node. */
struct {
/** @first: First valid Error ID. */
u32 first;
/** @last: Last valid Error ID. Mandatory entry. */
u32 last;
} error_counter_range;
/**
* @query_error_counter:
*
* This callback is used by drm-ras to query a specific error counter.
* Used for input check and to iterate all error counters in a node.
*
* Driver should expect query_error_counter() to be called with
* error_id from `error_counter_range.first` to
* `error_counter_range.last`.
*
* The @query_error_counter is a mandatory callback for
* error_counter_node.
*
* Returns: 0 on success,
* -ENOENT when error_id is not supported as an indication that
* drm_ras should silently skip this entry. Used for
* supporting non-contiguous error ranges.
* Driver is responsible for maintaining the list of
* supported error IDs in the range of first to last.
* Other negative values on errors that should terminate the
* netlink query.
*/
int (*query_error_counter)(struct drm_ras_node *node, u32 error_id,
const char **name, u32 *val);
/**
* @clear_error_counter:
*
* This callback is used by drm_ras to clear a specific error counter.
* Driver should implement this callback to support clearing error counters
* of a node.
*
* Returns: 0 on success, negative error code on failure.
*/
int (*clear_error_counter)(struct drm_ras_node *node, u32 error_id);
/** @priv: Driver private data */
void *priv;
};
struct drm_device;
#if IS_ENABLED(CONFIG_DRM_RAS)
int drm_ras_node_register(struct drm_ras_node *node);
void drm_ras_node_unregister(struct drm_ras_node *node);
#else
static inline int drm_ras_node_register(struct drm_ras_node *node) { return 0; }
static inline void drm_ras_node_unregister(struct drm_ras_node *node) { }
#endif
#endif
Annotation
- Immediate include surface: `uapi/drm/drm_ras.h`.
- Detected declarations: `struct drm_ras_node`, `struct drm_device`, `function drm_ras_node_register`, `function drm_ras_node_unregister`.
- 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.