mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com> Signed-off-by: macabral <matias.a.cabral@intel.com> Signed-off-by: davidoli <david.olien@intel.com> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com> Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com> Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com> Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "level_zero/tools/source/sysman/ras/ras_imp.h"
|
|
|
|
#include "shared/source/helpers/debug_helpers.h"
|
|
#include "shared/source/helpers/string.h"
|
|
|
|
#include <cstring>
|
|
|
|
namespace L0 {
|
|
|
|
ze_result_t RasImp::rasGetProperties(zes_ras_properties_t *pProperties) {
|
|
rasProperties.type = this->rasErrorType;
|
|
rasProperties.onSubdevice = false;
|
|
rasProperties.subdeviceId = 0;
|
|
*pProperties = rasProperties;
|
|
return ZE_RESULT_SUCCESS;
|
|
}
|
|
|
|
ze_result_t RasImp::rasGetConfig(zes_ras_config_t *pConfig) {
|
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
|
}
|
|
|
|
ze_result_t RasImp::rasSetConfig(const zes_ras_config_t *pConfig) {
|
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
|
}
|
|
|
|
void RasImp::init() {
|
|
pOsRas->setRasErrorType(this->rasErrorType);
|
|
isRasErrorSupported = pOsRas->isRasSupported();
|
|
}
|
|
|
|
RasImp::RasImp(OsSysman *pOsSysman, zes_ras_error_type_t type) {
|
|
pOsRas = OsRas::create(pOsSysman);
|
|
this->rasErrorType = type;
|
|
init();
|
|
}
|
|
|
|
RasImp::~RasImp() {
|
|
if (nullptr != pOsRas) {
|
|
delete pOsRas;
|
|
}
|
|
}
|
|
|
|
} // namespace L0
|