Family drm-ras netlink specification¶
Summary¶
DRM RAS (Reliability, Availability, Serviceability) over Generic Netlink. Provides a standardized mechanism for DRM drivers to register “nodes” representing hardware/software components capable of reporting error counters. Userspace tools can query the list of nodes or individual error counters via the Generic Netlink interface.
Operations¶
list-nodes¶
Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. Important: User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
- attribute-set:
- dump:
- reply
- attributes:
[
node-id,device-name,node-name,node-type]
get-error-counter¶
Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
- attribute-set:
- flags:
[
admin-perm]- do:
- request
- attributes:
[
node-id,error-id]
- reply
- attributes:
[
error-id,error-name,error-value]
- dump:
- request
- attributes:
[
node-id]
- reply
- attributes:
[
error-id,error-name,error-value]
clear-error-counter¶
Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
- attribute-set:
- flags:
[
admin-perm]- do:
- request
- attributes:
[
node-id,error-id]
error-event¶
Report an error event to userspace. The event includes the device, node and error information of the error that triggered the event.
- attribute-set:
- mcgrp:
error-report
- event:
- attributes:
[
device-name,node-id,node-name,error-id,error-name,error-value]
get-error-threshold¶
Retrieve error threshold of a given counter. The response includes the id, the name, and current threshold of the counter.
- attribute-set:
- flags:
[
admin-perm]- do:
- request
- attributes:
[
node-id,error-id]
- reply
- attributes:
[
error-id,error-name,error-threshold]
set-error-threshold¶
Set error threshold of a given counter.
- attribute-set:
- flags:
[
admin-perm]- do:
- request
- attributes:
[
node-id,error-id,error-threshold]
telemetry-get¶
Perform a read of the specified telemetry field.
- attribute-set:
- do:
- pre
drm-ras-nl-pre-telemetry
- post
drm-ras-nl-post-telemetry
- request
- attributes:
[
node-id,field]
- reply
- attributes:
[
value,status]
telemetry-set¶
Perform a write of the specified telemetry field. Telemetry writes are device specific, and may be used to set device limits or other capacities, for example.
- attribute-set:
- flags:
[
admin-perm]- do:
- pre
drm-ras-nl-pre-telemetry
- post
drm-ras-nl-post-telemetry
- request
- attributes:
[
node-id,field,value]
- reply
- attributes:
[
status]
telemetry-list-fields¶
Enumerate the telemetry fields exposed by a node, reporting each field’s value, name, and supported access modes (read/write).
- attribute-set:
- dump:
- request
- attributes:
[
node-id]
- reply
- attributes:
[
field,field-name,mode]
Multicast groups¶
error-report
Definitions¶
node-type¶
- type:
enum
- value-start:
1
- doc:
Type of the node. The error-counter nodes expose reliability counters for a hardware/software component, and telemetry nodes expose an interface for reading and writing telemetry values to a device.
- entries:
error-countertelemetry
telemetry-field-mode¶
- type:
flags
- doc:
Bitmask of access modes supported by a telemetry field.
- entries:
readwrite
Attribute sets¶
node-attrs¶
node-id (u32)¶
- doc:
Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
device-name (string)¶
- doc:
Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
node-name (string)¶
- doc:
Node name chosen by the driver at registration. Can be an IP block name, or any name that identifies the RAS node inside the device.
node-type (u32)¶
- doc:
Type of this node, identifying its function.
- enum:
error-counter-attrs¶
node-id (u32)¶
- doc:
Node ID targeted by this error counter operation.
error-id (u32)¶
- doc:
Unique identifier for a specific error counter within an node.
error-name (string)¶
- doc:
Name of the error.
error-value (u32)¶
- doc:
Current value of the requested error counter.
error-threshold (u32)¶
- doc:
Error threshold of the counter.
error-event-attrs¶
device-name (string)¶
- doc:
Device (PCI BDF, UUID) that reported the error.
node-id (u32)¶
- doc:
ID of the node that reported the error.
node-name (string)¶
- doc:
Name of the node that reported the error.
error-id (u32)¶
- doc:
ID of the error counter.
error-name (string)¶
- doc:
Name of the error.
error-value (u32)¶
- doc:
Current value of the error counter.
telemetry-attrs¶
node-id (u32)¶
- doc:
Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
field (uint)¶
- doc:
Telemetry field to be read/written, e.g., SoC temp.
field-name (string)¶
- doc:
Name of the telemetry field defined by the device’s uAPI.
value (sint)¶
- doc:
Value of telemetry field that was read/written.
status (sint)¶
- doc:
Status of the telemetry operation. Populated by the device in response to the performed telemetry operation. Errors may be hardware specific.
mode (uint)¶
- enum:
- doc:
Bitmask of access modes (read/write) supported by the telemetry field.