From 6b1197e7283dff6be4d60edf8c10d08cacdb6513 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 23 Apr 2021 13:26:46 +0300 Subject: [PATCH] vulkan/wsi/display: don't report support if there is no drm fd This partially deals with https://gitlab.freedesktop.org/mesa/mesa/-/issues/4688 Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Adam Jackson Part-of: (cherry picked from commit 6b61fbca8bcade59576fd9c5291533d1390907b3) --- .pick_status.json | 2 +- src/vulkan/wsi/wsi_common_display.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 959166a2663..da2ffdeaa71 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -544,7 +544,7 @@ "description": "vulkan/wsi/display: don't report support if there is no drm fd", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index f6eea5906f8..e25dc1a3f64 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -815,7 +815,10 @@ wsi_display_surface_get_support(VkIcdSurfaceBase *surface, uint32_t queueFamilyIndex, VkBool32* pSupported) { - *pSupported = VK_TRUE; + struct wsi_display *wsi = + (struct wsi_display *) wsi_device->wsi[VK_ICD_WSI_PLATFORM_DISPLAY]; + + *pSupported = wsi->fd != -1; return VK_SUCCESS; }