Revert "SWDEV-492049 - Remove the handle of Phy Mem from Memobj" (#72)

This reverts commit 231b2410a0.
Tá an tiomantas seo le fáil i:
Godavarthy Surya, Anusha
2025-03-19 21:16:51 +05:30
tiomanta ag GitHub
tuismitheoir 28967982b2
tiomantas 2259a8c01c
D'athraigh 2 comhad le 0 breiseanna agus 6 scriosta
-4
Féach ar an gComhad
@@ -2328,10 +2328,6 @@ class GraphMemAllocNode final : public GraphNode {
memory_ = getMemoryObject(dptr, offset);
// Retain memory object because command release will release it
memory_->retain();
// Remove because the entry is not needed in MemObjMap after the memory_ has been saved.
// The Phy mem obj will be saved in virtual memory object during VirtualMapCommand::submit.
amd::MemObjMap::RemoveMemObj(dptr);
size_ = aligned_size;
// Execute the original mapping command
VirtualMapCommand::submit(device);
-2
Féach ar an gComhad
@@ -226,8 +226,6 @@ void* MemoryPool::AllocateMemory(size_t size, Stream* stream, void* dptr) {
}
} else {
dev_ptr = memory->getSvmPtr();
if (!amd::MemObjMap::FindMemObj(dev_ptr))
amd::MemObjMap::AddMemObj(dev_ptr, memory);
}
// Place the allocated memory into the busy heap
ts.AddSafeStream(stream);