Use newer GMM API

Related-To: NEO-3832

Change-Id: I9c97a20a6a611118eb14348a8c6960115a20777d
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2019-10-15 15:05:47 +02:00
committed by sys_ocldev
parent aa7058a2a9
commit 3fc748c0f9
26 changed files with 205 additions and 150 deletions

View File

@@ -27,4 +27,6 @@ uint32_t OSInterface::getDeviceHandle() const {
return 0;
}
void OSInterface::setGmmInputArgs(void *args) {}
} // namespace NEO

View File

@@ -25,6 +25,7 @@ class OSInterface {
static bool osEnableLocalMemory;
static bool are64kbPagesEnabled();
unsigned int getDeviceHandle() const;
void setGmmInputArgs(void *args);
protected:
OSInterfaceImpl *osInterfaceImpl = nullptr;

View File

@@ -27,6 +27,10 @@ uint32_t OSInterface::getDeviceHandle() const {
return static_cast<uint32_t>(osInterfaceImpl->getDeviceHandle());
}
void OSInterface::setGmmInputArgs(void *args) {
this->get()->getWddm()->setGmmInputArg(args);
}
OSInterface::OSInterfaceImpl::OSInterfaceImpl() = default;
D3DKMT_HANDLE OSInterface::OSInterfaceImpl::getAdapterHandle() const {

View File

@@ -161,6 +161,7 @@ bool Wddm::queryAdapterInfo() {
SkuInfoReceiver::receiveWaTableFromAdapterInfo(workaroundTable.get(), &adapterInfo);
memcpy_s(&gfxPartition, sizeof(gfxPartition), &adapterInfo.GfxPartition, sizeof(GMM_GFX_PARTITIONING));
memcpy_s(&adapterBDF, sizeof(adapterBDF), &adapterInfo.stAdapterBDF, sizeof(ADAPTER_BDF));
deviceRegistryPath = adapterInfo.DeviceRegistryPath;
@@ -972,6 +973,10 @@ void Wddm::waitOnPagingFenceFromCpu() {
;
}
void Wddm::setGmmInputArg(void *args) {
reinterpret_cast<GMM_INIT_IN_ARGS *>(args)->stAdapterBDF = this->adapterBDF;
}
void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
interlockedMax(currentPagingFenceValue, newPagingFenceValue);
}

View File

@@ -144,6 +144,8 @@ class Wddm {
}
void waitOnPagingFenceFromCpu();
void setGmmInputArg(void *args);
protected:
std::unique_ptr<Gdi> gdi;
D3DKMT_HANDLE adapter = 0;
@@ -160,6 +162,7 @@ class Wddm {
std::unique_ptr<FeatureTable> featureTable;
std::unique_ptr<WorkaroundTable> workaroundTable;
GMM_GFX_PARTITIONING gfxPartition;
ADAPTER_BDF adapterBDF;
uint64_t systemSharedMemory = 0;
uint64_t dedicatedVideoMemory = 0;
uint32_t maxRenderFrequency = 0;