mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:39:51 +08:00
Move PageTableManager from rootDeviceEnvironment to CommandStreamReceiver
Also add init of pageTable registers to blitter path Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
897420236a
commit
30b3f5cdb0
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
@@ -452,12 +453,16 @@ bool Wddm::mapGpuVirtualAddress(Gmm *gmm, D3DKMT_HANDLE handle, D3DGPU_VIRTUAL_A
|
||||
}
|
||||
|
||||
kmDafListener->notifyMapGpuVA(featureTable->ftrKmdDaf, getAdapter(), device, handle, MapGPUVA.VirtualAddress, getGdi()->escape);
|
||||
|
||||
if (gmm->isCompressionEnabled && rootDeviceEnvironment.pageTableManager.get()) {
|
||||
return rootDeviceEnvironment.pageTableManager->updateAuxTable(gpuPtr, gmm, true);
|
||||
bool ret = true;
|
||||
if (gmm->isCompressionEnabled && HwInfoConfig::get(gfxPlatform->eProductFamily)->isPageTableManagerSupported(*rootDeviceEnvironment.getHardwareInfo())) {
|
||||
for (auto engine : rootDeviceEnvironment.executionEnvironment.memoryManager.get()->getRegisteredEngines()) {
|
||||
if (engine.commandStreamReceiver->pageTableManager.get()) {
|
||||
ret &= engine.commandStreamReceiver->pageTableManager->updateAuxTable(gpuPtr, gmm, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
D3DGPU_VIRTUAL_ADDRESS Wddm::reserveGpuVirtualAddress(D3DGPU_VIRTUAL_ADDRESS minimumAddress,
|
||||
|
||||
@@ -35,6 +35,8 @@ class WddmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily>
|
||||
}
|
||||
GmmPageTableMngr *createPageTableManager() override;
|
||||
|
||||
using CommandStreamReceiver::pageTableManager;
|
||||
|
||||
protected:
|
||||
void kmDafLockAllocations(ResidencyContainer &allocationsForResidency);
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ GmmPageTableMngr *WddmCommandStreamReceiver<GfxFamily>::createPageTableManager()
|
||||
|
||||
GmmPageTableMngr *gmmPageTableMngr = GmmPageTableMngr::create(rootDeviceEnvironment->getGmmClientContext(), TT_TYPE::AUXTT, &ttCallbacks);
|
||||
gmmPageTableMngr->setCsrHandle(this);
|
||||
rootDeviceEnvironment->pageTableManager.reset(gmmPageTableMngr);
|
||||
this->pageTableManager.reset(gmmPageTableMngr);
|
||||
return gmmPageTableMngr;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "shared/source/memory_manager/deferred_deleter.h"
|
||||
#include "shared/source/memory_manager/host_ptr_manager.h"
|
||||
#include "shared/source/memory_manager/memory_operations_handler.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/windows/os_context_win.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
@@ -486,11 +487,13 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
|
||||
}
|
||||
|
||||
auto defaultGmm = gfxAllocation->getDefaultGmm();
|
||||
if (defaultGmm) {
|
||||
auto index = gfxAllocation->getRootDeviceIndex();
|
||||
if (defaultGmm->isCompressionEnabled && executionEnvironment.rootDeviceEnvironments[index]->pageTableManager.get()) {
|
||||
[[maybe_unused]] auto status = executionEnvironment.rootDeviceEnvironments[index]->pageTableManager->updateAuxTable(input->getGpuAddress(), defaultGmm, false);
|
||||
DEBUG_BREAK_IF(!status);
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[gfxAllocation->getRootDeviceIndex()]->getHardwareInfo();
|
||||
if (defaultGmm && defaultGmm->isCompressionEnabled && HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo)) {
|
||||
for (auto engine : registeredEngines) {
|
||||
if (engine.commandStreamReceiver->pageTableManager.get()) {
|
||||
[[maybe_unused]] auto status = engine.commandStreamReceiver->pageTableManager->updateAuxTable(input->getGpuAddress(), defaultGmm, false);
|
||||
DEBUG_BREAK_IF(!status);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto handleId = 0u; handleId < gfxAllocation->getNumGmms(); handleId++) {
|
||||
|
||||
Reference in New Issue
Block a user