Include domain when ordering with ZE_ENABLE_PCI_ID_DEVICE_ORDER (3)

Fix for VA sharing.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2021-10-21 10:04:17 +00:00
committed by Compute-Runtime-Automation
parent f5210ed89f
commit 405fb760a7
3 changed files with 5 additions and 5 deletions

View File

@ -180,7 +180,7 @@ TEST_F(DrmSimpleTests, GivenSelectedExistingDeviceWhenOpenDirFailsThenRetryOpeni
EXPECT_NE(nullptr, hwDeviceIds[0].get());
EXPECT_STREQ("0000:00:02.0", hwDeviceIds[0]->as<HwDeviceIdDrm>()->getPciPath());
EXPECT_NE(nullptr, hwDeviceIds[1].get());
EXPECT_STREQ("00:03.0", hwDeviceIds[1]->as<HwDeviceIdDrm>()->getPciPath());
EXPECT_STREQ("0000:00:03.0", hwDeviceIds[1]->as<HwDeviceIdDrm>()->getPciPath());
}
TEST_F(DrmSimpleTests, givenPrintIoctlEntriesWhenCallIoctlThenIoctlIsPrinted) {
@ -355,7 +355,7 @@ TEST_F(DrmSimpleTests, GivenFailingOpenDirAndMultipleAvailableDevicesWhenCreateM
EXPECT_NE(nullptr, hwDeviceIds[0].get());
EXPECT_STREQ("0000:00:02.0", hwDeviceIds[0]->as<HwDeviceIdDrm>()->getPciPath());
EXPECT_NE(nullptr, hwDeviceIds[1].get());
EXPECT_STREQ("00:03.0", hwDeviceIds[1]->as<HwDeviceIdDrm>()->getPciPath());
EXPECT_STREQ("0000:00:03.0", hwDeviceIds[1]->as<HwDeviceIdDrm>()->getPciPath());
}
TEST_F(DrmSimpleTests, GivenMultipleAvailableDevicesWhenCreateMultipleRootDevicesFlagIsSetThenTheFlagIsRespected) {

View File

@ -1246,7 +1246,7 @@ TEST_F(VaDeviceTests, givenVADeviceWhenGetDeviceFromVAIsCalledThenRootDeviceIsRe
NEO::Device *neoDevice = &device->getDevice();
auto mockDrm = static_cast<DrmMock *>(neoDevice->getRootDeviceEnvironment().osInterface->getDriverModel()->as<Drm>());
mockDrm->setPciPath("00:02.0");
mockDrm->setPciPath("0000:00:02.0");
VADevice vaDevice{};
auto clDevice = vaDevice.getDeviceFromVA(pPlatform, vaDisplay.get());
@ -1386,7 +1386,7 @@ TEST_F(VaDeviceTests, givenValidPlatformWhenGetDeviceIdsFromVaApiMediaAdapterCal
NEO::Device *neoDevice = &device->getDevice();
auto mockDrm = static_cast<DrmMock *>(neoDevice->getRootDeviceEnvironment().osInterface->getDriverModel()->as<Drm>());
mockDrm->setPciPath("00:02.0");
mockDrm->setPciPath("0000:00:02.0");
auto errCode = clGetDeviceIDsFromVA_APIMediaAdapterINTEL(platformId, 0u, vaDisplay.get(), 0u, 1, &devices, &numDevices);
EXPECT_EQ(CL_SUCCESS, errCode);

View File

@ -34,7 +34,7 @@ std::optional<std::string> getPciPath(int deviceFd) {
}
std::string_view devicePathView(devicePath, static_cast<size_t>(readLinkSize));
devicePathView = devicePathView.substr(devicePathView.find("/drm/render") - 7u, 7u);
devicePathView = devicePathView.substr(devicePathView.find("/drm/render") - 12u, 12u);
return std::string(devicePathView);
}