[Mesa-dev] [PATCH] vulkan/wsi: don't use DUMB_CLOSE for normal GEM handles

Emil Velikov emil.l.velikov at gmail.com
Fri Apr 19 15:02:50 UTC 2019


From: Emil Velikov <emil.velikov at collabora.com>

Currently we get normal GEM handles from PrimeFDToHandle, yet we close
then with DUMB_CLOSE. Use GEM_CLOSE instead.

Cc: Keith Packard <keithp at keithp.com>
Cc: Jason Ekstrand <jason at jlekstrand.net>
Cc: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Fixes: da997ebec92 ("vulkan: Add KHR_display extension using DRM [v10]")
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/vulkan/wsi/wsi_common_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c
index 2be20e85046..66e191906fc 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -974,8 +974,8 @@ static void
 wsi_display_destroy_buffer(struct wsi_display *wsi,
                            uint32_t buffer)
 {
-   (void) drmIoctl(wsi->fd, DRM_IOCTL_MODE_DESTROY_DUMB,
-                   &((struct drm_mode_destroy_dumb) { .handle = buffer }));
+   (void) drmIoctl(wsi->fd, DRM_IOCTL_GEM_CLOSE,
+                   &((struct drm_gem_close) { .handle = buffer }));
 }
 
 static VkResult
-- 
2.21.0



More information about the mesa-dev mailing list