[RFC i-g-t v3 0/1] A tool to demonstrate use of netlink sockets to read RAS error counters

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Aug 13 12:42:25 UTC 2025


Hi Aravind,
On 2025-07-30 at 11:43:41 +0530, Aravind Iddamsetty wrote:
> This tool is to demonstrate the use of netlink sockets to read RAS error
> counters, which is being proposed via series
> "[RFC v5 0/5] Proposal to use netlink for RAS and Telemetry across drm subsystem".
> 
> v2: update uapi header.
> v3: Add DRM_RAS_CMD_READ_BLOCK command to read errors from an IP Block.
> 
> The tool supports the following commands:
> READ_ONE, READ_BLOCK, READ_ALL, WAIT_ON_EVENT, LIST_ERRORS
> 
> read single error counter:
> 
> $ ./drm_ras READ_ONE --device=drm:/dev/dri/card1 --error_id=0x0000000000000005
> counter value 0
> 
> read all error counters:
> 
> $ ./drm_ras READ_ALL --device=drm:/dev/dri/card1
> name                                                    config-id               counter
> 
[cut]

Please add conditional compilation in meson depending on presence
of libnl-dev files (on Ubuntu - libnl-3-dev and/or libnl-cli-3-dev)

Regards,
Kamil

> 
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Simona Vetter <simona at ffwll.ch>
> Cc: David Airlie <airlied at gmail.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: Hawking Zhang <Hawking.Zhang at amd.com>
> Cc: Lijo Lazar <lijo.lazar at amd.com>
> Cc: Riana Tauro <riana.tauro at intel.com>
> Cc: Anshuman Gupta <anshuman.gupta at intel.com>
> 
> 
> Aravind Iddamsetty (1):
>   tools/RAS: A tool to read error counters
> 
>  include/drm-uapi/drm_netlink.h | 105 ++++++++
>  meson.build                    |   4 +
>  tools/drm_ras.c                | 428 +++++++++++++++++++++++++++++++++
>  tools/meson.build              |   5 +
>  4 files changed, 542 insertions(+)
>  create mode 100644 include/drm-uapi/drm_netlink.h
>  create mode 100644 tools/drm_ras.c
> 
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list