mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
The following modifications were done as part of the fix for warm reset. 1. Release sysman resources before quiscenting the GPU. 2. Add additional checks to confirm quiscenting of the GPU before launching the diagnostics tests. 3. Fixed warm reset with wait time to allow the changes to be propagated to the entire GPU PCI tree. 4. Modified the ULT's completely to avoid the usage of MOCKS. 5. Made Diagnostics handle creation per-device from per-SubDevice. Related-To: LOCI-3053 Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
40 lines
1019 B
C++
40 lines
1019 B
C++
/*
|
|
* Copyright (C) 2021-2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "diagnostics_imp.h"
|
|
|
|
#include "shared/source/helpers/debug_helpers.h"
|
|
|
|
#include "os_diagnostics.h"
|
|
|
|
#include <cmath>
|
|
|
|
namespace L0 {
|
|
|
|
ze_result_t DiagnosticsImp::diagnosticsGetProperties(zes_diag_properties_t *pProperties) {
|
|
pOsDiagnostics->osGetDiagProperties(pProperties);
|
|
return ZE_RESULT_SUCCESS;
|
|
}
|
|
|
|
ze_result_t DiagnosticsImp::diagnosticsGetTests(uint32_t *pCount, zes_diag_test_t *pTests) {
|
|
return pOsDiagnostics->osGetDiagTests(pCount, pTests);
|
|
}
|
|
|
|
ze_result_t DiagnosticsImp::diagnosticsRunTests(uint32_t start, uint32_t end, zes_diag_result_t *pResult) {
|
|
return pOsDiagnostics->osRunDiagTests(start, end, pResult);
|
|
}
|
|
|
|
DiagnosticsImp::DiagnosticsImp(OsSysman *pOsSysman, const std::string &initalizedDiagTest) {
|
|
pOsDiagnostics = OsDiagnostics::create(pOsSysman, initalizedDiagTest);
|
|
UNRECOVERABLE_IF(nullptr == pOsDiagnostics);
|
|
}
|
|
|
|
DiagnosticsImp::~DiagnosticsImp() {
|
|
}
|
|
|
|
} // namespace L0
|