summaryrefslogtreecommitdiffstats
path: root/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
commit4204309872da5cb401cbb2729d9e2d4869a87f42 (patch)
treec7415e8600205e40ff7e91e8e5f4c411f30329f2 /meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland
parent5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff)
Diffstat (limited to 'meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland')
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb21
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb8
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend121
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/tmpfiles.conf.in (renamed from meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf)0
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.conf.in (renamed from meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add)6
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in2
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in1
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules1
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in1
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch36
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch202
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch264
-rw-r--r--meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend4
13 files changed, 394 insertions, 273 deletions
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb
new file mode 100644
index 00000000..2efcc9bd
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Reference Wayland compositor for AGL"
+DESCRIPTION = "The AGL compositor is a reference Wayland server for Automotive \
+Grade Linux, using libweston as a base to provide a graphical environment for \
+the automotive environment."
+
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fagl-compositor"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fac6abe0003c4d142ff8fa1f18316df0"
+
+DEPENDS = "wayland wayland-protocols wayland-native weston"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-compositor.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "facb744f37ecb40dde776300ab9e99ef21fc7991"
+
+PV = "0.0.10+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig python3native
+
+FILES_${PN} = "${bindir}/agl-compositor"
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb
index 9f6684fc..89d97f51 100644
--- a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://waltham-transmitter/COPYING;md5=f21c9af4de068fb53b83f
DEPENDS += "libdrm virtual/kernel wayland wayland-native waltham weston gstreamer1.0 gstreamer gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad wayland-ivi-extension"
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/weston-ivi-plugins.git;protocol=https;branch=${AGL_BRANCH}"
-SRCREV = "0fc0e974749f4ce35e14c23b050aa8fe693c3ce5"
+SRCREV = "5287483228fa1e28f3217a54606cfe760c6582bd"
S = "${WORKDIR}/git/"
@@ -20,11 +20,11 @@ inherit pkgconfig cmake
do_install_append () {
install -d ${D}/etc/xdg/weston/
- install ${S}/${WALTHAM_PIPELINE_TRANSMITTER} ${D}/etc/xdg/weston/pipeline.cfg
+ install ${S}/${WALTHAM_PIPELINE_TRANSMITTER} ${D}/etc/xdg/weston/transmitter_pipeline.cfg
install ${S}/${WALTHAM_PIPELINE_RECEIVER} ${D}/etc/xdg/weston/receiver_pipeline.cfg
- sed -i -e "s/YOUR_RECIEVER_IP/${WALTHAM_RECIEVER_IP}/g" ${D}/etc/xdg/weston/pipeline.cfg
- sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/pipeline.cfg
+ sed -i -e "s/YOUR_RECIEVER_IP/${WALTHAM_RECIEVER_IP}/g" ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/transmitter_pipeline.cfg
sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/receiver_pipeline.cfg
}
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend
index 910cf5a6..247aeeee 100644
--- a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend
@@ -3,79 +3,70 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
inherit agl-graphical
-WESTONSTART ??= "/usr/bin/weston ${WESTONARGS}"
+WESTONSTART ??= "${@bb.utils.contains("DISTRO_FEATURES", "agl-compositor", "/usr/bin/agl-compositor", "/usr/bin/weston",d)} ${WESTONARGS}"
WESTONSTART_append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/weston.log", "",d)}"
-SRC_URI += " \
- file://weston_tmpfiles.conf \
- file://weston.service.add \
+DROPIN_NAME = "weston-init"
+
+WIFILES = " \
+ file://weston.conf.in \
+ file://tmpfiles.conf.in \
+ file://zz-dri.rules.in \
+ file://zz-input.rules \
+ file://zz-tty.rules.in \
"
-do_install_append() {
- sed -i "/\[Unit\]/aConflicts=getty@tty${WESTONTTY}.service" \
- ${D}${systemd_system_unitdir}/weston.service
-
- sed -i "/\[Service\]/r ${S}/weston.service.add" \
- ${D}${systemd_system_unitdir}/weston.service
-
- if ! grep -q '^Group=' ${D}${systemd_system_unitdir}/weston.service; then
- sed -i "/\[Service\]/aGroup=root" ${D}${systemd_system_unitdir}/weston.service
- fi
- if ! grep -q '^User=' ${D}${systemd_system_unitdir}/weston.service; then
- sed -i "/\[Service\]/aUser=root" ${D}${systemd_system_unitdir}/weston.service
- fi
-
- sed -e 's,User=root,User=${WESTONUSER},g' \
- -e 's,Group=root,Group=${WESTONGROUP},g' \
- -e 's,ExecStart=.*,ExecStart=${WESTONSTART},g' \
- -e 's,@WESTONTTY@,${WESTONTTY},g' \
- -e 's,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \
- -e '/PAMName=/d' \
- -i ${D}${systemd_system_unitdir}/weston.service
-
- # Add a rule to ensure the 'display' user has permissions to
- # open the graphics device
- install -d ${D}${sysconfdir}/init.d
- install -d ${D}${sysconfdir}/udev/rules.d
- cat >${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF'
-SUBSYSTEM=="drm", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
-EOF
-
- # user 'display' must own /dev/tty${WESTONTTY} for weston to start correctly
- cat >${D}${sysconfdir}/udev/rules.d/zz-tty.rules <<'EOF'
-SUBSYSTEM=="tty", KERNEL=="tty${WESTONTTY}", OWNER="${WESTONUSER}", SECLABEL{smack}="^", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
-EOF
-
- # user 'display' must also be able to access /dev/input/*
- cat >${D}${sysconfdir}/udev/rules.d/zz-input.rules <<'EOF'
-SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="^", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
-EOF
-
- # user 'display' must also be able to access /dev/media*, etc.
- cat >${D}${sysconfdir}/udev/rules.d/zz-remote-display.rules <<'EOF'
-SUBSYSTEM=="media", MODE="0660", GROUP="display", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
-SUBSYSTEM=="video4linux", MODE="0660", GROUP="display", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
-KERNEL=="uvcs", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*"
-KERNEL=="rgnmm", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*"
-EOF
-
- install -d ${D}${sysconfdir}/tmpfiles.d
- install -Dm755 ${WORKDIR}/weston_tmpfiles.conf ${D}/${libdir}/tmpfiles.d/weston.conf
-
- sed -e 's,@WESTONUSER@,${WESTONUSER},g' \
- -e 's,@WESTONGROUP@,${WESTONGROUP},g' \
- -i ${D}/${libdir}/tmpfiles.d/weston.conf
-}
+WIFILES_append_imx = " \
+ file://zz-dri-imx.rules.in \
+"
-do_install_append_imx() {
+SRC_URI_append = " ${WIFILES}"
- install -d ${D}${sysconfdir}/udev/rules.d
- cat >>${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF'
-SUBSYSTEM=="gpu_class", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*"
-EOF
+do_install_append() {
+ # files
+ files=$(echo ${WIFILES} | sed s,file://,,g)
+
+ # process ".in" files
+ for f in ${files}; do
+ g=${f%.in}
+ if [ "${f}" != "${g}" ]; then
+ sed -e "s,@WESTONUSER@,${WESTONUSER},g" \
+ -e "s,@WESTONGROUP@,${WESTONGROUP},g" \
+ -e "s,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g" \
+ -e "s,@WESTONTTY@,${WESTONTTY},g" \
+ -e "s,@WESTONSTART@,${WESTONSTART},g" \
+ ${WORKDIR}/${f} > ${WORKDIR}/${g}
+ fi
+ done
+
+ # removes any unexpected entry from weston.service
+ for x in Group User ExecStart PAMName; do
+ sed -i "/^ *$x *=/d" ${D}${systemd_system_unitdir}/weston.service
+ done
+
+ # install weston drop-in
+ install -d ${D}${systemd_system_unitdir}/weston.service.d
+ install -m644 ${WORKDIR}/weston.conf ${D}/${systemd_system_unitdir}/weston.service.d/${DROPIN_NAME}.conf
+
+ # install tmpfiles drop-in
+ install -d ${D}${libdir}/tmpfiles.d
+ install -m644 ${WORKDIR}/tmpfiles.conf ${D}${libdir}/tmpfiles.d/${DROPIN_NAME}.conf
+
+ # install udev rules
+ install -d ${D}${sysconfdir}/udev/rules.d
+ for f in ${files}; do
+ g=${f%.in}
+ h=${g%.rules}
+ if [ "${g}" != "${h}" ]; then
+ install -m644 ${WORKDIR}/${g} ${D}${sysconfdir}/udev/rules.d
+ fi
+ done
}
-FILES_${PN} += "${libdir}/tmpfiles.d/*.conf"
+FILES_${PN} += " \
+ ${libdir}/tmpfiles.d/*.conf \
+ ${systemd_system_unitdir}/weston.service.d/${DROPIN_NAME}.conf \
+"
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/tmpfiles.conf.in
index c4b302fa..c4b302fa 100644
--- a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/tmpfiles.conf.in
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.conf.in
index d24a8eb2..89c43669 100644
--- a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.conf.in
@@ -1,8 +1,14 @@
+[Unit]
+Conflicts=getty@tty@WESTONTTY@.service
+[Service]
Type=notify
+User=@WESTONUSER@
+Group=@WESTONGROUP@
Environment="XDG_RUNTIME_DIR=@XDG_RUNTIME_DIR@"
Environment="XDG_RUNTIMESHARE_DIR=@XDG_RUNTIME_DIR@/share"
ExecStartPre=/bin/mkdir -p @XDG_RUNTIME_DIR@/share
ExecStartPre=+/usr/bin/chsmack -a User::App-Shared -t @XDG_RUNTIME_DIR@/share
+ExecStart=@WESTONSTART@
TTYPath=/dev/tty@WESTONTTY@
StandardInput=tty
TTYReset=yes
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in
new file mode 100644
index 00000000..585db6be
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in
@@ -0,0 +1,2 @@
+SUBSYSTEM=="gpu_class", MODE="0660", GROUP="@WESTONGROUP@", SECLABEL{smack}="*"
+
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in
new file mode 100644
index 00000000..707d12e2
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in
@@ -0,0 +1 @@
+SUBSYSTEM=="drm", MODE="0660", GROUP="@WESTONGROUP@", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules
new file mode 100644
index 00000000..c0842135
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in
new file mode 100644
index 00000000..bfdf55b8
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in
@@ -0,0 +1 @@
+SUBSYSTEM=="tty", KERNEL=="tty@WESTONTTY@", OWNER="@WESTONUSER@", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service"
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch
new file mode 100644
index 00000000..9dbd7a74
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch
@@ -0,0 +1,36 @@
+From 40ff644ac4da90c5cf5239c6ee6051d9bb2b099a Mon Sep 17 00:00:00 2001
+From: Daniel Stone <daniels@collabora.com>
+Date: Mon, 25 Nov 2019 10:30:11 +0000
+Subject: [PATCH] config-parser: Export get_full_path and destroy
+
+Make sure we export the get_full_path() accessor (declared in the
+header, used by Weston itself) and the parser's destroy function.
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+---
+ shared/config-parser.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/shared/config-parser.c b/shared/config-parser.c
+index 35f09f006..94eb24cc1 100644
+--- a/shared/config-parser.c
++++ b/shared/config-parser.c
+@@ -470,6 +470,7 @@ weston_config_parse(const char *name)
+ return config;
+ }
+
++WL_EXPORT
+ const char *
+ weston_config_get_full_path(struct weston_config *config)
+ {
+@@ -500,6 +501,7 @@ weston_config_next_section(struct weston_config *config,
+ return 1;
+ }
+
++WL_EXPORT
+ void
+ weston_config_destroy(struct weston_config *config)
+ {
+--
+2.21.0
+
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch
deleted file mode 100644
index 187bea50..00000000
--- a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From e31e63976aab7616319c10ad21c998c3b4c634e6 Mon Sep 17 00:00:00 2001
-From: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
-Date: Tue, 30 Jul 2019 20:22:15 +0900
-Subject: [PATCH 1/2] compositor: add output type to weston_output
-
-This enables weston to use multiple types of backend
-Each backends have own output structure for each functions
-To avoid invalid member access, type identifier is needed
-
-Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
----
- libweston/compositor-drm.c | 12 +++++++++++-
- libweston/compositor-fbdev.c | 2 +-
- libweston/compositor-headless.c | 2 +-
- libweston/compositor-rdp.c | 2 +-
- libweston/compositor-wayland.c | 2 +-
- libweston/compositor-x11.c | 2 +-
- libweston/compositor.h | 12 ++++++++++++
- 7 files changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
-index c110110..b83459a 100644
---- a/libweston/compositor-drm.c
-+++ b/libweston/compositor-drm.c
-@@ -923,6 +923,7 @@ drm_output_find_by_crtc(struct drm_backend *b, uint32_t crtc_id)
- struct drm_output *output;
-
- wl_list_for_each(output, &b->compositor->output_list, base.link) {
-+ if(output->base.output_type == OUTPUT_DRM)
- if (output->crtc_id == crtc_id)
- return output;
- }
-@@ -939,6 +940,7 @@ drm_head_find_by_connector(struct drm_backend *backend, uint32_t connector_id)
- wl_list_for_each(base,
- &backend->compositor->head_list, compositor_link) {
- head = to_drm_head(base);
-+ if(base->output->output_type == OUTPUT_DRM)
- if (head->connector_id == connector_id)
- return head;
- }
-@@ -6159,6 +6161,7 @@ drm_output_enable(struct weston_output *base)
-
- assert(!output->virtual);
-
-+ output->base.output_type = OUTPUT_DRM;
- resources = drmModeGetResources(b->drm.fd);
- if (!resources) {
- weston_log("drmModeGetResources failed\n");
-@@ -6628,6 +6631,7 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device)
- /* Remove connectors that have disappeared. */
- wl_list_for_each_safe(base, next,
- &b->compositor->head_list, compositor_link) {
-+ if (base->output->output_type == OUTPUT_DRM) {
- bool removed = true;
-
- head = to_drm_head(base);
-@@ -6646,6 +6650,7 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device)
- head->base.name, head->connector_id);
- drm_head_destroy(head);
- }
-+ }
-
- drm_backend_update_unused_outputs(b, resources);
-
-@@ -6751,12 +6756,14 @@ session_notify(struct wl_listener *listener, void *data)
- * pending frame callbacks. */
-
- wl_list_for_each(output, &compositor->output_list, base.link) {
-+ if(output->base.output_type == OUTPUT_DRM) {
- output->base.repaint_needed = false;
- if (output->cursor_plane)
- drmModeSetCursor(b->drm.fd, output->crtc_id,
- 0, 0, 0);
- }
--
-+ }
-+ if(output->base.output_type == OUTPUT_DRM) {
- output = container_of(compositor->output_list.next,
- struct drm_output, base.link);
-
-@@ -6768,6 +6775,7 @@ session_notify(struct wl_listener *listener, void *data)
- plane->plane_id,
- output->crtc_id, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0);
-+ }
- }
- }
- }
-@@ -7094,6 +7102,7 @@ switch_to_gl_renderer(struct drm_backend *b)
- }
-
- wl_list_for_each(output, &b->compositor->output_list, base.link)
-+ if(output->base.output_type == OUTPUT_DRM)
- pixman_renderer_output_destroy(&output->base);
-
- b->compositor->renderer->destroy(b->compositor);
-@@ -7106,6 +7115,7 @@ switch_to_gl_renderer(struct drm_backend *b)
- }
-
- wl_list_for_each(output, &b->compositor->output_list, base.link)
-+ if(output->base.output_type == OUTPUT_DRM)
- drm_output_init_egl(output, b);
-
- b->use_pixman = 0;
-diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
-index 6031be5..97002e6 100644
---- a/libweston/compositor-fbdev.c
-+++ b/libweston/compositor-fbdev.c
-@@ -526,7 +526,7 @@ fbdev_output_enable(struct weston_output *base)
- struct fbdev_head *head;
- int fb_fd;
- struct wl_event_loop *loop;
--
-+ output->base.output_type = OUTPUT_FBDEV;
- head = fbdev_output_get_head(output);
-
- /* Create the frame buffer. */
-diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c
-index 5a0e46c..20b78b2 100644
---- a/libweston/compositor-headless.c
-+++ b/libweston/compositor-headless.c
-@@ -160,7 +160,7 @@ headless_output_enable(struct weston_output *base)
- loop = wl_display_get_event_loop(b->compositor->wl_display);
- output->finish_frame_timer =
- wl_event_loop_add_timer(loop, finish_frame_handler, output);
--
-+ output->base.output_type = OUTPUT_HEADLESS;
- if (b->use_pixman) {
- output->image_buf = malloc(output->base.current_mode->width *
- output->base.current_mode->height * 4);
-diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
-index 871a0a3..b3064dd 100644
---- a/libweston/compositor-rdp.c
-+++ b/libweston/compositor-rdp.c
-@@ -554,7 +554,7 @@ rdp_output_enable(struct weston_output *base)
- struct rdp_output *output = to_rdp_output(base);
- struct rdp_backend *b = to_rdp_backend(base->compositor);
- struct wl_event_loop *loop;
--
-+ output->base.output_type = OUTPUT_RDP;
- output->shadow_surface = pixman_image_create_bits(PIXMAN_x8r8g8b8,
- output->base.current_mode->width,
- output->base.current_mode->height,
-diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
-index e1485ca..75140b2 100644
---- a/libweston/compositor-wayland.c
-+++ b/libweston/compositor-wayland.c
-@@ -1221,7 +1221,7 @@ wayland_output_enable(struct weston_output *base)
- struct wayland_backend *b = to_wayland_backend(base->compositor);
- enum mode_status mode_status;
- int ret = 0;
--
-+ output->base.output_type = OUTPUT_WAYLAND;
- weston_log("Creating %dx%d wayland output at (%d, %d)\n",
- output->base.current_mode->width,
- output->base.current_mode->height,
-diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
-index 922e3c8..8c20626 100644
---- a/libweston/compositor-x11.c
-+++ b/libweston/compositor-x11.c
-@@ -934,7 +934,7 @@ x11_output_enable(struct weston_output *base)
- XCB_EVENT_MASK_STRUCTURE_NOTIFY,
- 0
- };
--
-+ output->base.output_type = OUTPUT_X11;
- if (!b->no_input)
- values[0] |=
- XCB_EVENT_MASK_KEY_PRESS |
-diff --git a/libweston/compositor.h b/libweston/compositor.h
-index a5223c2..040917b 100644
---- a/libweston/compositor.h
-+++ b/libweston/compositor.h
-@@ -169,6 +169,17 @@ enum dpms_enum {
- WESTON_DPMS_OFF
- };
-
-+/* bit compatible with drm definitions. */
-+enum output_type {
-+ OUTPUT_DRM,
-+ OUTPUT_FBDEV,
-+ OUTPUT_HEADLESS,
-+ OUTPUT_RDP,
-+ OUTPUT_WAYLAND,
-+ OUTPUT_X11,
-+ OUTPUT_WALTHAM
-+};
-+
- /** Represents a monitor
- *
- * This object represents a monitor (hardware backends like DRM) or a window
-@@ -202,6 +213,7 @@ struct weston_head {
- struct weston_output {
- uint32_t id;
- char *name;
-+ enum output_type output_type;
-
- /** Matches the lifetime from the user perspective */
- struct wl_signal user_destroy_signal;
---
-2.7.4
-
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch
new file mode 100644
index 00000000..51779cf4
--- /dev/null
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch
@@ -0,0 +1,264 @@
+From e1fd1c9fc08b9e1b8a2f2d958ce591bb8d256b84 Mon Sep 17 00:00:00 2001
+From: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
+Date: Mon, 16 Dec 2019 19:24:15 +0900
+Subject: [PATCH 1/1] ivi-shell: Fix crash due no transmitter screen
+
+Registered the events for the output_created, destroyed,
+resized events.So that the ivi_scrn can be destroyed,
+created dynamically during destroyed and created events.
+And the view properties are dynamically changed during
+resized/moved events.
+
+Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
+---
+ ivi-shell/ivi-layout-private.h | 5 ++
+ ivi-shell/ivi-layout.c | 154 ++++++++++++++++++++++++++++++++++++-----
+ 2 files changed, 140 insertions(+), 19 deletions(-)
+
+diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
+index c054130..8997edd 100644
+--- a/ivi-shell/ivi-layout-private.h
++++ b/ivi-shell/ivi-layout-private.h
+@@ -113,6 +113,11 @@ struct ivi_layout {
+
+ struct ivi_layout_transition_set *transitions;
+ struct wl_list pending_transition_list; /* transition_node::link */
++
++ struct wl_listener output_created;
++ struct wl_listener output_destroyed;
++ struct wl_listener output_resized;
++ struct wl_listener output_moved;
+ };
+
+ struct ivi_layout *get_instance(void);
+diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
+index 2c450f3..1fbfeeb 100644
+--- a/ivi-shell/ivi-layout.c
++++ b/ivi-shell/ivi-layout.c
+@@ -67,7 +67,7 @@
+ #include "ivi-layout-export.h"
+ #include "ivi-layout-private.h"
+ #include "ivi-layout-shell.h"
+-
++#include "plugin-registry.h"
+ #include "shared/helpers.h"
+ #include "shared/os-compatibility.h"
+
+@@ -259,6 +259,87 @@ ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf)
+ free(ivisurf);
+ }
+
++
++static void
++destroy_screen(struct ivi_layout_screen *iviscrn)
++{
++ struct ivi_layout_layer *ivilayer;
++ struct ivi_layout_layer *next;
++
++ /*we need to remove the layers from pending and order lists
++ *otherwise the memory will be corrupted during the
++ *wl_list_remove of pending.link or order.link from
++ *ivi_layout_screen_add_layer() or commit_screen_list()
++ *and on_screen has to be set as NULL otherwise the commit_changes()
++ *API will try to refer the freed iviscrn*/
++ wl_list_for_each_safe(ivilayer, next, &iviscrn->pending.layer_list, pending.link) {
++ wl_list_remove(&ivilayer->pending.link);
++ wl_list_init(&ivilayer->pending.link);
++ ivilayer->on_screen = NULL;
++ }
++
++ wl_list_for_each_safe(ivilayer, next, &iviscrn->order.layer_list, order.link) {
++ wl_list_remove(&ivilayer->order.link);
++ wl_list_init(&ivilayer->order.link);
++ ivilayer->on_screen = NULL;
++ }
++
++ wl_list_init(&iviscrn->pending.layer_list);
++ wl_list_init(&iviscrn->order.layer_list);
++
++ wl_list_remove(&iviscrn->link);
++ free(iviscrn);
++}
++
++static void
++output_destroyed_event(struct wl_listener *listener, void *data)
++{
++ struct ivi_layout *layout =
++ wl_container_of(listener, layout, output_destroyed);
++ struct ivi_layout_screen *iviscrn = NULL;
++ struct ivi_layout_screen *next = NULL;
++ struct weston_output *destroyed_output = (struct weston_output*)data;
++
++ wl_list_for_each_safe(iviscrn, next, &layout->screen_list, link) {
++ if (iviscrn->output == destroyed_output) {
++ destroy_screen(iviscrn);
++ }
++ }
++ ivi_layout_commit_changes();
++}
++
++static void
++add_screen(struct weston_output *output)
++{
++ struct ivi_layout *layout = get_instance();
++ struct ivi_layout_screen *iviscrn = NULL;
++
++ if(!output)
++ return;
++
++ iviscrn = calloc(1, sizeof *iviscrn);
++ if (iviscrn == NULL) {
++ weston_log("fails to allocate memory\n");
++ return;
++ }
++
++ iviscrn->layout = layout;
++ iviscrn->output = output;
++
++ wl_list_init(&iviscrn->pending.layer_list);
++ wl_list_init(&iviscrn->order.layer_list);
++ wl_list_insert(&layout->screen_list, &iviscrn->link);
++}
++
++static void
++output_created_event(struct wl_listener *listener, void *data)
++{
++ struct weston_output *created_output = (struct weston_output*)data;
++
++ add_screen(created_output);
++ ivi_layout_commit_changes();
++}
++
+ /**
+ * Internal API to initialize ivi_screens found from output_list of weston_compositor.
+ * Called by ivi_layout_init_with_compositor.
+@@ -266,27 +347,14 @@ ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf)
+ static void
+ create_screen(struct weston_compositor *ec)
+ {
++
+ struct ivi_layout *layout = get_instance();
+ struct ivi_layout_screen *iviscrn = NULL;
+- struct weston_output *output = NULL;
+-
+- wl_list_for_each(output, &ec->output_list, link) {
+- iviscrn = calloc(1, sizeof *iviscrn);
+- if (iviscrn == NULL) {
+- weston_log("fails to allocate memory\n");
+- continue;
+- }
+
+- iviscrn->layout = layout;
+-
+- iviscrn->output = output;
+-
+- wl_list_init(&iviscrn->pending.layer_list);
+-
+- wl_list_init(&iviscrn->order.layer_list);
++ struct weston_output *output = NULL;
+
+- wl_list_insert(&layout->screen_list, &iviscrn->link);
+- }
++ wl_list_for_each(output, &ec->output_list, link)
++ add_screen(output);
+ }
+
+ /**
+@@ -822,7 +890,18 @@ build_view_list(struct ivi_layout *layout)
+ if (!ivi_view_is_mapped(ivi_view))
+ weston_view_unmap(ivi_view->view);
+ }
++ struct weston_view *view = NULL;
++ struct weston_view *view_next = NULL;
+
++ /* Earlier only the head node was reset, but the remaining links
++ * won't be changed. Due to this, faced crash issue (or sometimes
++ * list was looping) in weston_view_destroy API. So clearing the
++ * entire list*/
++ wl_list_for_each_safe(view, view_next,
++ &layout->layout_layer.view_list.link, layer_link.link) {
++ wl_list_remove(&view->layer_link.link);
++ wl_list_init(&view->layer_link.link);
++ }
+ /* Clear view list of layout ivi_layer */
+ wl_list_init(&layout->layout_layer.view_list.link);
+
+@@ -1791,7 +1870,22 @@ ivi_layout_commit_changes(void)
+
+ return IVI_SUCCEEDED;
+ }
++static void
++output_resized_moved_events(struct wl_listener *listener, void *data)
++{
++ struct ivi_layout_screen *iviscrn = NULL;
++ struct ivi_layout_layer *ivilayer;
++ struct ivi_layout_view *ivi_view;
++ struct weston_output *output = (struct weston_output*)data;
+
++ iviscrn = get_screen_from_output(output);
++
++ wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
++ wl_list_for_each(ivi_view, &ivilayer->order.view_list,
++ order_link)
++ update_prop(ivi_view);
++ }
++}
+ static int32_t
+ ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
+ enum ivi_layout_transition_type type,
+@@ -1931,6 +2025,14 @@ surface_create(struct weston_surface *wl_surface, uint32_t id_surface)
+ return NULL;
+ }
+
++ ivisurf = get_surface(&layout->surface_list, id_surface);
++ if (ivisurf != NULL) {
++ if (ivisurf->surface != NULL) {
++ weston_log("id_surface(%d) is already created\n", id_surface);
++ return NULL;
++ }
++ }
++
+ ivisurf = calloc(1, sizeof *ivisurf);
+ if (ivisurf == NULL) {
+ weston_log("fails to allocate memory\n");
+@@ -1954,6 +2056,8 @@ surface_create(struct weston_surface *wl_surface, uint32_t id_surface)
+
+ wl_list_insert(&layout->surface_list, &ivisurf->link);
+
++ wl_signal_emit(&layout->surface_notification.created, ivisurf);
++
+ return ivisurf;
+ }
+
+@@ -2006,8 +2110,8 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
+ return ivisurf;
+ }
+
+-static struct ivi_layout_interface ivi_layout_interface;
+
++static struct ivi_layout_interface ivi_layout_interface;
+ void
+ ivi_layout_init_with_compositor(struct weston_compositor *ec)
+ {
+@@ -2035,6 +2139,18 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec)
+
+ create_screen(ec);
+
++ layout->output_created.notify = output_created_event;
++ wl_signal_add(&ec->output_created_signal, &layout->output_created);
++
++ layout->output_destroyed.notify = output_destroyed_event;
++ wl_signal_add(&ec->output_destroyed_signal, &layout->output_destroyed);
++
++ layout->output_resized.notify = output_resized_moved_events;
++ wl_signal_add(&ec->output_resized_signal, &layout->output_resized);
++
++ layout->output_moved.notify = output_resized_moved_events;
++ wl_signal_add(&ec->output_moved_signal, &layout->output_moved);
++
+ layout->transitions = ivi_layout_transition_set_create(ec);
+ wl_list_init(&layout->pending_transition_list);
+
+--
+2.7.4
+
diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend
index 44fcdcb0..67442bd6 100644
--- a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend
+++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend
@@ -3,8 +3,8 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI_append = "\
file://0001-Allow-regular-users-to-launch-Weston_2.0.0.patch \
file://use-XDG_RUNTIMESHARE_DIR.patch \
- file://0002-compositor-add-output-type-to-weston_output.patch \
+ file://0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch \
file://0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch \
+ file://0001-config-parser-Export-get_full_path-and-destroy.patch \
"
-
EXTRA_OECONF_append = " --enable-sys-uid"