xref: /linux/Documentation/netlink/specs/drm_ras.yaml (revision 4a57e0913e8c7fff407e97909f4ae48caa84d612)
1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2---
3name: drm-ras
4protocol: genetlink
5uapi-header: drm/drm_ras.h
6
7doc: >-
8  DRM RAS (Reliability, Availability, Serviceability) over Generic Netlink.
9  Provides a standardized mechanism for DRM drivers to register "nodes"
10  representing hardware/software components capable of reporting error counters.
11  Userspace tools can query the list of nodes or individual error counters
12  via the Generic Netlink interface.
13
14definitions:
15  -
16    type: enum
17    name: node-type
18    value-start: 1
19    entries: [error-counter]
20    doc: >-
21         Type of the node. Currently, only error-counter nodes are
22         supported, which expose reliability counters for a hardware/software
23         component.
24
25attribute-sets:
26  -
27    name: node-attrs
28    attributes:
29      -
30        name: node-id
31        type: u32
32        doc: >-
33             Unique identifier for the node.
34             Assigned dynamically by the DRM RAS core upon registration.
35      -
36        name: device-name
37        type: string
38        doc: >-
39             Device name chosen by the driver at registration.
40             Can be a PCI BDF, UUID, or module name if unique.
41      -
42        name: node-name
43        type: string
44        doc: >-
45             Node name chosen by the driver at registration.
46             Can be an IP block name, or any name that identifies the
47             RAS node inside the device.
48      -
49        name: node-type
50        type: u32
51        doc: Type of this node, identifying its function.
52        enum: node-type
53  -
54    name: error-counter-attrs
55    attributes:
56      -
57        name: node-id
58        type: u32
59        doc: Node ID targeted by this error counter operation.
60      -
61        name: error-id
62        type: u32
63        doc: Unique identifier for a specific error counter within an node.
64      -
65        name: error-name
66        type: string
67        doc: Name of the error.
68      -
69        name: error-value
70        type: u32
71        doc: Current value of the requested error counter.
72
73operations:
74  list:
75    -
76      name: list-nodes
77      doc: >-
78           Retrieve the full list of currently registered DRM RAS nodes.
79           Each node includes its dynamically assigned ID, name, and type.
80           **Important:** User space must call this operation first to obtain
81           the node IDs. These IDs are required for all subsequent
82           operations on nodes, such as querying error counters.
83      attribute-set: node-attrs
84      flags: [admin-perm]
85      dump:
86        reply:
87          attributes:
88            - node-id
89            - device-name
90            - node-name
91            - node-type
92    -
93      name: get-error-counter
94      doc: >-
95           Retrieve error counter for a given node.
96           The response includes the id, the name, and even the current
97           value of each counter.
98      attribute-set: error-counter-attrs
99      flags: [admin-perm]
100      do:
101        request:
102          attributes:
103            - node-id
104            - error-id
105        reply:
106          attributes: &errorinfo
107            - error-id
108            - error-name
109            - error-value
110      dump:
111        request:
112          attributes:
113            - node-id
114        reply:
115          attributes: *errorinfo
116