Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 43 additions & 41 deletions level_zero/sysman/source/shared/linux/nl_api/sysman_drm_nl_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int DrmNlApi::handleMsg(struct nl_msg *msg) {

int DrmNlApi::handleAck(struct nl_msg *msg) {
auto isAckOnlyCmd = [](uint16_t cmdOp) {
return cmdOp == DRM_RAS_CMD_CLEAR_ERROR_COUNTER || cmdOp == NEO_DRM_RAS_CMD_SET_ERROR_THRESHOLD;
return cmdOp == DRM_RAS_CMD_CLEAR_ERROR_COUNTER || cmdOp == DRM_RAS_CMD_SET_ERROR_THRESHOLD;
};

struct nlmsghdr *nlh = pNlApi->nlmsgHdr(msg);
Expand Down Expand Up @@ -284,17 +284,17 @@ ze_result_t DrmNlApi::getErrorThresholdRsp(struct nl_cache_ops *ops, struct genl
DrmErrorThreshold *threshold = reinterpret_cast<DrmErrorThreshold *>(currentOperation->pOutput);
UNRECOVERABLE_IF(threshold == nullptr);

if (info->attrs[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_ID]) {
if (info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID]) {
threshold->errorId = pNlApi->nlaGetU32(
info->attrs[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_ID]);
info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID]);
}
if (info->attrs[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_NAME]) {
if (info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_NAME]) {
threshold->errorName = pNlApi->nlaGetString(
info->attrs[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_NAME]);
info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_NAME]);
}
if (info->attrs[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_THRESHOLD]) {
if (info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_THRESHOLD]) {
threshold->threshold = pNlApi->nlaGetU32(
info->attrs[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_THRESHOLD]);
info->attrs[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_THRESHOLD]);
}

currentOperation->done = true;
Expand Down Expand Up @@ -477,12 +477,12 @@ ze_result_t DrmNlApi::issueRequestSetThreshold(const uint32_t &nodeId, const uin
}

struct nl_msg *msg;
result = allocMsg(NEO_DRM_RAS_CMD_SET_ERROR_THRESHOLD, false, msg);
result = allocMsg(DRM_RAS_CMD_SET_ERROR_THRESHOLD, false, msg);
if (ZE_RESULT_SUCCESS == result) {
pNlApi->nlaPutU32(msg, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_NODE_ID, nodeId);
pNlApi->nlaPutU32(msg, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_ID, errorId);
pNlApi->nlaPutU32(msg, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_THRESHOLD, threshold);
result = performTransaction(NEO_DRM_RAS_CMD_SET_ERROR_THRESHOLD, msg, nullptr, false);
pNlApi->nlaPutU32(msg, DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID, nodeId);
pNlApi->nlaPutU32(msg, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID, errorId);
pNlApi->nlaPutU32(msg, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_THRESHOLD, threshold);
result = performTransaction(DRM_RAS_CMD_SET_ERROR_THRESHOLD, msg, nullptr, false);
}

cleanupConnection();
Expand All @@ -496,11 +496,11 @@ ze_result_t DrmNlApi::issueRequestGetThreshold(const uint32_t &nodeId, const uin
}

struct nl_msg *msg;
result = allocMsg(NEO_DRM_RAS_CMD_GET_ERROR_THRESHOLD, false, msg);
result = allocMsg(DRM_RAS_CMD_GET_ERROR_THRESHOLD, false, msg);
if (ZE_RESULT_SUCCESS == result) {
pNlApi->nlaPutU32(msg, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_NODE_ID, nodeId);
pNlApi->nlaPutU32(msg, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_ID, errorId);
result = performTransaction(NEO_DRM_RAS_CMD_GET_ERROR_THRESHOLD, msg, pOutput, false);
pNlApi->nlaPutU32(msg, DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID, nodeId);
pNlApi->nlaPutU32(msg, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID, errorId);
result = performTransaction(DRM_RAS_CMD_GET_ERROR_THRESHOLD, msg, pOutput, false);
}

cleanupConnection();
Expand Down Expand Up @@ -533,22 +533,25 @@ void DrmNlApi::setupNlOperations() {
nodePolicy[DRM_RAS_A_NODE_ATTRS_NODE_NAME].type = NLA_NUL_STRING;
nodePolicy[DRM_RAS_A_NODE_ATTRS_NODE_TYPE].type = NLA_U32;

// Setup error counter attribute policy
// Setup error counter attribute policy, shared by the error counter and the error threshold commands
memset(errorPolicy, 0, sizeof(nla_policy) * (DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX + 1));
errorPolicy[DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID].type = NLA_U32;
errorPolicy[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID].type = NLA_U32;
errorPolicy[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_NAME].type = NLA_NUL_STRING;
errorPolicy[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_VALUE].type = NLA_U32;
errorPolicy[DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_THRESHOLD].type = NLA_U32;

// Setup threshold attribute policy
memset(thresholdPolicy, 0, sizeof(nla_policy) * (NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_MAX + 1));
thresholdPolicy[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_NODE_ID].type = NLA_U32;
thresholdPolicy[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_ID].type = NLA_U32;
thresholdPolicy[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_NAME].type = NLA_NUL_STRING;
thresholdPolicy[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_THRESHOLD].type = NLA_U32;
// Setup error event attribute policy
memset(eventPolicy, 0, sizeof(nla_policy) * (DRM_RAS_A_ERROR_EVENT_ATTRS_MAX + 1));
eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_DEVICE_NAME].type = NLA_NUL_STRING;
eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID].type = NLA_U32;
eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_NAME].type = NLA_NUL_STRING;
eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID].type = NLA_U32;
eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_NAME].type = NLA_NUL_STRING;
eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_VALUE].type = NLA_U32;

// Setup commands
memset(newCmds, 0, sizeof(genl_cmd) * NEO_DRM_RAS_CMD_MAX);
memset(newCmds, 0, sizeof(genl_cmd) * DRM_RAS_CMD_MAX);

newCmds[0].c_id = DRM_RAS_CMD_LIST_NODES;
newCmds[0].c_name = const_cast<char *>("LIST_NODES");
Expand All @@ -568,29 +571,28 @@ void DrmNlApi::setupNlOperations() {
newCmds[2].c_attr_policy = errorPolicy;
newCmds[2].c_msg_parser = nullptr; // ACK-only command, no data parser needed

newCmds[3].c_id = NEO_DRM_RAS_CMD_SET_ERROR_THRESHOLD;
newCmds[3].c_name = const_cast<char *>("SET_ERROR_THRESHOLD");
newCmds[3].c_maxattr = NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_MAX;
newCmds[3].c_attr_policy = thresholdPolicy;
newCmds[3].c_msg_parser = nullptr; // SET has no reply payload; ACK is handled by NL_CB_ACK
newCmds[3].c_id = DRM_RAS_CMD_ERROR_EVENT;
newCmds[3].c_name = const_cast<char *>("ERROR_EVENT");
newCmds[3].c_maxattr = DRM_RAS_A_ERROR_EVENT_ATTRS_MAX;
newCmds[3].c_attr_policy = eventPolicy;
newCmds[3].c_msg_parser = nullptr; // Events parsed in handleEventMsg

newCmds[4].c_id = NEO_DRM_RAS_CMD_GET_ERROR_THRESHOLD;
newCmds[4].c_id = DRM_RAS_CMD_GET_ERROR_THRESHOLD;
newCmds[4].c_name = const_cast<char *>("GET_ERROR_THRESHOLD");
newCmds[4].c_maxattr = NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_MAX;
newCmds[4].c_attr_policy = thresholdPolicy;
newCmds[4].c_maxattr = DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX;
newCmds[4].c_attr_policy = errorPolicy;
newCmds[4].c_msg_parser = &drmNlOperationGetThreshold;

newCmds[5].c_id = DRM_RAS_CMD_ERROR_EVENT;
newCmds[5].c_name = const_cast<char *>("ERROR_EVENT");
newCmds[5].c_id = DRM_RAS_CMD_SET_ERROR_THRESHOLD;
newCmds[5].c_name = const_cast<char *>("SET_ERROR_THRESHOLD");
newCmds[5].c_maxattr = DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX;
newCmds[5].c_attr_policy = errorPolicy;
newCmds[5].c_msg_parser = nullptr; // Events parsed in handleEventMsg
newCmds[5].c_msg_parser = nullptr; // SET has no reply payload; ACK is handled by NL_CB_ACK

// Use fixed family name
ops.o_name = const_cast<char *>(DRM_RAS_FAMILY_NAME); // "drm-ras"
ops.o_name = const_cast<char *>(DRM_RAS_FAMILY_NAME);
ops.o_hdrsize = 0U;
ops.o_cmds = newCmds;
ops.o_ncmds = NEO_DRM_RAS_CMD_MAX;
ops.o_ncmds = DRM_RAS_CMD_MAX;
}

ze_result_t DrmNlApi::subscribeToEvents() {
Expand Down Expand Up @@ -669,7 +671,7 @@ ze_result_t DrmNlApi::initEventSocket() {
return ZE_RESULT_ERROR_UNKNOWN;
}

eventGroupId = pNlApi->genlCtrlResolveGrp(nlEventSock, DRM_RAS_FAMILY_NAME, "error-notify");
eventGroupId = pNlApi->genlCtrlResolveGrp(nlEventSock, DRM_RAS_FAMILY_NAME, DRM_RAS_MCGRP_ERROR_REPORT);
if (eventGroupId < 0) {
cleanupEventSocket();
return ZE_RESULT_ERROR_UNKNOWN;
Expand Down Expand Up @@ -723,10 +725,10 @@ ze_result_t DrmNlApi::parseEventMessage(struct nl_msg *msg, DrmRasEvent &event)
event = {};
while (pNlApi->nlaOk(nla, rem)) {
switch (pNlApi->nlaType(nla)) {
case DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID:
case DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID:
event.nodeId = pNlApi->nlaGetU32(nla);
break;
case DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID:
case DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID:
event.errorId = pNlApi->nlaGetU32(nla);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

#pragma once
#include "level_zero/sysman/source/shared/linux/nl_api/sysman_drm_ras_types.h"
#include "level_zero/sysman/source/shared/linux/nl_api/sysman_drm_ras_uapi_ext.h"
#include "level_zero/sysman/source/shared/linux/nl_api/sysman_nl_api.h"
#include <level_zero/zes_api.h>

#include "third_party/uapi/drm-next/drm/drm_ras.h"

#include <linux/types.h>
#include <vector>

Expand Down Expand Up @@ -84,10 +85,10 @@ class DrmNlApi {
ze_result_t issueRequestClearErrorCounter(const uint32_t &nodeId, const uint32_t &errorId);
void setupNlOperations();

struct genl_cmd newCmds[NEO_DRM_RAS_CMD_MAX] = {};
struct genl_cmd newCmds[DRM_RAS_CMD_MAX] = {};
struct nla_policy nodePolicy[DRM_RAS_A_NODE_ATTRS_MAX + 1] = {};
struct nla_policy errorPolicy[DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX + 1] = {};
struct nla_policy thresholdPolicy[NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_MAX + 1] = {};
struct nla_policy eventPolicy[DRM_RAS_A_ERROR_EVENT_ATTRS_MAX + 1] = {};
struct genl_ops ops = {};
std::string deviceName = {};
DrmRasEvent pendingEvent = {};
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "level_zero/sysman/test/unit_tests/sources/linux/nl_api/mock_nl_api.h"

#include "level_zero/sysman/source/shared/linux/nl_api/sysman_drm_ras_uapi_ext.h"
#include "level_zero/sysman/source/shared/linux/nl_api/sysman_iaf_nl_api.h"

#include "gtest/gtest.h"
Expand Down Expand Up @@ -338,11 +337,11 @@ int MockNlApi::genlHandleMsg(struct nl_msg *msg, void *arg) {
}
}
} else if (getThreshold) {
next = addAttrib(info, next, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_ID, 1);
next = addAttrib(info, next, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_NAME, 7);
addAttrib(info, next, NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_ERROR_THRESHOLD, mockThresholdValue);
next = addAttrib(info, next, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID, 1);
next = addAttrib(info, next, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_NAME, 7);
addAttrib(info, next, DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_THRESHOLD, mockThresholdValue);
for (int i = 0; i < pOps->o_ncmds; i++) {
if (pOps->o_cmds[i].c_id == NEO_DRM_RAS_CMD_GET_ERROR_THRESHOLD && pOps->o_cmds[i].c_msg_parser != nullptr) {
if (pOps->o_cmds[i].c_id == DRM_RAS_CMD_GET_ERROR_THRESHOLD && pOps->o_cmds[i].c_msg_parser != nullptr) {
if (0 == (pOps->o_cmds[i].c_msg_parser)(reinterpret_cast<struct nl_cache_ops *>(this), &pOps->o_cmds[i], &info, arg)) {
succeeded = true;
}
Expand Down Expand Up @@ -453,11 +452,11 @@ int MockNlApi::nlRecvmsgsDefault(struct nl_sock *sock) {
eventAttrChain = new MyNlattr;
MyNlattr *next = eventAttrChain;

next->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID;
next->type = DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID;
next->content = eventNodeId;
next = next->addNext();

next->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID;
next->type = DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID;
next->content = eventErrorId;
} else if (isEventSocket && !receiveEventData) {
// Clear event attribute chain for event socket when not receiving event data
Expand Down Expand Up @@ -635,11 +634,11 @@ struct nlattr *MockNlApi::nlmsgAttrdata(const struct nlmsghdr *hdr, int attr) {
if (eventAttrChain == nullptr) {
// Create a chain of two attributes: nodeId and errorId
auto *nodeAttr = new MyNlattr();
nodeAttr->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID;
nodeAttr->type = DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID;
nodeAttr->content = eventNodeId;

auto *errorAttr = new MyNlattr();
errorAttr->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID;
errorAttr->type = DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID;
errorAttr->content = eventErrorId;

nodeAttr->next = errorAttr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ TEST_F(SysmanDrmNlApiFixture, GivenDrmNlApiInstanceWhenParseEventMessageWithOnly
delete pNlApiPtr->eventAttrChain;
}
pNlApiPtr->eventAttrChain = new MyNlattr;
pNlApiPtr->eventAttrChain->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID;
pNlApiPtr->eventAttrChain->type = DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID;
pNlApiPtr->eventAttrChain->content = 99;
pNlApiPtr->eventAttrChain->next = nullptr;
ze_result_t result = drmNlApi->parseEventMessage(msg, event);
Expand Down Expand Up @@ -1279,7 +1279,7 @@ TEST_F(SysmanDrmNlApiFixture, GivenDrmNlApiInstanceWhenParseEventMessageWithOnly
delete pNlApiPtr->eventAttrChain;
}
pNlApiPtr->eventAttrChain = new MyNlattr;
pNlApiPtr->eventAttrChain->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID;
pNlApiPtr->eventAttrChain->type = DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID;
pNlApiPtr->eventAttrChain->content = 456;
pNlApiPtr->eventAttrChain->next = nullptr;
ze_result_t result = drmNlApi->parseEventMessage(msg, event);
Expand Down Expand Up @@ -1406,7 +1406,7 @@ TEST_F(SysmanDrmNlApiFixture, GivenDrmNlApiInstanceWhenParseEventMessageWithUnkn
MyNlattr *current = chain;

// First: NODE_ID
current->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_NODE_ID;
current->type = DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID;
current->content = 100;
current->next = new MyNlattr;
current = current->next;
Expand All @@ -1418,7 +1418,7 @@ TEST_F(SysmanDrmNlApiFixture, GivenDrmNlApiInstanceWhenParseEventMessageWithUnkn
current = current->next;

// Third: ERROR_ID
current->type = DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID;
current->type = DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID;
current->content = 200;
current->next = new MyNlattr;
current = current->next;
Expand Down Expand Up @@ -1537,13 +1537,13 @@ TEST_F(SysmanDrmNlApiFixture, GivenDrmNlApiInstanceAndAllocMsgFailsWhenCallingGe

TEST_F(SysmanDrmNlApiFixture, GivenDrmNlApiAndNoThresholdAttrsWhenCallingGetErrorThresholdRspThenThresholdRemainsZero) {
DrmErrorThreshold threshold = {};
drmNlApi->currentOperation = std::make_unique<MockDrmNlApi::Operation>(NEO_DRM_RAS_CMD_GET_ERROR_THRESHOLD, &threshold);
drmNlApi->currentOperation = std::make_unique<MockDrmNlApi::Operation>(DRM_RAS_CMD_GET_ERROR_THRESHOLD, &threshold);

auto pNlApi = std::make_unique<MockNlApi>();
drmNlApi->pNlApi = std::move(pNlApi);

auto attrs = std::make_unique<struct nlattr *[]>(NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_MAX + 1);
std::fill(attrs.get(), attrs.get() + NEO_DRM_RAS_A_ERROR_THRESHOLD_ATTRS_MAX + 1, nullptr);
auto attrs = std::make_unique<struct nlattr *[]>(DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX + 1);
std::fill(attrs.get(), attrs.get() + DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX + 1, nullptr);

struct genl_info info = {};
info.attrs = attrs.get();
Expand Down
2 changes: 1 addition & 1 deletion third_party/uapi/drm-next/.version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git_revision: c44e278ce02efd0c4be79a8eda1ea6885c1ce5ec
git_url: https://gitlab.freedesktop.org/drm/kernel.git

patch: https://patchwork.freedesktop.org/patch/747140/
30 changes: 24 additions & 6 deletions third_party/uapi/drm-next/drm/drm_ras.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
/* YNL-GEN uapi header */
/* To regenerate run: tools/net/ynl/ynl-regen.sh */

#ifndef _LINUX_DRM_RAS_H
#define _LINUX_DRM_RAS_H
#ifndef _UAPI_LINUX_DRM_RAS_H
#define _UAPI_LINUX_DRM_RAS_H

#define DRM_RAS_FAMILY_NAME "drm-ras"
#define DRM_RAS_FAMILY_VERSION 1
Expand Down Expand Up @@ -33,18 +33,36 @@ enum {
DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_ID,
DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_NAME,
DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_VALUE,
DRM_RAS_A_ERROR_COUNTER_ATTRS_ERROR_THRESHOLD,

__DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX,
DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX = (__DRM_RAS_A_ERROR_COUNTER_ATTRS_MAX - 1)
};

enum {
DRM_RAS_CMD_LIST_NODES = 1,
DRM_RAS_CMD_GET_ERROR_COUNTER,
DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
DRM_RAS_A_ERROR_EVENT_ATTRS_DEVICE_NAME = 1,
DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_ID,
DRM_RAS_A_ERROR_EVENT_ATTRS_NODE_NAME,
DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_ID,
DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_NAME,
DRM_RAS_A_ERROR_EVENT_ATTRS_ERROR_VALUE,

__DRM_RAS_A_ERROR_EVENT_ATTRS_MAX,
DRM_RAS_A_ERROR_EVENT_ATTRS_MAX = (__DRM_RAS_A_ERROR_EVENT_ATTRS_MAX - 1)
};

enum {
DRM_RAS_CMD_LIST_NODES = 1,
DRM_RAS_CMD_GET_ERROR_COUNTER,
DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
DRM_RAS_CMD_ERROR_EVENT,
DRM_RAS_CMD_GET_ERROR_THRESHOLD,
DRM_RAS_CMD_SET_ERROR_THRESHOLD,

__DRM_RAS_CMD_MAX,
DRM_RAS_CMD_MAX = (__DRM_RAS_CMD_MAX - 1)
};

#endif /* _LINUX_DRM_RAS_H */
#define DRM_RAS_MCGRP_ERROR_REPORT "error-report"

#endif /* _UAPI_LINUX_DRM_RAS_H */