mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Move kmd notify properties to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d49a7cfdae
commit
973317e473
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user