Mesa (master): vulkan/wsi/display: don't report support if there is no drm fd

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 27 21:26:06 UTC 2021


Module: Mesa
Branch: master
Commit: 6b61fbca8bcade59576fd9c5291533d1390907b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b61fbca8bcade59576fd9c5291533d1390907b3

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Fri Apr 23 13:26:46 2021 +0300

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 <lionel.g.landwerlin at intel.com>
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10430>

---

 src/vulkan/wsi/wsi_common_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;
 }
 



More information about the mesa-commit mailing list