On Mon, 2026-11-09 at 14:05 -0700, Zack McKevitt wrote:

On 11/9/2026 8:41 AM, Rodrigo Vivi wrote:
On Fri, Nov 06, 2026 at 10:12:24AM -0800, Zack McKevitt wrote:
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 
<[email protected]<mailto:[email protected]>>
Signed-off-by: Zack McKevitt 
<[email protected]<mailto:[email protected]>>
---
  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?

this was related to my next comment about avoiding u32, while
in here we would keep it...
But feel free to ignore me in here...


[...]

+      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.

hmm I see now...

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?

I guess extra r/w option is a bit more clear, but no hard preference from my 
side.


Reply via email to