Files
RedBear-OS/local/recipes/gpu/amdgpu-source/include/drm/drm_ras.h
T
vasilito dc68054305 restore lost packages from 0.2.3 + fix overwritten 0.2.4 files
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.)
- Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber)
- Restore 20+ local/scripts (audit, lint, test, build helpers)
- Restore src/cook/scheduler.rs, status.rs, gnu-config/
- Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh
- Recover TLC source from HEAD (was overwritten by 0.2.3 checkout)
- Recover 11 local/docs plans from HEAD (were overwritten)
- Recover qt6-wayland-smoke symlink from HEAD
- Fix MOTD: remove garbled ASCII art, use clean text
- Update version: 0.2.0 -> 0.2.4 in os-release, motd, config
- Reduce filesystem_size: 1536 -> 512 MiB
- Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages
- Reduce pcid scheme log verbosity: info -> debug
2026-06-19 12:39:14 +03:00

76 lines
2.2 KiB
C

/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2026 Intel Corporation
*/
#ifndef __DRM_RAS_H__
#define __DRM_RAS_H__
#include <uapi/drm/drm_ras.h>
/**
* struct drm_ras_node - A DRM RAS Node
*/
struct drm_ras_node {
/** @id: Unique identifier for the node. Dynamically assigned. */
u32 id;
/**
* @device_name: Human-readable name of the device. Given by the driver.
*/
const char *device_name;
/** @node_name: Human-readable name of the node. Given by the driver. */
const char *node_name;
/** @type: Type of the node (enum drm_ras_node_type). */
enum drm_ras_node_type type;
/* Error-Counter Related Callback and Variables */
/** @error_counter_range: Range of valid Error IDs for this node. */
struct {
/** @first: First valid Error ID. */
u32 first;
/** @last: Last valid Error ID. Mandatory entry. */
u32 last;
} error_counter_range;
/**
* @query_error_counter:
*
* This callback is used by drm-ras to query a specific error counter.
* Used for input check and to iterate all error counters in a node.
*
* Driver should expect query_error_counter() to be called with
* error_id from `error_counter_range.first` to
* `error_counter_range.last`.
*
* The @query_error_counter is a mandatory callback for
* error_counter_node.
*
* Returns: 0 on success,
* -ENOENT when error_id is not supported as an indication that
* drm_ras should silently skip this entry. Used for
* supporting non-contiguous error ranges.
* Driver is responsible for maintaining the list of
* supported error IDs in the range of first to last.
* Other negative values on errors that should terminate the
* netlink query.
*/
int (*query_error_counter)(struct drm_ras_node *node, u32 error_id,
const char **name, u32 *val);
/** @priv: Driver private data */
void *priv;
};
struct drm_device;
#if IS_ENABLED(CONFIG_DRM_RAS)
int drm_ras_node_register(struct drm_ras_node *node);
void drm_ras_node_unregister(struct drm_ras_node *node);
#else
static inline int drm_ras_node_register(struct drm_ras_node *node) { return 0; }
static inline void drm_ras_node_unregister(struct drm_ras_node *node) { }
#endif
#endif