Move kmd notify properties to shared

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-10-07 15:53:06 +00:00
committed by Compute-Runtime-Automation
parent d49a7cfdae
commit 973317e473
5 changed files with 5 additions and 9 deletions

View File

@@ -43,6 +43,7 @@ set(NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_drm.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id.h
${CMAKE_CURRENT_SOURCE_DIR}/hw_device_id_linux.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties_linux.cpp
${CMAKE_CURRENT_SOURCE_DIR}/linux_inc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/engine_info.h
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}engine_info_impl.h

View File

@@ -0,0 +1,16 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/kmd_notify_properties.h"
using namespace NEO;
void KmdNotifyHelper::updateAcLineStatus() {}
int64_t KmdNotifyHelper::getBaseTimeout(const int64_t &multiplier) const {
return properties->delayKmdNotifyMicroseconds * multiplier;
}

View File

@@ -19,6 +19,7 @@ set(NEO_CORE_OS_INTERFACE_WINDOWS
${CMAKE_CURRENT_SOURCE_DIR}/driver_info_windows.h
${CMAKE_CURRENT_SOURCE_DIR}/environment_variables.h
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_drm_stub.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties_windows.cpp
${CMAKE_CURRENT_SOURCE_DIR}/os_inc.h
${CMAKE_CURRENT_SOURCE_DIR}/os_interface_win.cpp
${CMAKE_CURRENT_SOURCE_DIR}/os_library_win.cpp

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/kmd_notify_properties.h"
#include "shared/source/os_interface/windows/sys_calls.h"
using namespace NEO;
void KmdNotifyHelper::updateAcLineStatus() {
SYSTEM_POWER_STATUS systemPowerStatus = {};
auto powerStatusRetValue = SysCalls::getSystemPowerStatus(&systemPowerStatus);
if (powerStatusRetValue == 1) {
acLineConnected = (systemPowerStatus.ACLineStatus == 1);
}
}
int64_t KmdNotifyHelper::getBaseTimeout(const int64_t &multiplier) const {
return properties->delayKmdNotifyMicroseconds;
}