Move gmm callbacks to shared

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-09-23 20:20:46 +00:00
committed by Compute-Runtime-Automation
parent d622fd71f0
commit bdd1a2be8f
10 changed files with 8 additions and 24 deletions

View File

@@ -4,19 +4,6 @@
# SPDX-License-Identifier: MIT
#
set(RUNTIME_SRCS_GENX_CPP_WINDOWS
windows/gmm_callbacks
)
set(RUNTIME_SRCS_GENX_CPP_LINUX
)
if(NOT DISABLE_WDDM_LINUX)
list(APPEND RUNTIME_SRCS_GENX_CPP_LINUX
${RUNTIME_SRCS_GENX_CPP_WINDOWS}
)
endif()
set(RUNTIME_SRCS_GENX_CPP_BASE
aub_mem_dump
buffer
@@ -59,12 +46,10 @@ macro(macro_for_each_gen)
endif()
endif()
foreach(OS_IT "BASE" "WINDOWS" "LINUX")
foreach(SRC_IT ${RUNTIME_SRCS_GENX_CPP_${OS_IT}})
if(EXISTS ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp)
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_${OS_IT} ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp)
endif()
endforeach()
foreach(SRC_IT ${RUNTIME_SRCS_GENX_CPP_BASE})
if(EXISTS ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp)
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp)
endif()
endforeach()
foreach(BRANCH ${BRANCH_DIR_LIST})

View File

@@ -1,15 +0,0 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen11/hw_cmds.h"
#include "shared/source/helpers/windows/gmm_callbacks.h"
#include "shared/source/helpers/windows/gmm_callbacks.inl"
namespace NEO {
template struct DeviceCallbacks<ICLFamily>;
template struct TTCallbacks<ICLFamily>;
} // namespace NEO

View File

@@ -1,15 +0,0 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen12lp/hw_cmds.h"
#include "opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl"
namespace NEO {
template struct DeviceCallbacks<TGLLPFamily>;
template struct TTCallbacks<TGLLPFamily>;
} // namespace NEO

View File

@@ -1,15 +0,0 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen8/hw_cmds.h"
#include "shared/source/helpers/windows/gmm_callbacks.h"
#include "shared/source/helpers/windows/gmm_callbacks.inl"
namespace NEO {
template struct DeviceCallbacks<BDWFamily>;
template struct TTCallbacks<BDWFamily>;
} // namespace NEO

View File

@@ -1,15 +0,0 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/windows/gmm_callbacks.h"
#include "shared/source/helpers/windows/gmm_callbacks.inl"
namespace NEO {
template struct DeviceCallbacks<SKLFamily>;
template struct TTCallbacks<SKLFamily>;
} // namespace NEO

View File

@@ -62,7 +62,6 @@ if(SUPPORT_XEHP_AND_LATER)
endif()
set(RUNTIME_SRCS_HELPERS_WINDOWS
${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks_tgllp_and_later.inl
${CMAKE_CURRENT_SOURCE_DIR}/windows/kmd_notify_properties_windows.cpp
${CMAKE_CURRENT_SOURCE_DIR}/windows/gl_helper.h
)

View File

@@ -1,52 +0,0 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/command_stream/command_stream_receiver_hw.h"
#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/helpers/windows/gmm_callbacks.h"
#include "shared/source/os_interface/windows/wddm_device_command_stream.h"
namespace NEO {
template <typename GfxFamily>
long __stdcall DeviceCallbacks<GfxFamily>::notifyAubCapture(void *csrHandle, uint64_t gfxAddress, size_t gfxSize, bool allocate) {
auto csr = reinterpret_cast<CommandStreamReceiverHw<GfxFamily> *>(csrHandle);
if (DebugManager.flags.SetCommandStreamReceiver.get() == CSR_HW_WITH_AUB) {
auto csrWithAub = static_cast<CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<GfxFamily>> *>(csr);
auto aubCsr = static_cast<AUBCommandStreamReceiverHw<GfxFamily> *>(csrWithAub->aubCSR.get());
if (allocate) {
AllocationView externalAllocation(gfxAddress, gfxSize);
aubCsr->makeResidentExternal(externalAllocation);
} else {
aubCsr->makeNonResidentExternal(gfxAddress);
}
}
return 1;
}
template <typename GfxFamily>
int __stdcall TTCallbacks<GfxFamily>::writeL3Address(void *queueHandle, uint64_t l3GfxAddress, uint64_t regOffset) {
auto csr = reinterpret_cast<CommandStreamReceiverHw<GfxFamily> *>(queueHandle);
LriHelper<GfxFamily>::program(&csr->getCS(0),
static_cast<uint32_t>(regOffset & 0xFFFFFFFF),
static_cast<uint32_t>(l3GfxAddress & 0xFFFFFFFF),
true);
LriHelper<GfxFamily>::program(&csr->getCS(0),
static_cast<uint32_t>(regOffset >> 32),
static_cast<uint32_t>(l3GfxAddress >> 32),
true);
return 1;
}
} // namespace NEO

View File

@@ -1,15 +0,0 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/xe_hp_core/hw_cmds.h"
#include "opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl"
namespace NEO {
template struct DeviceCallbacks<XeHpFamily>;
template struct TTCallbacks<XeHpFamily>;
} // namespace NEO