vulkan/wsi: use the drmGetDevice2() API
On older kernels, the drmGetDevice() call will wake up all the GPUs
on the system, while fetching the PCI revision.
Use the 2 version of the API and pass flags == 0, so we don't fetch the
device PCI revision, since we don't need that information.
Fixes: baa38c144f
("vulkan/wsi: Use VK_EXT_pci_bus_info for DRM fd matching")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:

committed by
Emil Velikov

parent
a45b6fb452
commit
c210d0c3b7
@@ -135,7 +135,7 @@ bool
|
||||
wsi_device_matches_drm_fd(const struct wsi_device *wsi, int drm_fd)
|
||||
{
|
||||
drmDevicePtr fd_device;
|
||||
int ret = drmGetDevice(drm_fd, &fd_device);
|
||||
int ret = drmGetDevice2(drm_fd, 0, &fd_device);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user