[OE-core] [PATCH 2/2] weston: fix build failure with --disable-egl

Khem Raj raj.khem at gmail.com
Mon Sep 3 16:51:45 UTC 2018


On Mon, Sep 3, 2018 at 2:35 AM Hongxu Jia <hongxu.jia at windriver.com> wrote:
>
> 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]
>

LGTM

> Signed-off-by: Hongxu Jia <hongxu.jia at 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 at 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 at collabora.co.uk>
> +Reviewed-by: Daniel Stone <daniels at collabora.com>
> +
> +Upstream-Status: Backport [https://anongit.freedesktop.org/git/wayland/weston.git]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia at 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
>



More information about the Openembedded-core mailing list