This patch series extends the drm_ras netlink interface to include a new node type for telemetry nodes. Telemetry nodes support two operations, reading and writing, and drivers may specify an optional predoit function to validate each operation.
Telemetry read operations take the drm_ras node id and telemetry field to be read and return the field's value and any status reported by the driver. Telemetry write operations take the node id, telemetry field, and value, and return only the status reported by the driver. This extension removes the admin requirement on the list-nodes operation. This allows drm_ras nodes to be discovered by userspace programs for drivers that do not necessarily require admin privileges, like qaic. The new drm_ras telemetry interface is implemented by the qaic driver, which exposes the telemetry fields to userspace and enforces filesystem-esque permission checks on telemetry operations in its telemetry_pre callback. Zack McKevitt (3): drm/drm_ras: Remove admin-perm flag from list-nodes operation drm/drm_ras: Extend DRM RAS interface to include telemetry nodes accel/qaic: Add callbacks for DRM RAS netlink telemetry Documentation/netlink/specs/drm_ras.yaml | 56 ++- drivers/accel/qaic/Makefile | 1 + drivers/accel/qaic/qaic.h | 19 + drivers/accel/qaic/qaic_drv.c | 19 + drivers/accel/qaic/qaic_telemetry.c | 463 +++++++++++++++++++++++ drivers/accel/qaic/qaic_telemetry.h | 18 + drivers/gpu/drm/drm_ras.c | 193 +++++++++- drivers/gpu/drm/drm_ras_nl.c | 31 +- drivers/gpu/drm/drm_ras_nl.h | 6 + include/drm/drm_ras.h | 39 ++ include/uapi/drm/drm_ras.h | 14 + include/uapi/drm/qaic_accel.h | 28 ++ 12 files changed, 876 insertions(+), 11 deletions(-) create mode 100644 drivers/accel/qaic/qaic_telemetry.c create mode 100644 drivers/accel/qaic/qaic_telemetry.h -- 2.43.0
