STRUCT DRM_RAS_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the struct drm_ras_node(9) page from the Kernel API Manual β€” yes, that manual name is literally in the header, and we're folding it in right here because this is the DRM RAS Node manual and it's iconic ✨

struct drm_ras_node β€” A DRM RAS Node. That's the name. That's the whole name. no cap πŸ’…


✨ SYNOPSIS ✨

okay so here's the struct in all its main-character glory, copied exactly, don't @ me 🫢

       struct drm_ras_node {
           u32 id;
           const char *device_name;
           const char *node_name;
           enum drm_ras_node_type type;
           struct {
             u32 first;
             u32 last;
           } error_counter_range;
           int (*query_error_counter)(struct drm_ras_node *node, u32 error_id,
       const char **name, u32 *val);
           int (*clear_error_counter)(struct drm_ras_node *node, u32 error_id);
           void *priv;
        };

πŸŽ€ Members πŸŽ€

  • id β€” Unique identifier for the node. Dynamically assigned. πŸ†”βœ¨ lowkey the node's whole identity.
  • device_name β€” Human-readable name of the device. Given by the driver. 🏷️ so the driver picks the vibe.
  • node_name β€” Human-readable name of the node. Given by the driver. πŸŽ€ also driver-chosen, fr fr.
  • type β€” Type of the node (enum drm_ras_node_type). 🌈 the enum is right there, bestie.
  • error_counter_range β€” Range of valid Error IDs for this node. πŸ“Š it's giving first to last, periodt.
  • 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. ⚠️ mandatory means mandatory, bestie β€” don't skip it.

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. πŸ’€

  • 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. 😭

  • priv β€” Driver private data. πŸ”’ literally the driver's private stash, iykyk.
bestie, query_error_counter is the mandatory one for error_counter_node β€” that's not a vibe check you can fail, fr fr πŸ’€βœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/drm/drm_ras.h β€” go read it, it's giving source-of-truth energy πŸ’…

mwah πŸ’– this page comes from the ./include/drm corner of the kernel, October 2026 edition, and it's literally titled struct drm_ras_node(9) β€” slay and goodbye 🫢✨

πŸ“¦ where this page comes from