summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-10-22 17:43:03 +0100
committerEmil Velikov <[email protected]>2018-10-30 16:35:50 +0000
commitc210d0c3b72ac426ee18b43f036e1a852a39950b (patch)
tree361ffb5a602614853590748063da5d41cf8b7995 /src/vulkan
parenta45b6fb45246f6b8e2b4a06977f199cc77452289 (diff)
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: baa38c144f6 ("vulkan/wsi: Use VK_EXT_pci_bus_info for DRM fd matching") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/wsi/wsi_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index 51d8655a5a9..1cd5f8d62c5 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -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;