vulkan/wsi: don't use DUMB_CLOSE for normal GEM handles
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 19 Apr 2019 11:11:00 +0000 (12:11 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 26 Apr 2019 10:26:33 +0000 (11:26 +0100)
Currently we get normal GEM handles from PrimeFDToHandle, yet we close
then with DUMB_CLOSE. Use GEM_CLOSE instead.

Fixes: da997ebec92 ("vulkan: Add KHR_display extension using DRM [v10]")
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/vulkan/wsi/wsi_common_display.c

index 2be20e85046ae1494688e1eb61c0958fc2a6f4fd..66e191906fcbd2a24a89275bd07edbad8eaaeb0c 100644 (file)
@@ -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