mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
feature: support pci path contains card0
Some OpenCL application need to render libva surface with drm display and use the same libva surface as OpenCL kernel output. Such applicatoins need to use /dev/dri/card0 instead of /dev/dri/renderD128 for getting the display fd. Related-To: NEO-11714 Signed-off-by: Elaine, Wang <elaine.wang@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c01a5c45c7
commit
28fa434541
@@ -48,6 +48,10 @@ std::optional<std::string> getPciPath(int deviceFd) {
|
||||
|
||||
auto pciPathPos = deviceLinkPath->find("/drm/render");
|
||||
|
||||
if (pciPathPos == std::string::npos) {
|
||||
pciPathPos = deviceLinkPath->find("/drm/card");
|
||||
}
|
||||
|
||||
if (pciPathPos == std::string::npos || pciPathPos < 12) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user