diff --git a/shared/source/os_interface/linux/drm_neo.cpp b/shared/source/os_interface/linux/drm_neo.cpp index 9e03564368..158e2f1b8e 100644 --- a/shared/source/os_interface/linux/drm_neo.cpp +++ b/shared/source/os_interface/linux/drm_neo.cpp @@ -1404,18 +1404,17 @@ uint64_t Drm::getPatIndex(Gmm *gmm, AllocationType allocationType, CacheRegion c } GMM_RESOURCE_INFO *resourceInfo = nullptr; - auto preferNoCpuAccess = CacheSettingsHelper::preferNoCpuAccess(usageType, rootDeviceEnvironment); - bool cacheable = !preferNoCpuAccess && !isUncachedType; + bool cachable = !CacheSettingsHelper::isUncachedType(usageType); bool compressed = false; if (gmm) { resourceInfo = gmm->gmmResourceInfo->peekGmmResourceInfo(); usageType = gmm->resourceParams.Usage; compressed = gmm->isCompressionEnabled(); - cacheable = gmm->gmmResourceInfo->getResourceFlags()->Info.Cacheable; + cachable = gmm->gmmResourceInfo->getResourceFlags()->Info.Cacheable; } - uint64_t patIndex = rootDeviceEnvironment.getGmmClientContext()->cachePolicyGetPATIndex(resourceInfo, usageType, compressed, cacheable); + uint64_t patIndex = rootDeviceEnvironment.getGmmClientContext()->cachePolicyGetPATIndex(resourceInfo, usageType, compressed, cachable); patIndex = productHelper.overridePatIndex(isUncachedType, patIndex, allocationType); UNRECOVERABLE_IF(patIndex == static_cast(GMM_PAT_ERROR)); diff --git a/shared/test/common/os_interface/linux/device_command_stream_fixture.h b/shared/test/common/os_interface/linux/device_command_stream_fixture.h index bd3a5dd259..3d210a57f0 100644 --- a/shared/test/common/os_interface/linux/device_command_stream_fixture.h +++ b/shared/test/common/os_interface/linux/device_command_stream_fixture.h @@ -119,7 +119,6 @@ struct DrmMockCustom : public Drm { using Drm::pageFaultSupported; using Drm::queryTopology; using Drm::setupIoctlHelper; - using Drm::vmBindPatIndexProgrammingSupported; struct IoctlResExt { std::vector no; diff --git a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 22d615cfab..a4446847e5 100644 --- a/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -7599,24 +7599,6 @@ TEST_F(DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest, givenCompress memoryManager->freeGraphicsMemory(allocation); } -TEST_F(DrmMemoryManagerTest, givenNoGmmWhenQueryingPatIndexThenPassCorrectParams) { - mock->vmBindPatIndexProgrammingSupported = true; - - auto &productHelper = this->device->getProductHelper(); - auto mockClientContext = static_cast(executionEnvironment->rootDeviceEnvironments[0]->getGmmClientContext()); - - for (auto allocationType = static_cast(AllocationType::buffer); allocationType < static_cast(AllocationType::count); ++allocationType) { - auto usageType = CacheSettingsHelper::getGmmUsageType(static_cast(allocationType), false, productHelper); - auto isUncachedType = CacheSettingsHelper::isUncachedType(usageType); - auto preferNoCpuAccess = CacheSettingsHelper::preferNoCpuAccess(usageType, *executionEnvironment->rootDeviceEnvironments[0]); - bool cacheable = !preferNoCpuAccess && !isUncachedType; - - mock->getPatIndex(nullptr, static_cast(allocationType), CacheRegion::defaultRegion, CachePolicy::writeBack, false, false); - EXPECT_EQ(cacheable, mockClientContext->passedCachableSettingForGetPatIndexQuery); - EXPECT_EQ(false, mockClientContext->passedCompressedSettingForGetPatIndexQuery); - } -} - TEST_F(DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest, givenNotSetUseSystemMemoryWhenGraphicsAllocationInDevicePoolIsAllocatedForImageThenLocalMemoryAllocationIsReturnedFromStandard64KbHeap) { ImageDescriptor imgDesc = {}; imgDesc.imageType = ImageType::image2D;