Skip to content

Commit cccb95b

Browse files
Do not pass device ordinal in drm creation
Change-Id: I8376a8eace1109772c516d7a3daadfa709495171 Signed-off-by: Jobczyk, Lukasz <[email protected]>
1 parent 48a87cb commit cccb95b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

runtime/os_interface/linux/device_factory_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bool DeviceFactory::getDevices(size_t &numDevices, ExecutionEnvironment &executi
3131
executionEnvironment.prepareRootDeviceEnvironments(static_cast<uint32_t>(numRootDevices));
3232

3333
for (auto rootDeviceIndex = 0u; rootDeviceIndex < numRootDevices; rootDeviceIndex++) {
34-
Drm *drm = Drm::create(rootDeviceIndex);
34+
Drm *drm = Drm::create(devNum);
3535
if (!drm) {
3636
return false;
3737
}

unit_tests/os_interface/linux/drm_neo_create.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,16 @@ void popDrmMock() { drmMockStack.pop_back(); }
4545
Drm::~Drm() { fd = -1; }
4646

4747
Drm *Drm::get(int32_t deviceOrdinal) {
48+
// We silently skip deviceOrdinal
49+
EXPECT_EQ(deviceOrdinal, 0);
50+
4851
return drmMockStack[drmMockStack.size() - 1];
4952
}
5053

5154
Drm *Drm::create(int32_t deviceOrdinal) {
55+
// We silently skip deviceOrdinal
56+
EXPECT_EQ(deviceOrdinal, 0);
57+
5258
return drmMockStack[drmMockStack.size() - 1];
5359
}
5460

0 commit comments

Comments
 (0)