Patchwork [meta-fsl-arm] weston: Upgrade to weston 1.5 with GPU integration

login
register
mail settings
Submitter Lauren Post
Date June 4, 2014, 7:10 p.m.
Message ID <1401909014-5566-1-git-send-email-lauren.post@freescale.com>
Download mbox | patch
Permalink /patch/73241/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Lauren Post - June 4, 2014, 7:10 p.m.
Fix build breaks with weston 1.4 patches for GPU integration

Change-Id: I43df667a05714d5a648a2e3914a8dfe5419a290e
Signed-off-by: Lauren Post <lauren.post@freescale.com>
---
 ...R00306154-3-ccc-Add-Wayland-1.4.0-support.patch |   30 -----
 ...1-ENGR00314805-1-Add-Vivante-EGL-support.patch} |   55 ++++----
 ...ENGR00314805-2-Add-Vivante-GAL2D-support.patch} |  133 +++++++++-----------
 recipes-graphics/wayland/weston_%.bbappend         |    7 +-
 recipes-graphics/wayland/weston_1.4.0.bbappend     |   13 --
 5 files changed, 94 insertions(+), 144 deletions(-)
 delete mode 100644 recipes-graphics/wayland/weston/0001-ENGR00306154-3-ccc-Add-Wayland-1.4.0-support.patch
 rename recipes-graphics/wayland/weston/{0001-Add-support-for-Vivante-FBDEV-EGL.patch => 0001-ENGR00314805-1-Add-Vivante-EGL-support.patch} (55%)
 rename recipes-graphics/wayland/weston/{0002-weston-Add-Vivante-2D-compositor-support.patch => 0002-ENGR00314805-2-Add-Vivante-GAL2D-support.patch} (94%)
 delete mode 100644 recipes-graphics/wayland/weston_1.4.0.bbappend
Otavio Salvador - June 4, 2014, 7:43 p.m.
Hello Lauren,

On Wed, Jun 4, 2014 at 4:10 PM, Lauren Post <lauren.post@freescale.com> wrote:
> Fix build breaks with weston 1.4 patches for GPU integration
>
> Change-Id: I43df667a05714d5a648a2e3914a8dfe5419a290e
> Signed-off-by: Lauren Post <lauren.post@freescale.com>

This patch does not apply in master.

...
error: recipes-graphics/wayland/weston/0001-ENGR00306154-3-ccc-Add-Wayland-1.4.0-support.patch:
does not exist in index
error: recipes-graphics/wayland/weston_1.4.0.bbappend: does not exist in index
Patch failed at 0001 weston: Upgrade to weston 1.5 with GPU integration
The copy of the patch that failed is found in:
   /home/otavio/hacking/ossystems/yocto/sources/meta-fsl-arm/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Please rebase it and send a tested version.

Patch

diff --git a/recipes-graphics/wayland/weston/0001-ENGR00306154-3-ccc-Add-Wayland-1.4.0-support.patch b/recipes-graphics/wayland/weston/0001-ENGR00306154-3-ccc-Add-Wayland-1.4.0-support.patch
deleted file mode 100644
index 872b29e..0000000
--- a/recipes-graphics/wayland/weston/0001-ENGR00306154-3-ccc-Add-Wayland-1.4.0-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@ 
-From ae0d4776691c7b6e53243f6e45f54aa4c3abcc86 Mon Sep 17 00:00:00 2001
-From: Yong Gan <b45748@freescale.com>
-Date: Thu, 10 Apr 2014 11:30:26 +0800
-Subject: [PATCH] ENGR00306154-3 [#ccc] Add Wayland 1.4.0 support
-
-Release wl_buffer in surface_state_destroy for GAL2D compositor.
-
-Date: Mar 31, 2014
-Signed-off-by Yong Gan <B45748@freescale.com>
----
- src/gal2d-renderer.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/gal2d-renderer.c b/src/gal2d-renderer.c
-index be7af3c..c651573 100644
---- a/src/gal2d-renderer.c
-+++ b/src/gal2d-renderer.c
-@@ -953,7 +953,8 @@ surface_state_destroy(struct gal2d_surface_state *gs, struct gal2d_renderer *gr)
- 	wl_list_remove(&gs->renderer_destroy_listener.link);
- 	if(gs->surface)
- 		gs->surface->renderer_state = NULL;
--    
-+
-+	weston_buffer_reference(&gs->buffer_ref, NULL);
- 	free(gs);
- }
- 
--- 
-1.7.9.5
-
diff --git a/recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch b/recipes-graphics/wayland/weston/0001-ENGR00314805-1-Add-Vivante-EGL-support.patch
similarity index 55%
rename from recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch
rename to recipes-graphics/wayland/weston/0001-ENGR00314805-1-Add-Vivante-EGL-support.patch
index 6c8dfe9..e946fe4 100644
--- a/recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch
+++ b/recipes-graphics/wayland/weston/0001-ENGR00314805-1-Add-Vivante-EGL-support.patch
@@ -1,17 +1,20 @@ 
-From bc8f870072b134ffc9b8047a53835b7b6f714d5d Mon Sep 17 00:00:00 2001
-From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
-Date: Tue, 11 Mar 2014 17:35:52 -0500
-Subject: [PATCH] Add support for Vivante FBDEV EGL
+From 0d24f9872fc5bbbb07ae55f1107ba0f5060fca8a Mon Sep 17 00:00:00 2001
+From: Yong Gan <b45748@freescale.com>
+Date: Thu, 22 May 2014 15:25:42 +0800
+Subject: [PATCH 1/3] ENGR00314805-1 Add Vivante EGL support
+
+Add Vivante EGL compositor support.
 
 Upstream-Status: Pending
 
-Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
+[DATE]05-22-2014
+Signed-off-by Yong Gan <B45748@freescale.com>
 ---
- src/compositor-fbdev.c | 20 +++++++++++++++++---
- 1 file changed, 17 insertions(+), 3 deletions(-)
+ src/compositor-fbdev.c |   23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
 
 diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
-index 0d96269..ada0019 100644
+index e703e0e..3db1d17 100644
 --- a/src/compositor-fbdev.c
 +++ b/src/compositor-fbdev.c
 @@ -53,6 +53,7 @@ struct fbdev_compositor {
@@ -32,38 +35,40 @@  index 0d96269..ada0019 100644
  };
  
  struct fbdev_parameters {
-@@ -626,9 +630,13 @@ fbdev_output_create(struct fbdev_compositor *compositor,
- 		if (pixman_renderer_output_create(&output->base) < 0)
+@@ -627,10 +631,15 @@ fbdev_output_create(struct fbdev_compositor *compositor,
  			goto out_shadow_surface;
  	} else {
--		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
+ 		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
 +		output->window = fbCreateWindow(compositor->display, -1, -1, 0, 0);
-+	    if (output->window == NULL) {
-+	       fprintf(stderr, "failed to create window\n");
-+	       return 0;
-+	    }
++		if (output->window == NULL) {
++			fprintf(stderr, "failed to create window\n");
++			return 0;
++		}
  		if (gl_renderer->output_create(&output->base,
--					(EGLNativeWindowType)NULL) < 0) {
-+					(EGLNativeWindowType)output->window) < 0) {
+-					       (EGLNativeWindowType)NULL,
+-					       gl_renderer->opaque_attribs,
+-					       NULL) < 0) {
++						(EGLNativeWindowType)output->window,
++						gl_renderer->opaque_attribs,
++						NULL) < 0) {
  			weston_log("gl_renderer_output_create failed.\n");
  			goto out_shadow_surface;
  		}
-@@ -920,8 +928,14 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
- 			weston_log("could not load gl renderer\n");
+@@ -923,7 +932,13 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
  			goto out_launcher;
  		}
-+		
+ 
+-		if (gl_renderer->create(&compositor->base, EGL_DEFAULT_DISPLAY,
 +		compositor->display = fbGetDisplay(compositor->base.wl_display);
-+	    if (compositor->display == NULL) {
++		if (compositor->display == NULL) {
 +			weston_log("fbGetDisplay failed.\n");
 +			goto out_launcher;
-+	    }
- 
--		if (gl_renderer->create(&compositor->base, EGL_DEFAULT_DISPLAY,
++		}
++
 +		if (gl_renderer->create(&compositor->base, compositor->display,
  					gl_renderer->opaque_attribs,
  					NULL) < 0) {
  			weston_log("gl_renderer_create failed.\n");
 -- 
-1.8.1.2
+1.7.9.5
 
diff --git a/recipes-graphics/wayland/weston/0002-weston-Add-Vivante-2D-compositor-support.patch b/recipes-graphics/wayland/weston/0002-ENGR00314805-2-Add-Vivante-GAL2D-support.patch
similarity index 94%
rename from recipes-graphics/wayland/weston/0002-weston-Add-Vivante-2D-compositor-support.patch
rename to recipes-graphics/wayland/weston/0002-ENGR00314805-2-Add-Vivante-GAL2D-support.patch
index f60a208..13eabfe 100644
--- a/recipes-graphics/wayland/weston/0002-weston-Add-Vivante-2D-compositor-support.patch
+++ b/recipes-graphics/wayland/weston/0002-ENGR00314805-2-Add-Vivante-GAL2D-support.patch
@@ -1,59 +1,54 @@ 
-From c5fa88cb08477384430d2ab1123319c9d5dfb31c Mon Sep 17 00:00:00 2001
-From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
-Date: Mon, 24 Mar 2014 07:30:25 -0500
-Subject: [PATCH 2/2] weston : Add Vivante 2D compositor support
+From 2a24c62ef00d1b08974bd8f07e277695ac2911fa Mon Sep 17 00:00:00 2001
+From: Yong Gan <b45748@freescale.com>
+Date: Thu, 22 May 2014 15:26:31 +0800
+Subject: [PATCH 2/3] ENGR00314805-2 Add Vivante GAL2D support
 
-Upstream-Status: Pending
+Add Vivante GAL2D compositor support.
 
-Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
+Upstream status: Pending
+
+[DATE]05-22-2014
+Signed-off-by Yong Gan <B45748@freescale.com>
 ---
- src/Makefile.am        |   14 +
- src/compositor-fbdev.c |  111 ++++-
- src/gal2d-renderer.c   | 1186 ++++++++++++++++++++++++++++++++++++++++++++++++
- src/gal2d-renderer.h   |   43 ++
- 4 files changed, 1340 insertions(+), 14 deletions(-)
+ Makefile.am            |   13 +
+ src/compositor-fbdev.c |  110 ++++-
+ src/gal2d-renderer.c   | 1187 ++++++++++++++++++++++++++++++++++++++++++++++++
+ src/gal2d-renderer.h   |   41 ++
+ 4 files changed, 1337 insertions(+), 14 deletions(-)
  create mode 100644 src/gal2d-renderer.c
  create mode 100644 src/gal2d-renderer.h
 
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 446639c..ef6abd6 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -112,6 +112,7 @@ module_LTLIBRARIES =				\
- 	$(cms_static)				\
- 	$(cms_colord)				\
- 	$(gl_renderer)				\
-+	$(gal2d_renderer)				\
- 	$(x11_backend)				\
- 	$(drm_backend)				\
- 	$(wayland_backend)			\
-@@ -138,6 +139,19 @@ gl_renderer_la_SOURCES =			\
- 	gl-renderer.c				\
- 	vertex-clipping.c			\
- 	vertex-clipping.h
-+
-+gal2d_renderer = gal2d-renderer.la
+diff --git a/Makefile.am b/Makefile.am
+index 343adc6..2bccfe9 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -162,6 +162,19 @@ gl_renderer_la_SOURCES =			\
+ 	src/gl-renderer.c			\
+ 	src/vertex-clipping.c			\
+ 	src/vertex-clipping.h
++
++module_LTLIBRARIES += gal2d-renderer.la
 +gal2d_renderer_la_LDFLAGS = -module -avoid-version
 +gal2d_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS)
-+gal2d_renderer_la_CFLAGS =				\
++gal2d_renderer_la_CFLAGS =			\
 +	$(COMPOSITOR_CFLAGS)			\
 +	$(EGL_CFLAGS)				\
 +	$(GCC_CFLAGS)
 +gal2d_renderer_la_SOURCES =			\
-+	gal2d-renderer.h				\
-+	gal2d-renderer.c				\
-+	vertex-clipping.c			\
-+	vertex-clipping.h
++	src/gal2d-renderer.h			\
++	src/gal2d-renderer.c			\
++	src/vertex-clipping.c			\
++	src/vertex-clipping.h
  endif
  
  if ENABLE_X11_COMPOSITOR
 diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
-index 72939b4..28f1fca 100644
+index 3db1d17..a3d32e5 100644
 --- a/src/compositor-fbdev.c
 +++ b/src/compositor-fbdev.c
 @@ -44,6 +44,7 @@
  #include "pixman-renderer.h"
- #include "udev-seat.h"
+ #include "udev-input.h"
  #include "gl-renderer.h"
 +#include "gal2d-renderer.h"
  
@@ -65,7 +60,7 @@  index 72939b4..28f1fca 100644
  	int use_pixman;
 +	int use_gal2d;
  	struct wl_listener session_listener;
- 	NativeDisplayType display;
+ 	EGLNativeDisplayType display;
  };
 @@ -97,9 +99,11 @@ struct fbdev_parameters {
  	int tty;
@@ -107,28 +102,29 @@  index 72939b4..28f1fca 100644
  	                   output->fb_info.height_mm,
  	                   WL_OUTPUT_TRANSFORM_NORMAL,
  			   1);
-@@ -629,14 +634,40 @@ fbdev_output_create(struct fbdev_compositor *compositor,
+@@ -629,8 +634,33 @@ fbdev_output_create(struct fbdev_compositor *compositor,
  	if (compositor->use_pixman) {
  		if (pixman_renderer_output_create(&output->base) < 0)
  			goto out_shadow_surface;
 -	} else {
+-		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
 +	} 
 +	else if(compositor->use_gal2d) {
 +
 +		char* fbenv = getenv("FB_FRAMEBUFFER_0");
 +		setenv("FB_FRAMEBUFFER_0", device, 1);
 +		output->display = fbGetDisplay(compositor->base.wl_display);
-+	    if (output->display == NULL) {
-+	       fprintf(stderr, "failed to get display\n");
-+	       return 0;
-+	    }
-+
-+	    output->window = fbCreateWindow(output->display, -1, -1, 0, 0);
-+	    if (output->window == NULL) {
-+	       fprintf(stderr, "failed to create window\n");
-+	       return 0;
-+	    }
-+	    setenv("FB_FRAMEBUFFER_0", fbenv, 1);
++		if (output->display == NULL) {
++			fprintf(stderr, "failed to get display\n");
++			return 0;
++		}
++
++		output->window = fbCreateWindow(output->display, -1, -1, 0, 0);
++		if (output->window == NULL) {
++			fprintf(stderr, "failed to create window\n");
++			 return 0;
++		}
++		setenv("FB_FRAMEBUFFER_0", fbenv, 1);
 +
 +		if (gal2d_renderer->output_create(&output->base,
 +					output->display,
@@ -140,17 +136,9 @@  index 72939b4..28f1fca 100644
 +	}
 +	else {
  		output->window = fbCreateWindow(compositor->display, -1, -1, 0, 0);
- 	    if (output->window == NULL) {
- 	       fprintf(stderr, "failed to create window\n");
- 	       return 0;
- 	    }
- 		if (gl_renderer->output_create(&output->base,
--					(EGLNativeWindowType)output->window) < 0) {
-+					(NativeWindowType)output->window) < 0) {
- 			weston_log("gl_renderer_output_create failed.\n");
- 			goto out_shadow_surface;
- 		}
-@@ -695,7 +726,11 @@ fbdev_output_destroy(struct weston_output *base)
+ 		if (output->window == NULL) {
+ 			fprintf(stderr, "failed to create window\n");
+@@ -698,7 +728,11 @@ fbdev_output_destroy(struct weston_output *base)
  			free(output->shadow_buf);
  			output->shadow_buf = NULL;
  		}
@@ -163,7 +151,7 @@  index 72939b4..28f1fca 100644
  		gl_renderer->output_destroy(base);
  	}
  
-@@ -758,7 +793,7 @@ fbdev_output_reenable(struct fbdev_compositor *compositor,
+@@ -761,7 +795,7 @@ fbdev_output_reenable(struct fbdev_compositor *compositor,
  		 * are re-initialised. */
  		device = output->device;
  		fbdev_output_destroy(base);
@@ -172,7 +160,7 @@  index 72939b4..28f1fca 100644
  
  		return 0;
  	}
-@@ -911,7 +946,10 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
+@@ -914,7 +948,10 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
  	compositor->base.restore = fbdev_restore;
  
  	compositor->prev_state = WESTON_COMPOSITOR_ACTIVE;
@@ -184,7 +172,7 @@  index 72939b4..28f1fca 100644
  
  	for (key = KEY_F1; key < KEY_F9; key++)
  		weston_compositor_add_key_binding(&compositor->base, key,
-@@ -921,7 +959,50 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
+@@ -924,7 +961,50 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
  	if (compositor->use_pixman) {
  		if (pixman_renderer_init(&compositor->base) < 0)
  			goto out_launcher;
@@ -236,7 +224,7 @@  index 72939b4..28f1fca 100644
  		gl_renderer = weston_load_module("gl-renderer.so",
  						 "gl_renderer_interface");
  		if (!gl_renderer) {
-@@ -942,9 +1023,9 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
+@@ -945,9 +1025,9 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
  			goto out_launcher;
  		}
  	}
@@ -249,7 +237,7 @@  index 72939b4..28f1fca 100644
  
  	udev_input_init(&compositor->input, &compositor->base, compositor->udev, seat_id);
  
-@@ -977,13 +1058,15 @@ backend_init(struct wl_display *display, int *argc, char *argv[],
+@@ -980,13 +1060,15 @@ backend_init(struct wl_display *display, int *argc, char *argv[],
  	struct fbdev_parameters param = {
  		.tty = 0, /* default to current tty */
  		.device = "/dev/fb0", /* default frame buffer */
@@ -269,10 +257,10 @@  index 72939b4..28f1fca 100644
  	parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv);
 diff --git a/src/gal2d-renderer.c b/src/gal2d-renderer.c
 new file mode 100644
-index 0000000..be7af3c
+index 0000000..c651573
 --- /dev/null
 +++ b/src/gal2d-renderer.c
-@@ -0,0 +1,1186 @@
+@@ -0,0 +1,1187 @@
 +/*
 + * Copyright (c) 2014 Freescale Semiconductor, Inc.
 + * Copyright © 2012 Intel Corporation
@@ -1228,7 +1216,8 @@  index 0000000..be7af3c
 +	wl_list_remove(&gs->renderer_destroy_listener.link);
 +	if(gs->surface)
 +		gs->surface->renderer_state = NULL;
-+    
++
++	weston_buffer_reference(&gs->buffer_ref, NULL);
 +	free(gs);
 +}
 +
@@ -1461,10 +1450,10 @@  index 0000000..be7af3c
 +};
 diff --git a/src/gal2d-renderer.h b/src/gal2d-renderer.h
 new file mode 100644
-index 0000000..ebffec1
+index 0000000..3b89f73
 --- /dev/null
 +++ b/src/gal2d-renderer.h
-@@ -0,0 +1,43 @@
+@@ -0,0 +1,41 @@
 +/*
 + * Copyright (c) 2014 Freescale Semiconductor, Inc.
 + * Copyright © 2013 Vasily Khoruzhick <anarsoul@gmail.com>
@@ -1505,9 +1494,7 @@  index 0000000..ebffec1
 +	void (*output_destroy)(struct weston_output *output);
 +};
 +
-+struct gal2d_renderer_interface gal2d_renderer_interface;
-+
 +#endif
 -- 
-1.9.0
+1.7.9.5
 
diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend
index 0576b37..7ac9a2f 100644
--- a/recipes-graphics/wayland/weston_%.bbappend
+++ b/recipes-graphics/wayland/weston_%.bbappend
@@ -1,7 +1,7 @@ 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI += "file://0001-Add-support-for-Vivante-FBDEV-EGL.patch \
-            file://0002-weston-Add-Vivante-2D-compositor-support.patch "
+SRC_URI += "file://0001-ENGR00314805-1-Add-Vivante-EGL-support.patch \
+            file://0002-ENGR00314805-2-Add-Vivante-GAL2D-support.patch "
 
 PACKAGECONFIG_mx6 = "fbdev egl cairo-glesv2"
 
@@ -17,5 +17,6 @@  EXTRA_OEMAKE_append_mx6 = " \
     FB_COMPOSITOR_CFLAGS="-DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \
     FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
     SIMPLE_EGL_CLIENT_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
-    CLIENT_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
+    EGL_TESTS_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
+    CLIENT_CFLAGS="-I ${STAGING_INCDIR}/cairo -I ${STAGING_INCDIR}/pixman-1 -DLINUX -DEGL_API_FB -DEGL_API_WL" \
 "
diff --git a/recipes-graphics/wayland/weston_1.4.0.bbappend b/recipes-graphics/wayland/weston_1.4.0.bbappend
deleted file mode 100644
index ea07796..0000000
--- a/recipes-graphics/wayland/weston_1.4.0.bbappend
+++ /dev/null
@@ -1,13 +0,0 @@ 
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://0001-ENGR00306154-3-ccc-Add-Wayland-1.4.0-support.patch \
-            file://weston.sh"
-
-do_install_append () {
-    install -d ${D}${sysconfdir}/profile.d/
-    install -m 0755 ${WORKDIR}/weston.sh ${D}${sysconfdir}/profile.d/
-}
-
-FILES_${PN} += "${sysconfdir}/profile.d/weston.sh"
-
-PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}"