fix: Override UC PAT to cacheable for shared images on BMG

Temporary WA for UC PAT index in GMM from shared image

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-07-11 14:00:38 +00:00
committed by Compute-Runtime-Automation
parent 0d5d960e30
commit 7657498c53
2 changed files with 26 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
*
*/
#include "shared/source/memory_manager/allocation_type.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/xe2_hpg_core/hw_cmds_bmg.h"
#include "shared/source/xe2_hpg_core/hw_info_xe2_hpg_core.h"
@@ -24,3 +25,19 @@ BMGTEST_F(BmgProductHelperWindows, givenProductHelperWhenCheckDirectSubmissionSu
BMGTEST_F(BmgProductHelperWindows, givenProductHelperWhenIsStagingBuffersEnabledThenTrueIsReturned) {
EXPECT_TRUE(productHelper->isStagingBuffersEnabled());
}
BMGTEST_F(BmgProductHelperWindows, givenProductHelperWhenOverridePatIndexCalledThenCorrectValueIsReturned) {
uint64_t expectedPatIndex = 2u;
for (int i = 0; i < static_cast<int>(AllocationType::count); ++i) {
EXPECT_EQ(expectedPatIndex, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
}
expectedPatIndex = 8u;
for (int i = 0; i < static_cast<int>(AllocationType::count); ++i) {
if (static_cast<AllocationType>(i) == AllocationType::sharedImage) {
EXPECT_EQ(13u, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
} else {
EXPECT_EQ(expectedPatIndex, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
}
}
}