Use ftrL3IACoherency to set coherency support

Change-Id: I6cef76869ec90a5b00206a8f640bc77f16603c6f
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-12-18 13:00:27 +01:00
committed by sys_ocldev
parent 3538cb5690
commit 58772f9d20
2 changed files with 21 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo);
hwHelper.setCapabilityCoherencyFlag(outHwInfo, outHwInfo->capabilityTable.ftrSupportsCoherency);
outHwInfo->capabilityTable.ftrSupportsCoherency &= inHwInfo->featureTable.ftrL3IACoherency;
PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable,
static_cast<bool>(outHwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt),

View File

@@ -7,9 +7,12 @@
#include "unit_tests/os_interface/windows/hw_info_config_win_tests.h"
#include "core/helpers/hw_helper.h"
#include "core/helpers/options.h"
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "runtime/os_interface/windows/wddm/wddm.h"
#include "test.h"
#include "instrumentation.h"
@@ -90,4 +93,21 @@ TEST_F(HwInfoConfigTestWindows, givenInstrumentationForHardwareIsEnabledOrDisabl
EXPECT_TRUE(outHwInfo.capabilityTable.instrumentationEnabled == haveInstrumentation);
}
HWTEST_F(HwInfoConfigTestWindows, givenFtrIaCoherencyFlagWhenConfiguringHwInfoThenSetCoherencySupportCorrectly) {
HardwareInfo initialHwInfo = **platformDevices;
auto &hwHelper = HwHelper::get(initialHwInfo.platform.eRenderCoreFamily);
auto hwInfoConfig = HwInfoConfig::get(initialHwInfo.platform.eProductFamily);
bool initialCoherencyStatus = false;
hwHelper.setCapabilityCoherencyFlag(&outHwInfo, initialCoherencyStatus);
initialHwInfo.featureTable.ftrL3IACoherency = false;
hwInfoConfig->configureHwInfo(&initialHwInfo, &outHwInfo, osInterface.get());
EXPECT_FALSE(outHwInfo.capabilityTable.ftrSupportsCoherency);
initialHwInfo.featureTable.ftrL3IACoherency = true;
hwInfoConfig->configureHwInfo(&initialHwInfo, &outHwInfo, osInterface.get());
EXPECT_EQ(initialCoherencyStatus, outHwInfo.capabilityTable.ftrSupportsCoherency);
}
} // namespace NEO