From: "Tauro, Riana" <riana.tauro@intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
<rodrigo.vivi@intel.com>, <aravind.iddamsetty@linux.intel.com>,
<badal.nilawar@intel.com>, <ravi.kishore.koppuravuri@intel.com>,
<mallesh.koujalagi@intel.com>, <soham.purkait@intel.com>
Subject: Re: [PATCH v3 4/5] drm/xe/xe_drm_ras: Wire get-counter support into xe_drm_ras for CRI
Date: Thu, 23 Apr 2026 16:48:03 +0530 [thread overview]
Message-ID: <281bcc29-d2b6-4ab0-ab62-f92fe5137a7a@intel.com> (raw)
In-Reply-To: <aen9zByGAMBRGYCR@black.igk.intel.com>
On 4/23/2026 4:39 PM, Raag Jadav wrote:
> On Tue, Apr 21, 2026 at 08:21:00PM +0530, Riana Tauro wrote:
>> Hook CRI get-counter support to xe_drm_ras to allow userspace to query
>> counters if supported. When userspace queries a drm_ras error counter,
>> fetch the latest counter value from system controller.
>>
>> Integrate this with xe_drm_ras.
>>
>> Usage :
>>
>> Query all error counter value using ynl
>>
>> $ sudo ynl --family drm_ras --dump get-error-counter --json \
>> '{"node-id":0}'
>> [{'error-id': 1, 'error-name': 'core-compute', 'error-value': 0},
>> {'error-id': 2, 'error-name': 'soc-internal', 'error-value': 0},
>> {'error-id': 3, 'error-name': 'device-memory', 'error-value': 0},
>> {'error-id': 4, 'error-name': 'pcie', 'error-value': 0},
>> {'error-id': 5, 'error-name': 'fabric', 'error-value': 0}]
>>
>> Query single error counter value using ynl
>>
>> $ sudo ynl --family drm_ras --do get-error-counter --json \
>> '{"node-id":1, "error-id":1}'
> Nit: Align spacing with above command.
>
>> {'error-id': 1, 'error-name': 'core-compute', 'error-value': 2}
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>> v2: split patches (Raag)
>> ---
>> drivers/gpu/drm/xe/xe_drm_ras.c | 19 ++++++++++++-------
>> 1 file changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_drm_ras.c b/drivers/gpu/drm/xe/xe_drm_ras.c
>> index e07dc23a155e..7040ff0f9539 100644
>> --- a/drivers/gpu/drm/xe/xe_drm_ras.c
>> +++ b/drivers/gpu/drm/xe/xe_drm_ras.c
>> @@ -11,19 +11,28 @@
>>
>> #include "xe_device_types.h"
>> #include "xe_drm_ras.h"
>> +#include "xe_ras.h"
>>
>> static const char * const error_components[] = DRM_XE_RAS_ERROR_COMPONENT_NAMES;
>> static const char * const error_severity[] = DRM_XE_RAS_ERROR_SEVERITY_NAMES;
>>
>> -static int hw_query_error_counter(struct xe_drm_ras_counter *info,
>> +static int hw_query_error_counter(struct xe_device *xe,
>> + const enum drm_xe_ras_error_severity severity,
>> u32 error_id, const char **name, u32 *val)
>> {
>> + struct xe_drm_ras *ras = &xe->ras;
>> + struct xe_drm_ras_counter *info = ras->info[severity];
> Use int ret = 0 ...
>
>> if (!info || !info[error_id].name)
>> return -ENOENT;
>>
>> *name = info[error_id].name;
>> *val = atomic_read(&info[error_id].counter);
> Move this as an else case below and ...
My bad!! made a mistake here. Will fix it
Thanks
Riana
>
>> + /* Fetch counter from system controller if supported */
>> + if (xe->info.has_sysctrl)
>> + return xe_ras_get_error_counter(xe, severity, error_id, val);
> ret = get_counter();
>
>> return 0;
> return ret;
>
> Raag
>
>> }
next prev parent reply other threads:[~2026-04-23 11:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 14:50 [PATCH v3 0/5] Add get-error-counter and clear-error-counter support for CRI Riana Tauro
2026-04-21 14:26 ` ✗ CI.checkpatch: warning for Add get-error-counter and clear-error-counter support for CRI (rev2) Patchwork
2026-04-21 14:27 ` ✓ CI.KUnit: success " Patchwork
2026-04-21 14:50 ` [PATCH v3 1/5] drm/xe/uapi: Add additional error components to XE drm_ras Riana Tauro
2026-04-21 14:50 ` [PATCH v3 2/5] drm/xe/xe_ras: Add support to get error counter in CRI Riana Tauro
2026-04-23 10:51 ` Raag Jadav
2026-04-23 11:22 ` Tauro, Riana
2026-04-21 14:50 ` [PATCH v3 3/5] drm/xe/xe_ras: Add helper to clear error counter Riana Tauro
2026-04-23 11:01 ` Raag Jadav
2026-04-23 11:16 ` Tauro, Riana
2026-04-23 12:21 ` Raag Jadav
2026-04-21 14:51 ` [PATCH v3 4/5] drm/xe/xe_drm_ras: Wire get-counter support into xe_drm_ras for CRI Riana Tauro
2026-04-23 11:09 ` Raag Jadav
2026-04-23 11:18 ` Tauro, Riana [this message]
2026-04-21 14:51 ` [PATCH v3 5/5] drm/xe/ras: Add flag for Xe RAS Riana Tauro
2026-04-21 15:45 ` ✓ Xe.CI.BAT: success for Add get-error-counter and clear-error-counter support for CRI (rev2) Patchwork
2026-04-21 18:06 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=281bcc29-d2b6-4ab0-ab62-f92fe5137a7a@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=raag.jadav@intel.com \
--cc=ravi.kishore.koppuravuri@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=soham.purkait@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox