Re: [PATCH v4 2/5] drm/ras: Introduce error threshold
From: Raag Jadav <raag.jadav@intel.com>
Date: 2026-07-18 05:27:06
Also in:
dri-devel, intel-xe
On Fri, Jul 03, 2026 at 10:43:06AM +0530, Tauro, Riana wrote:
On 23-06-2026 15:39, Raag Jadav wrote:quoted
Add get-error-threshold and set-error-threshold command support which allows querying/setting error threshold of the counter. Threshold in RAS context means the number of errors the hardware is expected to accumulate before it raises them to software. This is to have a fine grained control over error notifications that are raised by the hardware.
...
quoted
* + The error counters in the driver doesn't need to be contiguous, but the * driver must return -ENOENT to the query_error_counter as an indication * that the ID should be skipped and not listed in the netlink API. + * + The driver can optionally implement query_error_threshold() and + * set_error_threshold() callbacks to facilitate getting/setting error + * threshold of the counter. Threshold in RAS context means the number of + * errors the hardware is expected to accumulate before it raises them to + * software. This is to have a fine grained control over error notifications + * that are raised by the hardware. + * + The driver is responsible for error threshold bounds checking. + * + Threshold of 0 can mean invalid threshold or act as a disable notifications + * toggle for that counter depending on usecase and the driver is responsible + * for handling it as needed.I know i asked you to add this in last rev. But after reading this, error-threshold bounds checking at driver level should be sufficient. It's upto the driver on what behavior needs to be implemented. Some may notify on reaching threshold or crossing threshold. I think we should drop this sentence here. Let me know your thoughts. sorry for the confusion.
I think it adds more context and good to have in case someone comes up looking for the details. ...
quoted
+ /** + * @query_error_threshold: + * + * This callback is used by drm-ras to query error threshold of a + * specific counter. + * + * Driver should expect query_error_threshold() to be called with + * error_id from `error_counter_range.first` to + * `error_counter_range.last`. + * + * Returns: 0 on success, negative error code on failure. + */ + int (*query_error_threshold)(struct drm_ras_node *node, u32 error_id, const char **name, + u32 *threshold);Add a blank line
Sure.
With these fixed Reviewed-by: Riana Tauro <redacted>
Awesome. Raag