Skip to content

Commit 0e41bc7

Browse files
Enable KMD notify on Linux for BDW and SKL
Change-Id: I465c7610cb03860a28a7246e376ea8183d2aee9b
1 parent dc902ab commit 0e41bc7

File tree

7 files changed

+92
-20
lines changed

7 files changed

+92
-20
lines changed

runtime/gen8/hw_info_bdw.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ const RuntimeCapabilityTable BDW::capabilityTable{
6969
{false, false},
7070
&isSimulationBDW,
7171
true,
72-
true, // forceStatelessCompilationFor32Bit
73-
{false, 0, false, 0, false, 0}, // KmdNotifyProperties
74-
false, // ftr64KBpages
75-
EngineType::ENGINE_RCS, // defaultEngineType
76-
MemoryConstants::pageSize //requiredPreemptionSurfaceSize
72+
true, // forceStatelessCompilationFor32Bit
73+
{true, 50000, true, 500, true, 200000}, // KmdNotifyProperties
74+
false, // ftr64KBpages
75+
EngineType::ENGINE_RCS, // defaultEngineType
76+
MemoryConstants::pageSize //requiredPreemptionSurfaceSize
7777
};
7878

7979
const HardwareInfo BDW_1x2x6::hwInfo = {

runtime/gen9/linux/hw_info_config_skl.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ int HwInfoConfigHw<IGFX_SKYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo,
104104
hwInfo->pPlatform->usDeviceID == ISKL_GT4_WRK_DEVICE_F0_ID) {
105105
pSysInfo->EdramSizeInKb = 128 * 1024;
106106
}
107+
108+
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
109+
kmdNotifyProperties.enableKmdNotify = true;
110+
kmdNotifyProperties.enableQuickKmdSleep = true;
111+
kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true;
112+
kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000;
113+
kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 500;
114+
kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000;
107115
return 0;
108116
}
109117

unit_tests/gen8/test_device_caps.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ GEN8TEST_F(Gen8DeviceCaps, whitelistedRegister) {
5656
}
5757

5858
GEN8TEST_F(Gen8DeviceCaps, kmdNotifyMechanism) {
59-
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify);
60-
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
61-
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep);
62-
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
63-
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
64-
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
59+
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify);
60+
EXPECT_EQ(50000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
61+
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep);
62+
EXPECT_EQ(500, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
63+
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
64+
EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
6565
}
6666

6767
GEN8TEST_F(Gen8DeviceCaps, compression) {

unit_tests/gen9/skl/linux/hw_info_config_tests.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) {
165165
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTA);
166166
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTC);
167167
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGTX);
168+
169+
auto &outKmdNotifyProperties = outHwInfo.capabilityTable.kmdNotifyProperties;
170+
EXPECT_TRUE(outKmdNotifyProperties.enableKmdNotify);
171+
EXPECT_EQ(50000, outKmdNotifyProperties.delayKmdNotifyMicroseconds);
172+
EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleep);
173+
EXPECT_EQ(500, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds);
174+
EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
175+
EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
168176
}
169177

170178
SKLTEST_F(HwInfoConfigTestLinuxSkl, negativeUnknownDevId) {

unit_tests/gen9/skl/test_device_caps_skl.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,6 @@ SKLTEST_F(SklUsDeviceIdTest, isSimulationCap) {
8181
}
8282
}
8383

84-
SKLTEST_F(SklUsDeviceIdTest, kmdNotifyMechanism) {
85-
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify);
86-
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
87-
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep);
88-
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
89-
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
90-
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
91-
}
92-
9384
SKLTEST_F(SklUsDeviceIdTest, GivenSKLWhenCheckftr64KBpagesThenTrue) {
9485
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
9586
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2018, Intel Corporation
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a
4+
# copy of this software and associated documentation files (the "Software"),
5+
# to deal in the Software without restriction, including without limitation
6+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
# and/or sell copies of the Software, and to permit persons to whom the
8+
# Software is furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included
11+
# in all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14+
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
17+
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18+
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19+
# OTHER DEALINGS IN THE SOFTWARE.
20+
21+
set(IGDRCL_SRCS_tests_gen9_skl_windows
22+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
23+
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_skl_windows.cpp
24+
)
25+
26+
if(WIN32)
27+
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen9_skl_windows})
28+
endif()
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2018, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
#include "unit_tests/fixtures/device_fixture.h"
24+
#include "test.h"
25+
26+
using namespace OCLRT;
27+
28+
typedef Test<DeviceFixture> SklDeviceCapsWindows;
29+
30+
SKLTEST_F(SklDeviceCapsWindows, givenHwInfoWhenAskedForKmdNotifyMechanismThenReturnCorrectValues) {
31+
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify);
32+
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
33+
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep);
34+
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
35+
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
36+
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
37+
}

0 commit comments

Comments
 (0)