fix: Add bind info for allocation from ipc handle in xe

Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-09-13 05:32:29 +00:00
committed by Compute-Runtime-Automation
parent d4f80fb957
commit 1ab0467301
6 changed files with 24 additions and 0 deletions

View File

@@ -964,6 +964,9 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
return nullptr;
}
auto handle = static_cast<uint32_t>(bo->getHandle());
ioctlHelper->fillBindInfoForIpcHandle(handle, size);
auto getHeapIndex = [&] {
if (requireSpecificBitness && this->force32bitAllocations) {
return HeapIndex::HEAP_EXTERNAL;

View File

@@ -557,6 +557,8 @@ std::unique_ptr<EngineInfo> IoctlHelper::createEngineInfo(bool isSysmanEnabled)
return std::make_unique<EngineInfo>(&drm, tileCount, distanceInfos, queryItems, engines);
}
void IoctlHelper::fillBindInfoForIpcHandle(uint32_t handle, size_t size) {}
uint32_t IoctlHelper::createGem(uint64_t size, uint32_t memoryBanks) {
GemCreate gemCreate = {};
gemCreate.size = size;

View File

@@ -158,6 +158,7 @@ class IoctlHelper {
virtual std::unique_ptr<EngineInfo> createEngineInfo(bool isSysmanEnabled);
virtual bool getTopologyDataAndMap(const HardwareInfo &hwInfo, DrmQueryTopologyData &topologyData, TopologyMap &topologyMap);
bool translateTopologyInfo(const QueryTopologyInfo *queryTopologyInfo, DrmQueryTopologyData &topologyData, TopologyMapping &mapping);
virtual void fillBindInfoForIpcHandle(uint32_t handle, size_t size);
protected:
Drm &drm;

View File

@@ -1480,4 +1480,9 @@ bool IoctlHelperXe::getGemTiling(void *setTiling) {
return true;
}
void IoctlHelperXe::fillBindInfoForIpcHandle(uint32_t handle, size_t size) {
xeLog(" -> IoctlHelperXe::%s s=0x%lx h=0x%x\n", __FUNCTION__, size, handle);
updateBindInfo(handle, 0, size);
}
} // namespace NEO

View File

@@ -106,6 +106,7 @@ class IoctlHelperXe : public IoctlHelper {
std::unique_ptr<MemoryInfo> createMemoryInfo() override;
void getTopologyData(uint32_t nTiles, std::vector<std::bitset<8>> geomDss[2], std::vector<std::bitset<8>> computeDss[2], std::vector<std::bitset<8>> euDss[2], DrmQueryTopologyData &topologyData, bool &isComputeDssEmpty);
void getTopologyMap(uint32_t nTiles, std::vector<std::bitset<8>> dssInfo[2], TopologyMap &topologyMap);
void fillBindInfoForIpcHandle(uint32_t handle, size_t size) override;
private:
template <typename... XeLogArgs>