Re: [PATCH v3 2/3] drm/drm_ras: Extend DRM RAS interface to include telemetry nodes

From
Zack McKevitt <hidden>
Date
2026-11-09 21:06:31
Also in
dri-devel
Reply to
Rodrigo Vivi, 2026-11-09

On 11/9/2026 8:41 AM, Rodrigo Vivi wrote:
On Fri, Nov 06, 2026 at 10:12:24AM -0800, Zack McKevitt wrote:
quoted
Add a new node type, attribute set, and doit/dump functions for
performing telemetry read and write operations using the DRM RAS
interface.

ynl-regen.sh was used to regenerate drm_ras_nl.c, drm_ras_nl.h, and
include/uapi/drm/drm_ras.h from the drm_ras.yaml spec.

Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Zack McKevitt <redacted>
---
  Documentation/netlink/specs/drm_ras.yaml |  82 +++++-
  drivers/gpu/drm/drm_ras.c                | 329 ++++++++++++++++++++++-
  drivers/gpu/drm/drm_ras_nl.c             |  53 ++++
  drivers/gpu/drm/drm_ras_nl.h             |   9 +
  include/drm/drm_ras.h                    |  67 +++++
  include/uapi/drm/drm_ras.h               |  19 +-
  6 files changed, 545 insertions(+), 14 deletions(-)
diff --git a/Documentation/netlink/specs/drm_ras.yaml b/Documentation/netlink/specs/drm_ras.yaml
index a88fdab7a1c7..cf015bba020d 100644
--- a/Documentation/netlink/specs/drm_ras.yaml
+++ b/Documentation/netlink/specs/drm_ras.yaml
@@ -16,11 +16,11 @@ definitions:
      type: enum
      name: node-type
      value-start: 1
-    entries: [error-counter]
+    entries: [error-counter, telemetry]
      doc: >-
-         Type of the node. Currently, only error-counter nodes are
-         supported, which expose reliability counters for a hardware/software
-         component.
+         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.
  
  attribute-sets:
    -
@@ -100,6 +100,34 @@ attribute-sets:
          name: error-value
          type: u32
          doc: Current value of the error counter.
+  -
+    name: telemetry-attrs
+    attributes:
+      -
+        name: node-id
+        type: u32
this we keep for legacy alignment.
Im a little confused at this comment here. Anything you are suggesting to change?

[...]
quoted
+      name: telemetry-set
+      doc: >-
+           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: telemetry-attrs
+      flags: [admin-perm]
+      do:
+        pre: drm-ras-nl-pre-telemetry
+        request:
+          attributes:
+            - node-id
+            - field
+            - value
+        reply:
+          attributes:
+            - status
+      dump:
does dump on set specified telemetry field makes sense?!
The logic here was to separate gettable and settable fields. If you check the qaic driver changes in the next patch, you will see that the settable list is a significantly smaller subset of the gettable list.

So, the settable dumpit would tell you distinctly which fields are writeable. If you prefer, I guess we could add a single dump operation with an additional field for R/W, but this will require an additional attribute to be defined in the spec.

Any preference?
Thread (7 messages) 7 messages, 3 authors, last reply 8d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help