Files
compute-runtime/runtime/gmm_helper/gmm_memory_base.cpp
Mateusz Jablonski c7755c2c48 Move files to core
engine_node_helper
kmdaf_listener
wddm_engine_mapper
windows_defs

Related-To: NEO-3982
Change-Id: Ia39342059bdeafa97d17f286c167138e5c40553c
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-12-11 17:39:14 +01:00

48 lines
1.6 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/gmm_helper/gmm_memory_base.h"
#include "core/gmm_helper/gmm_helper.h"
#include "core/os_interface/windows/windows_defs.h"
#include "runtime/platform/platform.h"
#include "gmm_client_context.h"
namespace NEO {
GmmMemoryBase::GmmMemoryBase() {
clientContext = platform()->peekGmmHelper()->getClientContext()->getHandle();
}
bool GmmMemoryBase::configureDeviceAddressSpace(GMM_ESCAPE_HANDLE hAdapter,
GMM_ESCAPE_HANDLE hDevice,
GMM_ESCAPE_FUNC_TYPE pfnEscape,
GMM_GFX_SIZE_T SvmSize,
BOOLEAN BDWL3Coherency) {
return clientContext->ConfigureDeviceAddressSpace(
{hAdapter},
{hDevice},
{pfnEscape},
SvmSize,
0,
0,
BDWL3Coherency,
0,
0) != 0;
}
bool GmmMemoryBase::configureDevice(GMM_ESCAPE_HANDLE hAdapter,
GMM_ESCAPE_HANDLE hDevice,
GMM_ESCAPE_FUNC_TYPE pfnEscape,
GMM_GFX_SIZE_T SvmSize,
BOOLEAN BDWL3Coherency,
GMM_GFX_PARTITIONING &gfxPartition,
uintptr_t &minAddress) {
minAddress = windowsMinAddress;
return configureDeviceAddressSpace(hAdapter, hDevice, pfnEscape, SvmSize, BDWL3Coherency);
}
}; // namespace NEO