mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Dont close shared handle on imported allocations
Related-To: LOCI-2272 Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7ec8d8ef91
commit
a010fb3634
@@ -78,6 +78,13 @@ DrmAllocation *TestedDrmMemoryManager::allocate32BitGraphicsMemory(uint32_t root
|
||||
bool useLocalMemory = !allocationData.flags.useSystemMemory && this->localMemorySupported[rootDeviceIndex];
|
||||
return allocate32BitGraphicsMemoryImpl(allocationData, useLocalMemory);
|
||||
}
|
||||
|
||||
void TestedDrmMemoryManager::closeSharedHandle(GraphicsAllocation *gfxAllocation) {
|
||||
std::unique_lock<std::mutex> lock(callsToCloseSharedHandleMtx);
|
||||
DrmMemoryManager::closeSharedHandle(gfxAllocation);
|
||||
callsToCloseSharedHandle++;
|
||||
}
|
||||
|
||||
TestedDrmMemoryManager::~TestedDrmMemoryManager() {
|
||||
DrmMemoryManager::commonCleanup();
|
||||
}
|
||||
|
||||
@@ -149,12 +149,15 @@ class TestedDrmMemoryManager : public MemoryManagerCreate<DrmMemoryManager> {
|
||||
alignedFreeWrapperCalled++;
|
||||
DrmMemoryManager::alignedFreeWrapper(ptr);
|
||||
}
|
||||
void closeSharedHandle(GraphicsAllocation *gfxAllocation) override;
|
||||
uint32_t alignedFreeWrapperCalled = 0u;
|
||||
uint32_t callsToCloseSharedHandle = 0;
|
||||
|
||||
protected:
|
||||
std::mutex unreferenceMtx;
|
||||
std::mutex releaseGpuRangeMtx;
|
||||
std::mutex alignedFreeWrapperMtx;
|
||||
std::mutex callsToCloseSharedHandleMtx;
|
||||
};
|
||||
|
||||
struct MockDrmGemCloseWorker : DrmGemCloseWorker {
|
||||
|
||||
Reference in New Issue
Block a user