Skip to contentSkip to conversation

weston: Consolidate i.MX GPU patches

PATCH New Tom Hochstein 1 participant 1 message Jan 25, 2017 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 weston: Consolidate i.MX GPU patches

This is a non-functional change with one small exception, an additional variable initialization that has no known behavioral effect:

diff -wr weston-1.11.1/src/compositor-fbdev.c /home/r60874/tmp/weston/weston-1.11.1-old4/src/compositor-fbdev.c 922d921
< config->clone_mode = 0;

---
 ...2-ccc-Add-GPU-VIV-support-for-weston-1.11.patch |  135 ++
 ...d-GPU-VIV-suport-for-wayland-and-weston-1.patch | 1708 -----------------
 ...-ccc-Enable-g2d-renderer-for-weston-1.11.patch} | 1956 ++++----------------
 ...GS-1192-xwld-g2d-compositor-dose-not-work.patch |   28 -
 ...d-Add-clone-mode-support-for-multi-displ.patch} |  423 +----
 ...GS-1235-Fix-setenv-and-clear-environments.patch |   41 -
 ...8-xwld-System-can-not-boot-up-to-desktop.patch} |    8 +-
 ...x-for-Qt5_CinematicExperience-will-meet-s.patch |   93 -
 ...d-G2D-compositor-build-failed-in-slevk-b.patch} |  113 +-
 ...egl.patch => 0006-Link-compositor-to-egl.patch} |    0
 ...x6qp-imx6dl-First-frame-distored-when-som.patch |  106 --
 ...imx6qp-imx6dl-First-frame-distored-when-s.patch |   51 -
 ...-Fix-crash-when-run-with-no-input-device.patch} |    0
 ...xwld-Re-implement-weston-2d-renderer-with.patch |   36 -
 ...-Use-common-API-to-support-G2d-compositor.patch |  196 --
 ...014-MGS-1987-Get-stride-from-the-FB-buffe.patch |   76 -
 ...-MGS-2221-imx-171-Fix-weston-build-failed.patch |   62 -
 ...c-XWLD-T3DStressTest_Wayland-displays-abn.patch |   40 -
 ...c-Enable-double-buffer-with-fb_pan_displa.patch |   48 -
 recipes-graphics/wayland/weston_%.bbappend         |   25 +-
 20 files changed, 623 insertions(+), 4522 deletions(-)
 create mode 100644 recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch
 delete mode 100644 recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch
 rename recipes-graphics/wayland/weston/{0009-MGS-1284-xwld-Re-implement-weston-2d-renderer-with-p.patch => 0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch} (42%)
 delete mode 100644 recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch
 rename recipes-graphics/wayland/weston/{0012-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch => 0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch} (13%)
 delete mode 100644 recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch
 rename recipes-graphics/wayland/weston/{0019-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch => 0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch} (83%)
 delete mode 100644 recipes-graphics/wayland/weston/0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch
 rename recipes-graphics/wayland/weston/{0011-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch => 0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch} (44%)
 rename recipes-graphics/wayland/weston/{0016-Link-compositor-to-egl.patch => 0006-Link-compositor-to-egl.patch} (100%)
 delete mode 100644 recipes-graphics/wayland/weston/0006-MGS-1236-imx6qp-imx6dl-First-frame-distored-when-som.patch
 delete mode 100644 recipes-graphics/wayland/weston/0007-MGS-1236-1-imx6qp-imx6dl-First-frame-distored-when-s.patch
 rename recipes-graphics/wayland/weston/{0020-xwayland-Fix-crash-when-run-with-no-input-device.patch => 0007-xwayland-Fix-crash-when-run-with-no-input-device.patch} (100%)
 delete mode 100644 recipes-graphics/wayland/weston/0010-MGS-1284-1-xwld-Re-implement-weston-2d-renderer-with.patch
 delete mode 100644 recipes-graphics/wayland/weston/0013-MGS-1945-Use-common-API-to-support-G2d-compositor.patch
 delete mode 100644 recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch
 delete mode 100644 recipes-graphics/wayland/weston/0015-MGS-2221-imx-171-Fix-weston-build-failed.patch
 delete mode 100644 recipes-graphics/wayland/weston/0017-MGS-2343-ccc-XWLD-T3DStressTest_Wayland-displays-abn.patch
 delete mode 100644 recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch
recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch new file +135 -0
new file mode 100644
index 0000000..37a2d4c
@@ -0,0 +1,135 @@
+From dfad4d734412e4ec53bfff29c7c503479857f66c Mon Sep 17 00:00:00 2001
+From: Meng Mingming <[email protected]>
+Date: Mon, 9 Jan 2017 15:04:27 +0800
+Subject: [PATCH 1/5] MGS-2352 [#ccc] Add GPU-VIV support for weston 1.11
+
+Add GPU-VIV support for weston 1.11
+
+Upstream Status: Inappropriate [i.MX specific]
+
+Date: Jan 09, 2017
+Signed-off-by: Meng Mingming <[email protected]>
+---
+ src/compositor-fbdev.c | 37 ++++++++++++++++++++++++++++---------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
+index ee762e3..06f4696 100644
+--- a/src/compositor-fbdev.c
++++ b/src/compositor-fbdev.c
+@@ -61,6 +61,7 @@ struct fbdev_backend {
+ 	int use_pixman;
+ 	uint32_t output_transform;
+ 	struct wl_listener session_listener;
++	NativeDisplayType display;
+ };
+ 
+ struct fbdev_screeninfo {
+@@ -93,6 +94,9 @@ struct fbdev_output {
+ 	/* pixman details. */
+ 	pixman_image_t *hw_surface;
+ 	uint8_t depth;
++
++	NativeDisplayType display;
++	NativeWindowType  window;
+ };
+ 
+ struct gl_renderer_interface *gl_renderer;
+@@ -443,6 +447,10 @@ fbdev_frame_buffer_destroy(struct fbdev_output *output)
+ 		           strerror(errno));
+ 
+ 	output->fb = NULL;
++	if(output->window)
++		fbDestroyWindow(output->window);
++	if(output->display)
++		fbDestroyDisplay(output->display);
+ }
+ 
+ static void fbdev_output_destroy(struct weston_output *base);
+@@ -450,13 +458,13 @@ static void fbdev_output_disable(struct weston_output *base);
+ 
+ static int
+ fbdev_output_create(struct fbdev_backend *backend,
+-                    const char *device)
++                   int x, int y, const char *device)
+ {
+ 	struct fbdev_output *output;
+ 	int fb_fd;
+ 	struct wl_event_loop *loop;
+ 
+-	weston_log("Creating fbdev output.\n");
++	weston_log("Creating fbdev output. %s x=%d y=%d\n", device, x, y);
+ 
+ 	output = zalloc(sizeof *output);
+ 	if (output == NULL)
+@@ -500,7 +508,7 @@ fbdev_output_create(struct fbdev_backend *backend,
+ 	output->base.name = strdup("fbdev");
+ 
+ 	weston_output_init(&output->base, backend->compositor,
+-	                   0, 0, output->fb_info.width_mm,
++	                   x, y, output->fb_info.width_mm,
+ 	                   output->fb_info.height_mm,
+ 	                   backend->output_transform,
+ 			   1);
+@@ -510,8 +518,13 @@ fbdev_output_create(struct fbdev_backend *backend,
+ 			goto out_hw_surface;
+ 	} else {
+ 		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
++		output->window = fbCreateWindow(backend->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)NULL, NULL,
++					       (EGLNativeWindowType)output->window, NULL,
+ 					       gl_renderer->opaque_attribs,
+ 					       NULL, 0) < 0) {
+ 			weston_log("gl_renderer_output_create failed.\n");
+@@ -622,7 +635,7 @@ fbdev_output_reenable(struct fbdev_backend *backend,
+ 		 * are re-initialised. */
+ 		device = strdup(output->device);
+ 		fbdev_output_destroy(&output->base);
+-		fbdev_output_create(backend, device);
++		fbdev_output_create(backend, 0, 0, device);
+ 		free(device);
+ 
+ 		return 0;
+@@ -785,17 +798,21 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
+ 			goto out_launcher;
+ 		}
+ 
++		backend->display = fbGetDisplay(backend->compositor->wl_display);
++		if (backend->display == NULL) {
++			weston_log("fbGetDisplay failed.\n");
++			goto out_launcher;
++		}
+ 		if (gl_renderer->create(compositor, NO_EGL_PLATFORM,
+-					EGL_DEFAULT_DISPLAY,
++					backend->display,
+ 					gl_renderer->opaque_attribs,
+ 					NULL, 0) < 0) {
+ 			weston_log("gl_renderer_create failed.\n");
+ 			goto out_launcher;
+ 		}
+ 	}
+-
+-	if (fbdev_output_create(backend, param->device) < 0)
+-		goto out_launcher;
++	if (fbdev_output_create(backend, 0, 0, param->device) < 0)
++			goto out_launcher;
+ 
+ 	udev_input_init(&backend->input, compositor, backend->udev, seat_id);
+ 
+@@ -844,6 +861,8 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
+ 	config_init_to_defaults(&config);
+ 	memcpy(&config, config_base, config_base->struct_size);
+ 
++	config.use_gl = 1;
++
+ 	b = fbdev_backend_create(compositor, argc, argv, wc, &config);
+ 	if (b == NULL)
+ 		return -1;
+-- 
+2.7.4
+
recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch deleted +0 -1708

1,708 lines not on this page · raw message

recipes-graphics/wayland/weston/0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch renamed from recipes-graphics/wayland/weston/0009-MGS-1284-xwld-Re-implement-weston-2d-renderer-with-p.patch +359 -1597

1,157 lines not on this page · raw message

recipes-graphics/wayland/weston/0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch deleted +0 -28
deleted file mode 100644
index 019b710..0000000

Lines of this file are not shown. View the raw message.

recipes-graphics/wayland/weston/0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch renamed from recipes-graphics/wayland/weston/0012-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch +53 -370

423 lines not on this page · raw message

recipes-graphics/wayland/weston/0004-MGS-1235-Fix-setenv-and-clear-environments.patch deleted +0 -41

41 lines not on this page · raw message

recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch renamed from recipes-graphics/wayland/weston/0019-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch +4 -4
similarity index 83%
rename from recipes-graphics/wayland/weston/0019-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch
rename to recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch
index 09404ca..95a88e6 100644

Lines of this file are not shown. View the raw message.

recipes-graphics/wayland/weston/0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch deleted +0 -93

93 lines not on this page · raw message

recipes-graphics/wayland/weston/0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch renamed from recipes-graphics/wayland/weston/0011-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch +65 -48

113 lines not on this page · raw message

recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch renamed from recipes-graphics/wayland/weston/0016-Link-compositor-to-egl.patch +0 -0
similarity index 100%
rename from recipes-graphics/wayland/weston/0016-Link-compositor-to-egl.patch
rename to recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch
recipes-graphics/wayland/weston/0006-MGS-1236-imx6qp-imx6dl-First-frame-distored-when-som.patch deleted +0 -106

106 lines not on this page · raw message

recipes-graphics/wayland/weston/0007-MGS-1236-1-imx6qp-imx6dl-First-frame-distored-when-s.patch deleted +0 -51

51 lines not on this page · raw message

recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch renamed from recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch +0 -0
similarity index 100%
rename from recipes-graphics/wayland/weston/0020-xwayland-Fix-crash-when-run-with-no-input-device.patch
rename to recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch
recipes-graphics/wayland/weston/0010-MGS-1284-1-xwld-Re-implement-weston-2d-renderer-with.patch deleted +0 -36
deleted file mode 100644
index 96181ab..0000000

Lines of this file are not shown. View the raw message.

recipes-graphics/wayland/weston/0013-MGS-1945-Use-common-API-to-support-G2d-compositor.patch deleted +0 -196

196 lines not on this page · raw message

recipes-graphics/wayland/weston/0014-MGS-1987-Get-stride-from-the-FB-buffe.patch deleted +0 -76

76 lines not on this page · raw message

recipes-graphics/wayland/weston/0015-MGS-2221-imx-171-Fix-weston-build-failed.patch deleted +0 -62

62 lines not on this page · raw message

recipes-graphics/wayland/weston/0017-MGS-2343-ccc-XWLD-T3DStressTest_Wayland-displays-abn.patch deleted +0 -40
deleted file mode 100644
index d0b82aa..0000000

Lines of this file are not shown. View the raw message.

recipes-graphics/wayland/weston/0018-MGS-2397-ccc-Enable-double-buffer-with-fb_pan_displa.patch deleted +0 -48

48 lines not on this page · raw message

recipes-graphics/wayland/weston_%.bbappend +7 -18
index 26b12dc..74d2359 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.9.1

Part of the diff is not shown here. View the raw message.