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

Emil Velikov emil.l.velikov at gmail.com
Thu Apr 25 10:21:33 UTC 2019


On Fri, 19 Apr 2019 at 16:03, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>
> 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 }));
>  }
>
Humble ping anyone?

AFAICT closing handles from PrimeFDToHandle() with DUMB_CLOSE is a
violation, even if it somehow works today.

Thanks
Emil


More information about the mesa-dev mailing list