diff --git a/opencl/source/sharings/va/va_device_shared.cpp b/opencl/source/sharings/va/va_device_shared.cpp index 78b39b5dc6..073dff16ad 100644 --- a/opencl/source/sharings/va/va_device_shared.cpp +++ b/opencl/source/sharings/va/va_device_shared.cpp @@ -47,10 +47,8 @@ ClDevice *VADevice::getRootDeviceFromVaDisplay(Platform *pPlatform, VADisplay va return nullptr; } - std::string_view prefixView = "../../devices/pci0000:00/0000:"; std::string_view devicePathView(devicePath, static_cast(readLinkSize)); - devicePathView.remove_prefix(prefixView.size()); - devicePathView = devicePathView.substr(0, 7); + devicePathView = devicePathView.substr(devicePathView.find("/drm/render") - 7u, 7u); for (size_t i = 0; i < pPlatform->getNumDevices(); ++i) { auto device = pPlatform->getClDevice(i); diff --git a/opencl/test/unit_test/os_interface/linux/sys_calls_linux_ult.cpp b/opencl/test/unit_test/os_interface/linux/sys_calls_linux_ult.cpp index 9b3842e5b9..775db35e19 100644 --- a/opencl/test/unit_test/os_interface/linux/sys_calls_linux_ult.cpp +++ b/opencl/test/unit_test/os_interface/linux/sys_calls_linux_ult.cpp @@ -85,9 +85,9 @@ int readlink(const char *path, char *buf, size_t bufsize) { return -1; } - constexpr size_t sizeofPath = sizeof("../../devices/pci0000:00/0000:00:02.0/drm/renderD128"); + constexpr size_t sizeofPath = sizeof("../../devices/pci0000:4a/0000:4a:02.0/0000:4b:00.0/0000:4c:01.0/0000:00:02.0/drm/renderD128"); - strcpy_s(buf, sizeofPath, "../../devices/pci0000:00/0000:00:02.0/drm/renderD128"); + strcpy_s(buf, sizeofPath, "../../devices/pci0000:4a/0000:4a:02.0/0000:4b:00.0/0000:4c:01.0/0000:00:02.0/drm/renderD128"); return sizeofPath; }