From c19f4fd1d0531c78bd3043fb7f68f3f2a5a62d7d Mon Sep 17 00:00:00 2001 From: Igor Venevtsev Date: Tue, 1 Dec 2020 16:30:39 +0100 Subject: [PATCH] Re-enable decanonize gpu address on releaseGpuRange() call drm ULT Signed-off-by: Igor Venevtsev --- .../os_interface/linux/drm_memory_manager_tests.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 33eab01d79..f6bdc8ca1d 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -3797,13 +3797,14 @@ TEST_F(DrmMemoryManagerTest, givenSvmCpuAllocationWhenSizeAndAlignmentProvidedBu EXPECT_EQ(nullptr, allocation); } -TEST_F(DrmMemoryManagerTest, DISABLED_givenDrmMemoryManagerAndReleaseGpuRangeIsCalledThenGpuAddressIsDecanonized) { +TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerAndReleaseGpuRangeIsCalledThenGpuAddressIsDecanonized) { + constexpr size_t reservedCpuAddressRangeSize = is64bit ? (6 * 4 * GB) : 0; + auto hwInfo = defaultHwInfo.get(); auto mockGfxPartition = std::make_unique(); - mockGfxPartition->init(maxNBitValue(48), 0, 0, 1); + mockGfxPartition->init(hwInfo->capabilityTable.gpuAddressSpace, reservedCpuAddressRangeSize, 0, 1); auto size = 2 * MemoryConstants::megaByte; auto gpuAddress = mockGfxPartition->heapAllocate(HeapIndex::HEAP_STANDARD, size); auto gpuAddressCanonized = GmmHelper::canonize(gpuAddress); - EXPECT_NE(gpuAddress, gpuAddressCanonized); EXPECT_LE(gpuAddress, gpuAddressCanonized); EXPECT_CALL(*mockGfxPartition.get(), freeGpuAddressRange(gpuAddress, size));