mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
Defer Sysman Fabric Port and Fan Module Initialization
With this change, init for sysman Fabric Port/Fan API would not be done during zeInit. init and thereby Fabric Port/Fan API handle creation would be done only when user explicitly requests to enumerate handles using zesDeviceEnumFabricPorts/zesDeviceEnumFans. Also, ECC module init calls are cleared as they are no longer needed. Related-To: LOCI-3127 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9c45ced969
commit
2d8176fdbd
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -29,6 +29,9 @@ void FanHandleContext::init() {
|
||||
}
|
||||
|
||||
ze_result_t FanHandleContext::fanGet(uint32_t *pCount, zes_fan_handle_t *phFan) {
|
||||
std::call_once(initFanOnce, [this]() {
|
||||
this->init();
|
||||
});
|
||||
uint32_t handleListSize = static_cast<uint32_t>(handleList.size());
|
||||
uint32_t numToCopy = std::min(*pCount, handleListSize);
|
||||
if (0 == *pCount || *pCount > handleListSize) {
|
||||
|
||||
Reference in New Issue
Block a user