fix: Make tlb flush os agnostic

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-06-29 12:53:36 +00:00
committed by Compute-Runtime-Automation
parent 3c4d921a80
commit c294ef48ce
18 changed files with 159 additions and 67 deletions

View File

@@ -511,6 +511,7 @@ bool Wddm::makeResident(const D3DKMT_HANDLE *handles, uint32_t count, bool cantT
}
kmDafListener->notifyMakeResident(featureTable->flags.ftrKmdDaf, getAdapter(), device, handles, count, getGdi()->escape);
this->setNewResourceBoundToPageTable();
return success;
}
@@ -1249,4 +1250,17 @@ void Wddm::populateIpVersion(HardwareInfo &hwInfo) {
}
}
void Wddm::setNewResourceBoundToPageTable() {
if (!this->rootDeviceEnvironment.getProductHelper().isTlbFlushRequired()) {
return;
}
for (auto rootDeviceIndex = 0u; rootDeviceIndex < rootDeviceEnvironment.executionEnvironment.rootDeviceEnvironments.size(); rootDeviceIndex++) {
if (rootDeviceEnvironment.executionEnvironment.rootDeviceEnvironments[rootDeviceIndex].get() == &rootDeviceEnvironment) {
for (const auto &engine : rootDeviceEnvironment.executionEnvironment.memoryManager->getRegisteredEngines(rootDeviceIndex)) {
engine.osContext->setNewResourceBound();
}
}
}
}
} // namespace NEO

View File

@@ -224,6 +224,7 @@ class Wddm : public DriverModel {
void setPlatformSupportEvictIfNecessaryFlag(const ProductHelper &productHelper);
void populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo);
void populateIpVersion(HardwareInfo &hwInfo);
void setNewResourceBoundToPageTable();
GMM_GFX_PARTITIONING gfxPartition{};
ADAPTER_BDF adapterBDF{};