From: Raag Jadav <raag.jadav@intel.com>
To: Riana Tauro <riana.tauro@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
Subject: Re: [PATCH 4/5] drm/xe/xe_ras: Add structures and commands for get counter
Date: Wed, 1 Apr 2026 09:58:56 +0200 [thread overview]
Message-ID: <aczQQLhRCPdifEpA@black.igk.intel.com> (raw)
In-Reply-To: <20260320102607.1017511-5-riana.tauro@intel.com>
On Fri, Mar 20, 2026 at 03:55:59PM +0530, Riana Tauro wrote:
> Add request and response structures for get counter command.
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> ---
> drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h | 9 ++
> drivers/gpu/drm/xe/xe_ras_types.h | 151 ++++++++++++++++++++++++
> 2 files changed, 160 insertions(+)
> create mode 100644 drivers/gpu/drm/xe/xe_ras_types.h
>
> diff --git a/drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h b/drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h
> index 4cbde267ac44..fd4248b82f69 100644
> --- a/drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h
> +++ b/drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h
> @@ -40,6 +40,15 @@
> * between driver and System Controller firmware.
> */
>
> +/**
> + * enum xe_sysctrl_group - System Controller command groups
> + *
> + * @XE_SYSCTRL_GROUP_GFSP: GFSP group for RAS commands
> + */
> +enum xe_sysctrl_group {
> + XE_SYSCTRL_GROUP_GFSP = 0x01
I thought we can add this to xe_sysctrl_mailbox.h but it seems I was
mistaken.
> +};
> +
> /**
> * struct xe_sysctrl_app_msg_hdr - Application layer message header
> * @data: 32-bit header data
> diff --git a/drivers/gpu/drm/xe/xe_ras_types.h b/drivers/gpu/drm/xe/xe_ras_types.h
> new file mode 100644
> index 000000000000..b3256a28221e
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/xe_ras_types.h
> @@ -0,0 +1,151 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2026 Intel Corporation
> + */
> +
> +#ifndef _XE_RAS_TYPES_H_
> +#define _XE_RAS_TYPES_H_
> +
> +#include <linux/types.h>
> +
> +#define XE_RAS_INFO_QUEUE_MAX_CHUNK_SIZE 200
> +
> +/**
> + * enum xe_ras_command - RAS Command IDs for GFSP group
> + *
> + * @XE_RAS_CMD_GET_COUNTER: Get RAS counter information
> + */
> +enum xe_ras_command {
> + XE_RAS_CMD_GET_COUNTER = 0x03
We have commands like GET_PENDING_EVENT that are likely to be used for
wider usecases, so not if this is a suitable place for it.
> +};
> +
> +/**
> + * struct xe_ras_error_common - Common RAS error class
> + *
> + * This structure contains error severity and component information
> + * across all products
> + */
> +struct xe_ras_error_common {
> + /** @severity: Error Severity */
> + u8 severity;
> + /** @component: IP where the error originated */
> + u8 component;
> +} __packed;
> +
> +/**
> + * struct xe_ras_error_unit - Error unit information
> + */
> +struct xe_ras_error_unit {
> + /** @tile: Tile identifier */
> + u8 tile;
> + /** @instance: Instance identifier within a component */
> + u32 instance;
> +} __packed;
> +
> +/**
> + * struct xe_ras_error_cause - Error cause information
> + */
> +struct xe_ras_error_cause {
> + /** @cause: Cause */
> + u32 cause;
> + /** @reserved: For future use */
> + u8 reserved;
> +} __packed;
> +
> +/**
> + * struct xe_ras_error_product - Error fields that are specific to the product
> + */
> +struct xe_ras_error_product {
> + /** @unit: Unit within IP block */
> + struct xe_ras_error_unit unit;
> + /** @error_cause: Cause/checker */
> + struct xe_ras_error_cause error_cause;
> +} __packed;
> +
> +/**
> + * struct xe_ras_error_class - Complete RAS Error Class
> + *
> + * This structure provides the complete error classification by combining
> + * the common error class with the product-specific error class.
> + */
> +struct xe_ras_error_class {
> + /** @common: Common error severity and component */
> + struct xe_ras_error_common common;
> + /** @product: Product-specific unit and cause */
> + struct xe_ras_error_product product;
> +} __packed;
> +
> +/**
> + * struct xe_ras_info_queue_header - Info queue header
> + *
> + * This structure provides metadata about large info queue data
> + */
> +struct xe_ras_info_queue_header {
> + /** @total_size: Total size of complete info queue data (bytes) */
> + u32 total_size;
> + /** @chunk_offset: Offset of this chunk within total data (bytes) */
> + u32 chunk_offset;
> + /** @chunk_size: Size of data in this chunk (bytes) */
> + u32 chunk_size;
> + /** @sequence_number: Sequence number of this chunk (Starts at 0) */
> + u32 sequence_number;
> + /** @flags: Info queue control flags */
> + u32 flags:8;
Why not u8?
> + /** @compression_type: Compression type used for this chunk */
> + u32 compression_type:4;
Ditto.
> + /** @reserved: Reserved for future use */
> + u32 reserved:20;
> + /** @checksum: Checksum of the chunk data */
> + u32 checksum;
> +} __packed;
> +
> +/**
> + * struct xe_ras_info_queue_response - Info queue response
> + *
> + * This structure provides the response for commands with info queue
> + */
> +struct xe_ras_info_queue_response {
> + /** @queue_header: Info queue metadata */
> + struct xe_ras_info_queue_header queue_header;
> + /** @queue_data: Info queue data chunk */
> + u8 queue_data[XE_RAS_INFO_QUEUE_MAX_CHUNK_SIZE];
> +} __packed;
> +
> +/**
> + * struct xe_ras_get_counter_request - Request for XE_RAS_CMD_GET_COUNTER
> + *
> + * This structure defines the request format for getting RAS counter values
> + */
> +struct xe_ras_get_counter_request {
> + /** @counter_class: RAS error class */
> + struct xe_ras_error_class counter_class;
> + /** @reserved: Reserved for future use */
> + u32 reserved;
> +} __packed;
> +
> +/**
> + * struct xe_ras_get_counter_response - Response for XE_RAS_CMD_GET_COUNTER
> + *
> + * This structure defines the response format for getting RAS counter values
> + */
> +struct xe_ras_get_counter_response {
> + /** @counter_class: RAS error class */
> + struct xe_ras_error_class counter_class;
> + /** @counter_value: Current counter value */
> + u32 counter_value;
> + /** @timestamp: Timestamp of the counter value */
> + u64 timestamp;
> + /** @threshold_value: Threshold value for the counter */
> + u32 threshold_value;
> + /** @counter_status: Status of the counter */
> + u32 counter_status:8;
Ditto.
> + /** @reserved: Reserved for future use */
> + u32 reserved:1;
Ditto.
> + /** @has_info_queue: Indicates if info queue is present */
> + u32 has_info_queue:1;
Ditto.
Raag
> + /** @reserved1: Reserved for future use */
> + u32 reserved1:22;
> + /** @info_queue: Info queue data */
> + struct xe_ras_info_queue_response info_queue;
> +} __packed;
> +#endif
> --
> 2.47.1
>
next prev parent reply other threads:[~2026-04-01 7:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 10:25 [PATCH 0/5] Add get-error-counter support for CRI Riana Tauro
2026-03-20 10:25 ` [PATCH 1/5] drm/xe/xe_sysctrl: Add System controller patch Riana Tauro
2026-03-20 10:25 ` [PATCH 2/5] drm/xe/uapi: Add additional error components to XE DRM RAS Riana Tauro
2026-03-25 9:24 ` Aravind Iddamsetty
2026-03-20 10:25 ` [PATCH 3/5] drm/xe/ras: Add flag for Xe RAS Riana Tauro
2026-04-01 7:53 ` Raag Jadav
2026-04-06 5:25 ` Tauro, Riana
2026-03-20 10:25 ` [PATCH 4/5] drm/xe/xe_ras: Add structures and commands for get counter Riana Tauro
2026-04-01 7:58 ` Raag Jadav [this message]
2026-04-06 5:23 ` Tauro, Riana
2026-04-07 7:45 ` Raag Jadav
2026-04-07 7:58 ` Tauro, Riana
2026-03-20 10:26 ` [PATCH 5/5] drm/xe/xe_ras: Add support to query error counter for CRI Riana Tauro
2026-04-01 8:08 ` Raag Jadav
2026-04-06 7:29 ` Tauro, Riana
2026-03-20 10:33 ` ✗ CI.checkpatch: warning for Add get-error-counter support " Patchwork
2026-03-20 10:35 ` ✓ CI.KUnit: success " Patchwork
2026-03-20 11:16 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-03-21 8:10 ` ✓ Xe.CI.FULL: success " 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=aczQQLhRCPdifEpA@black.igk.intel.com \
--to=raag.jadav@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=ravi.kishore.koppuravuri@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.