mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Add IPC events support (2/N)
Fix shared allocation on multi DG1 systems Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fdb67afded
commit
ddf75b8d23
@@ -335,26 +335,6 @@ TEST_F(DrmMemoryManagerLocalMemoryTest, givenMultiRootDeviceEnvironmentAndMemory
|
||||
|
||||
using DrmMemoryManagerUsmSharedHandleTest = DrmMemoryManagerLocalMemoryTest;
|
||||
|
||||
TEST_F(DrmMemoryManagerUsmSharedHandleTest, givenDrmMemoryManagerAndOsHandleWhenCreateIsCalledWithTagBufferAllocationTypeThenGraphicsAllocationIsReturned) {
|
||||
osHandle handle = 1u;
|
||||
this->mock->outputHandle = 2u;
|
||||
size_t size = 4096u;
|
||||
AllocationProperties properties(rootDeviceIndex, false, size, GraphicsAllocation::AllocationType::TAG_BUFFER, false, {});
|
||||
|
||||
auto graphicsAllocation = memoryManager->createGraphicsAllocationFromSharedHandle(handle, properties, false, true);
|
||||
ASSERT_NE(nullptr, graphicsAllocation);
|
||||
|
||||
EXPECT_EQ(this->mock->inputFd, (int)handle);
|
||||
|
||||
DrmAllocation *drmAllocation = static_cast<DrmAllocation *>(graphicsAllocation);
|
||||
auto bo = drmAllocation->getBO();
|
||||
EXPECT_EQ(bo->peekHandle(), (int)this->mock->outputHandle);
|
||||
EXPECT_EQ(1u, bo->getRefCount());
|
||||
EXPECT_EQ(size, bo->peekSize());
|
||||
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerUsmSharedHandleTest, givenDrmMemoryManagerAndOsHandleWhenCreateIsCalledWithBufferHostMemoryAllocationTypeThenGraphicsAllocationIsReturned) {
|
||||
osHandle handle = 1u;
|
||||
this->mock->outputHandle = 2u;
|
||||
@@ -405,7 +385,7 @@ TEST_F(DrmMemoryManagerUsmSharedHandleTest, givenMultiRootDeviceEnvironmentAndMe
|
||||
size_t size = 4096u;
|
||||
AllocationProperties properties(rootDeviceIndex, true, size, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, false, {});
|
||||
|
||||
auto ptr = memoryManager->createUSMHostAllocationFromSharedHandle(1, properties);
|
||||
auto ptr = memoryManager->createUSMHostAllocationFromSharedHandle(1, properties, false);
|
||||
|
||||
EXPECT_EQ(ptr, nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user