Mesa (staging/21.0): vulkan/wsi/display: don't report support if there is no drm fd
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 28 23:09:32 UTC 2021
Module: Mesa
Branch: staging/21.0
Commit: d35a49f7a6029866c1732e48685d77077bc06636
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d35a49f7a6029866c1732e48685d77077bc06636
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>
(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 d14533e3e9c..67359e3274d 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;
}
More information about the mesa-commit
mailing list