|
|
776610 |
From 9ac07b40052b02d5b3aeb268fa64b4583dd53abd Mon Sep 17 00:00:00 2001
|
|
|
776610 |
From: "Miguel A. Vico" <mvicomoya@nvidia.com>
|
|
|
776610 |
Date: Thu, 21 Jun 2018 02:53:15 +0000
|
|
|
776610 |
Subject: [PATCH] wayland: Realize dmabuf buffers before trying to attach them
|
|
|
776610 |
|
|
|
776610 |
Commit 22723ca37 moved buffer realization to
|
|
|
776610 |
meta_wayland_surface_commit() so that it wouldn't be part of
|
|
|
776610 |
meta_wayland_buffer_attach().
|
|
|
776610 |
|
|
|
776610 |
However, creation of dmabuf buffers would call into
|
|
|
776610 |
meta_wayland_buffer_attach() directly without realizing the buffer
|
|
|
776610 |
first. attach() would then fail and mutter would effectively shut down
|
|
|
776610 |
any clients using the zwp_linux_dmabuf protocol (note that if such
|
|
|
776610 |
client was Xwayland, mutter itself would shut down as well).
|
|
|
776610 |
|
|
|
776610 |
Add the missing bit in order to make zwp_linux_dmabuf protocol work
|
|
|
776610 |
again.
|
|
|
776610 |
|
|
|
776610 |
|
|
|
776610 |
(cherry picked from commit 54709c16b56a308d2254c56a35d042bf8b8e124f)
|
|
|
776610 |
---
|
|
|
776610 |
src/wayland/meta-wayland-dma-buf.c | 1 +
|
|
|
776610 |
1 file changed, 1 insertion(+)
|
|
|
776610 |
|
|
|
776610 |
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
|
|
|
776610 |
index 76b8aa219..e72c53935 100644
|
|
|
776610 |
--- a/src/wayland/meta-wayland-dma-buf.c
|
|
|
776610 |
+++ b/src/wayland/meta-wayland-dma-buf.c
|
|
|
776610 |
@@ -365,6 +365,7 @@ buffer_params_create_common (struct wl_client *client,
|
|
|
776610 |
dma_buf, NULL);
|
|
|
776610 |
buffer = meta_wayland_buffer_from_resource (buffer_resource);
|
|
|
776610 |
|
|
|
776610 |
+ meta_wayland_buffer_realize (buffer);
|
|
|
776610 |
if (!meta_wayland_buffer_attach (buffer, &error))
|
|
|
776610 |
{
|
|
|
776610 |
if (buffer_id == 0)
|
|
|
776610 |
--
|
|
|
776610 |
2.19.1
|
|
|
776610 |
|