From 5ea1a4836b7dbf40af181f2376351d4dc815e0e1 Mon Sep 17 00:00:00 2001 From: Kamil Kopryk Date: Tue, 26 Aug 2025 13:01:41 +0000 Subject: [PATCH] fix: correct gmm resource type for printf surface Related-To: NEO-13163 Signed-off-by: Kamil Kopryk --- shared/source/gmm_helper/cache_settings_helper.cpp | 1 + shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/shared/source/gmm_helper/cache_settings_helper.cpp b/shared/source/gmm_helper/cache_settings_helper.cpp index 4b1a419f24..146ff37b83 100644 --- a/shared/source/gmm_helper/cache_settings_helper.cpp +++ b/shared/source/gmm_helper/cache_settings_helper.cpp @@ -95,6 +95,7 @@ GMM_RESOURCE_USAGE_TYPE_ENUM CacheSettingsHelper::getDefaultUsageTypeWithCaching case AllocationType::svmCpu: case AllocationType::svmZeroCopy: case AllocationType::tagBuffer: + case AllocationType::printfSurface: if (debugManager.flags.DisableCachingForStatefulBufferAccess.get()) { return getDefaultUsageTypeWithCachingDisabled(allocationType, productHelper); } diff --git a/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp b/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp index 6b7e1e1296..0d493b6ff2 100644 --- a/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp +++ b/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp @@ -721,6 +721,7 @@ TEST(GmmTest, givenAllocationTypeWhenGettingUsageTypeThenReturnCorrectValue) { case AllocationType::svmCpu: case AllocationType::svmZeroCopy: case AllocationType::tagBuffer: + case AllocationType::printfSurface: expectedUsage = forceUncached ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER; break; default: @@ -767,6 +768,7 @@ TEST(GmmTest, givenAllocationTypeWhenGettingUsageTypeThenReturnCorrectValue) { case AllocationType::mapAllocation: case AllocationType::svmCpu: case AllocationType::svmZeroCopy: + case AllocationType::printfSurface: expectedUsage = forceUncached ? uncachedGmmUsageType : GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER; break; case AllocationType::semaphoreBuffer: @@ -828,6 +830,7 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu case AllocationType::svmCpu: case AllocationType::svmZeroCopy: case AllocationType::tagBuffer: + case AllocationType::printfSurface: expectedUsage = GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER; break; default: @@ -863,6 +866,7 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu case AllocationType::mapAllocation: case AllocationType::svmCpu: case AllocationType::svmZeroCopy: + case AllocationType::printfSurface: expectedUsage = GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER; break; case AllocationType::semaphoreBuffer: