diff --git a/runtime/gen8/hw_info_bdw.cpp b/runtime/gen8/hw_info_bdw.cpp index 96458f4d85..2877fede8a 100644 --- a/runtime/gen8/hw_info_bdw.cpp +++ b/runtime/gen8/hw_info_bdw.cpp @@ -69,11 +69,11 @@ const RuntimeCapabilityTable BDW::capabilityTable{ {false, false}, &isSimulationBDW, true, - true, // forceStatelessCompilationFor32Bit - {false, 0, false, 0, false, 0}, // KmdNotifyProperties - false, // ftr64KBpages - EngineType::ENGINE_RCS, // defaultEngineType - MemoryConstants::pageSize //requiredPreemptionSurfaceSize + true, // forceStatelessCompilationFor32Bit + {true, 50000, true, 500, true, 200000}, // KmdNotifyProperties + false, // ftr64KBpages + EngineType::ENGINE_RCS, // defaultEngineType + MemoryConstants::pageSize //requiredPreemptionSurfaceSize }; const HardwareInfo BDW_1x2x6::hwInfo = { diff --git a/runtime/gen9/linux/hw_info_config_skl.cpp b/runtime/gen9/linux/hw_info_config_skl.cpp index 941d5bd2b5..4dfa38ac28 100644 --- a/runtime/gen9/linux/hw_info_config_skl.cpp +++ b/runtime/gen9/linux/hw_info_config_skl.cpp @@ -104,6 +104,14 @@ int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, hwInfo->pPlatform->usDeviceID == ISKL_GT4_WRK_DEVICE_F0_ID) { pSysInfo->EdramSizeInKb = 128 * 1024; } + + auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; + kmdNotifyProperties.enableKmdNotify = true; + kmdNotifyProperties.enableQuickKmdSleep = true; + kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true; + kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000; + kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 500; + kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000; return 0; } diff --git a/unit_tests/gen8/test_device_caps.cpp b/unit_tests/gen8/test_device_caps.cpp index acec80d00e..0231c8a2c6 100644 --- a/unit_tests/gen8/test_device_caps.cpp +++ b/unit_tests/gen8/test_device_caps.cpp @@ -56,12 +56,12 @@ GEN8TEST_F(Gen8DeviceCaps, whitelistedRegister) { } GEN8TEST_F(Gen8DeviceCaps, kmdNotifyMechanism) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); + EXPECT_EQ(50000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); + EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); + EXPECT_EQ(500, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); + EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); + EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); } GEN8TEST_F(Gen8DeviceCaps, compression) { diff --git a/unit_tests/gen9/skl/linux/hw_info_config_tests.cpp b/unit_tests/gen9/skl/linux/hw_info_config_tests.cpp index 840a83c296..e058882923 100644 --- a/unit_tests/gen9/skl/linux/hw_info_config_tests.cpp +++ b/unit_tests/gen9/skl/linux/hw_info_config_tests.cpp @@ -165,6 +165,14 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) { EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTA); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTC); EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTX); + + auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties; + EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify); + EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds); + EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep); + EXPECT_EQ(500, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); + EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); + EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); } SKLTEST_F(HwInfoConfigTestLinuxSkl, negativeUnknownDevId) { diff --git a/unit_tests/gen9/skl/test_device_caps_skl.cpp b/unit_tests/gen9/skl/test_device_caps_skl.cpp index 6c8f985cd1..009dcc9efa 100644 --- a/unit_tests/gen9/skl/test_device_caps_skl.cpp +++ b/unit_tests/gen9/skl/test_device_caps_skl.cpp @@ -81,15 +81,6 @@ SKLTEST_F(SklUsDeviceIdTest, isSimulationCap) { } } -SKLTEST_F(SklUsDeviceIdTest, kmdNotifyMechanism) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); - EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); -} - SKLTEST_F(SklUsDeviceIdTest, GivenSKLWhenCheckftr64KBpagesThenTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); } diff --git a/unit_tests/gen9/skl/windows/CMakeLists.txt b/unit_tests/gen9/skl/windows/CMakeLists.txt new file mode 100644 index 0000000000..54c1480bef --- /dev/null +++ b/unit_tests/gen9/skl/windows/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2018, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +set(IGDRCL_SRCS_tests_gen9_skl_windows + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_skl_windows.cpp +) + +if(WIN32) + target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl_windows}) +endif() diff --git a/unit_tests/gen9/skl/windows/test_device_caps_skl_windows.cpp b/unit_tests/gen9/skl/windows/test_device_caps_skl_windows.cpp new file mode 100644 index 0000000000..3bc12510f4 --- /dev/null +++ b/unit_tests/gen9/skl/windows/test_device_caps_skl_windows.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2018, Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "unit_tests/fixtures/device_fixture.h" +#include "test.h" + +using namespace OCLRT; + +typedef Test SklDeviceCapsWindows; + +SKLTEST_F(SklDeviceCapsWindows, givenHwInfoWhenAskedForKmdNotifyMechanismThenReturnCorrectValues) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); +}