mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Revert "refactor: store gmm callback functions in global arrays"
This reverts commit a68ea38ba1.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e05ba4293a
commit
6880014602
@@ -16,6 +16,10 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
long __stdcall notifyAubCapture(void *csrHandle, uint64_t gfxAddress, size_t gfxSize, bool allocate) {
|
||||
return notifyAubCaptureImpl(csrHandle, gfxAddress, gfxSize, allocate);
|
||||
}
|
||||
|
||||
bool Wddm::configureDeviceAddressSpace() {
|
||||
GMM_DEVICE_CALLBACKS_INT deviceCallbacks{};
|
||||
deviceCallbacks.Adapter.KmtHandle = getAdapter();
|
||||
@@ -37,10 +41,7 @@ bool Wddm::configureDeviceAddressSpace() {
|
||||
deviceCallbacks.DevCbPtrs.KmtCbPtrs.pfnUnLock = getGdi()->unlock2;
|
||||
deviceCallbacks.DevCbPtrs.KmtCbPtrs.pfnEscape = getGdi()->escape;
|
||||
deviceCallbacks.DevCbPtrs.KmtCbPtrs.pfnFreeGPUVA = getGdi()->freeGpuVirtualAddress;
|
||||
|
||||
auto hwInfo = rootDeviceEnvironment.getHardwareInfo();
|
||||
|
||||
deviceCallbacks.DevCbPtrs.KmtCbPtrs.pfnNotifyAubCapture = notifyAubCaptureFuncFactory[hwInfo->platform.eRenderCoreFamily];
|
||||
deviceCallbacks.DevCbPtrs.KmtCbPtrs.pfnNotifyAubCapture = notifyAubCapture;
|
||||
|
||||
GMM_DEVICE_INFO deviceInfo{};
|
||||
deviceInfo.pGfxPartition = &gfxPartition;
|
||||
@@ -62,7 +63,7 @@ bool Wddm::configureDeviceAddressSpace() {
|
||||
? maximumApplicationAddress + 1u
|
||||
: 0u;
|
||||
|
||||
bool obtainMinAddress = hwInfo->platform.eRenderCoreFamily == IGFX_GEN12LP_CORE;
|
||||
bool obtainMinAddress = rootDeviceEnvironment.getHardwareInfo()->platform.eRenderCoreFamily == IGFX_GEN12LP_CORE;
|
||||
return gmmMemory->configureDevice(getAdapter(), device, getGdi()->escape, svmSize, featureTable->flags.ftrL3IACoherency, minAddress, obtainMinAddress);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "shared/source/direct_submission/windows/wddm_direct_submission.h"
|
||||
#include "shared/source/gmm_helper/page_table_mngr.h"
|
||||
#include "shared/source/helpers/flush_stamp.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/helpers/windows/gmm_callbacks.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
@@ -41,6 +40,7 @@ WddmCommandStreamReceiver<GfxFamily>::WddmCommandStreamReceiver(ExecutionEnviron
|
||||
const DeviceBitfield deviceBitfield)
|
||||
: BaseClass(executionEnvironment, rootDeviceIndex, deviceBitfield) {
|
||||
|
||||
notifyAubCaptureImpl = DeviceCallbacks<GfxFamily>::notifyAubCapture;
|
||||
this->wddm = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->osInterface->getDriverModel()->as<Wddm>();
|
||||
|
||||
PreemptionMode preemptionMode = PreemptionHelper::getDefaultPreemptionMode(this->peekHwInfo());
|
||||
@@ -175,10 +175,9 @@ bool WddmCommandStreamReceiver<GfxFamily>::isTlbFlushRequiredForStateCacheFlush(
|
||||
template <typename GfxFamily>
|
||||
GmmPageTableMngr *WddmCommandStreamReceiver<GfxFamily>::createPageTableManager() {
|
||||
GMM_TRANSLATIONTABLE_CALLBACKS ttCallbacks = {};
|
||||
auto rootDeviceEnvironment = this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex].get();
|
||||
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
|
||||
ttCallbacks.pfWriteL3Adr = TTCallbacks<GfxFamily>::writeL3Address;
|
||||
|
||||
ttCallbacks.pfWriteL3Adr = writeL3AddressFuncFactory[hwInfo->platform.eRenderCoreFamily];
|
||||
auto rootDeviceEnvironment = this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex].get();
|
||||
|
||||
GmmPageTableMngr *gmmPageTableMngr = GmmPageTableMngr::create(rootDeviceEnvironment->getGmmClientContext(), TT_TYPE::AUXTT, &ttCallbacks);
|
||||
gmmPageTableMngr->setCsrHandle(this);
|
||||
|
||||
Reference in New Issue
Block a user