All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 2/2] weston: fix build failure with --disable-egl
Date: Mon, 3 Sep 2018 17:35:26 +0800	[thread overview]
Message-ID: <1535967326-32322-2-git-send-email-hongxu.jia@windriver.com> (raw)
In-Reply-To: <1535967326-32322-1-git-send-email-hongxu.jia@windriver.com>

Backport a patch from upstream to fix build failure
with --disable-egl
[snip]
|weston-4.0.0/clients/simple-dmabuf-drm.c:783:30: error:
'EGL_NO_DISPLAY' undeclared (first use in this function)
[snip]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...ple-dmabuf-drm-fix-build-with-disable-egl.patch | 71 ++++++++++++++++++++++
 meta/recipes-graphics/wayland/weston_4.0.0.bb      |  1 +
 2 files changed, 72 insertions(+)
 create mode 100644 meta/recipes-graphics/wayland/weston/0001-simple-dmabuf-drm-fix-build-with-disable-egl.patch

diff --git a/meta/recipes-graphics/wayland/weston/0001-simple-dmabuf-drm-fix-build-with-disable-egl.patch b/meta/recipes-graphics/wayland/weston/0001-simple-dmabuf-drm-fix-build-with-disable-egl.patch
new file mode 100644
index 0000000..4820124
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/0001-simple-dmabuf-drm-fix-build-with-disable-egl.patch
@@ -0,0 +1,71 @@
+From 2b2d911ef088c430e9bdd135daadf1123d474b24 Mon Sep 17 00:00:00 2001
+From: Emilio Pozuelo Monfort <pochu27@gmail.com>
+Date: Mon, 3 Sep 2018 15:42:10 +0800
+Subject: [PATCH] simple-dmabuf-drm: fix build with --disable-egl
+
+Just rely on getting the supported formats through the dmabuf
+extension.
+
+Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
+Reviewed-by: Daniel Stone <daniels@collabora.com>
+
+Upstream-Status: Backport [https://anongit.freedesktop.org/git/wayland/weston.git]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ clients/simple-dmabuf-drm.c | 11 -----------
+ configure.ac                |  2 +-
+ 2 files changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c
+index 2975f3a..88ec451 100644
+--- a/clients/simple-dmabuf-drm.c
++++ b/clients/simple-dmabuf-drm.c
+@@ -53,7 +53,6 @@
+ 
+ #include <wayland-client.h>
+ #include "shared/zalloc.h"
+-#include "shared/platform.h"
+ #include "xdg-shell-unstable-v6-client-protocol.h"
+ #include "fullscreen-shell-unstable-v1-client-protocol.h"
+ #include "linux-dmabuf-unstable-v1-client-protocol.h"
+@@ -763,7 +762,6 @@ static struct display *
+ create_display(int opts, int format)
+ {
+ 	struct display *display;
+-	const char *extensions;
+ 
+ 	display = malloc(sizeof *display);
+ 	if (display == NULL) {
+@@ -776,15 +774,6 @@ create_display(int opts, int format)
+ 	display->req_dmabuf_immediate = opts & OPT_IMMEDIATE;
+ 	display->req_dmabuf_modifiers = (format == DRM_FORMAT_NV12);
+ 
+-	/*
+-	 * hard code format if the platform egl doesn't support format
+-	 * querying / advertising.
+-	 */
+-	extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
+-	if (extensions && !weston_check_egl_extension(extensions,
+-				"EGL_EXT_image_dma_buf_import_modifiers"))
+-		display->xrgb8888_format_found = 1;
+-
+ 	display->registry = wl_display_get_registry(display->display);
+ 	wl_registry_add_listener(display->registry,
+ 				 &registry_listener, display);
+diff --git a/configure.ac b/configure.ac
+index 48cf5cb..e6e9a3f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -386,7 +386,7 @@ AC_ARG_ENABLE(simple-dmabuf-drm-client,
+                              [do not build the simple dmabuf drm client]),,
+               enable_simple_dmabuf_drm_client="auto")
+ if ! test "x$enable_simple_dmabuf_drm_client" = "xno"; then
+-  PKG_CHECK_MODULES(SIMPLE_DMABUF_DRM_CLIENT, [wayland-client libdrm egl], [have_simple_dmabuf_libs=yes],
++  PKG_CHECK_MODULES(SIMPLE_DMABUF_DRM_CLIENT, [wayland-client libdrm], [have_simple_dmabuf_libs=yes],
+ 		    [have_simple_dmabuf_libs=no])
+ 
+   PKG_CHECK_MODULES(LIBDRM_PLATFORM_FREEDRENO, [libdrm_freedreno],
+-- 
+2.7.4
+
diff --git a/meta/recipes-graphics/wayland/weston_4.0.0.bb b/meta/recipes-graphics/wayland/weston_4.0.0.bb
index 3d192cf..61e2881 100644
--- a/meta/recipes-graphics/wayland/weston_4.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_4.0.0.bb
@@ -11,6 +11,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://0001-make-error-portable.patch \
            file://xwayland.weston-start \
            file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+           file://0001-simple-dmabuf-drm-fix-build-with-disable-egl.patch \
 "
 SRC_URI[md5sum] = "33709aa4d5916f89643fca0fc0064b39"
 SRC_URI[sha256sum] = "a0fc0ae7ef83dfbed12abfe9b8096a24a7dd00705e86fa0db1e619ded18b4b58"
-- 
2.7.4



  reply	other threads:[~2018-09-03  9:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03  9:35 [PATCH 1/2] webkitgtk: add opengl to REQUIRED_DISTRO_FEATURES Hongxu Jia
2018-09-03  9:35 ` Hongxu Jia [this message]
2018-09-03 16:51   ` [PATCH 2/2] weston: fix build failure with --disable-egl Khem Raj
2018-09-03  9:54 ` [PATCH 1/2] webkitgtk: add opengl to REQUIRED_DISTRO_FEATURES Alexander Kanavin
2018-09-04 13:29   ` Hongxu Jia
2018-09-04 14:39     ` Alexander Kanavin
2018-09-03 16:51 ` Khem Raj
2018-10-09  1:49 ` ChenQi
2018-10-09  1:53 ` ChenQi
2018-10-09  1:53   ` Khem Raj
2018-10-10  3:06     ` Hongxu Jia
2018-10-10  3:09     ` [PATCH V2] " Hongxu Jia
2018-10-10  3:21       ` Andre McCurdy
2018-10-10  5:56         ` [PATCH V3] " Hongxu Jia
2018-10-10  7:16           ` [PATCH V4] webkitgtk/epiphany: " Hongxu Jia
2018-10-10  7:14             ` Hongxu Jia
2018-10-10  3:33 ` ✗ patchtest: failure for "webkitgtk: add opengl to REQUI..." and 1 more (rev2) Patchwork
2018-10-10  6:03 ` ✗ patchtest: failure for "webkitgtk: add opengl to REQUI..." and 1 more (rev3) Patchwork
2018-10-10  7:32 ` ✗ patchtest: failure for "webkitgtk: add opengl to REQUI..." and 1 more (rev4) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535967326-32322-2-git-send-email-hongxu.jia@windriver.com \
    --to=hongxu.jia@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.