diff options
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics')
39 files changed, 0 insertions, 1841 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug b/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug deleted file mode 100644 index fee9573b7..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug +++ /dev/null @@ -1,8 +0,0 @@ -#You can select log level of HMI framework -#1 ERROR -#2 WARNING -#3 NOTICE -#4 INFO -#5 DEBUG -#If you want to output debug log about hmi-framework, please uncomment the following. -#USE_HMI_DEBUG=5 diff --git a/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb b/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb deleted file mode 100644 index 27fb60d66..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Configurations for HMI framework" - -SECTION = "HMI" -LICENSE = "Apache-2.0" - -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -SRC_URI = " \ - file://hmi-debug \ -" - -FILES_${PN} = " \ - ${sysconfdir}/afm/unit.env.d \ -" - -do_install() { - install -d ${D}${sysconfdir}/afm/unit.env.d - install -m 644 ${WORKDIR}/hmi-debug ${D}${sysconfdir}/afm/unit.env.d -} diff --git a/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb b/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb deleted file mode 100644 index da511c8a1..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "AGL Home Screen Library" -DESCRIPTION = "libhomescreen" -HOMEPAGE = "http://docs.automotivelinux.org" -LICENSE = "Apache-2.0" -SECTION = "libs" - -BBCLASSEXTEND = " nativesdk" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" - -DEPENDS = "af-binder json-c" - -inherit cmake - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libhomescreen.git;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "0d65d54ba63508c0ef545d02e94d5702f9c8ecb3" -S = "${WORKDIR}/git" - -RDEPENDS_${PN} = "agl-service-homescreen" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf b/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf deleted file mode 100644 index bbd5a80c4..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf +++ /dev/null @@ -1,34 +0,0 @@ -##Generate a weston.ini file: - -To modify any of the default sections (core, shell, ivi-shell), add a -do_configure() function to your bbappend: - -''' -do_configure() { - echo repaint-window=34 >> ${WORKDIR}/core.cfg - - echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg - echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg -} -''' -or: -''' -do_configure() { - sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg -} -''' - -To change the display from the default assumption of an HDMI-1-A connected -screen that needs to be rotated 270 degrees: - -''' -SRC_URI_remove = "file://hdmi-a-1-270.cfg" -SRC_URI += "file://hdmi-a-1-90.cfg" -''' - -To add new sections just list them in SRC_URI: -''' -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://dsi.cfg" -''' diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb b/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb deleted file mode 100644 index b7a672c39..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/agl-compositor_git.bb +++ /dev/null @@ -1,28 +0,0 @@ -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 = "9bb8ea6f6156502bf1639ce349907b391e9b124d" - -PV = "0.0.10+git${SRCPV}" -S = "${WORKDIR}/git" - -PACKAGECONFIG[policy-deny-all] = "-Dpolicy-default=deny-all,," - -inherit meson pkgconfig python3native - -FILES_${PN} = " \ - ${bindir}/agl-compositor \ - ${bindir}/agl-screenshooter \ - ${datadir}/${PN}/protocols/agl-shell.xml \ - ${datadir}/${PN}/protocols/agl-shell-desktop.xml \ - " diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb b/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb deleted file mode 100644 index 89d97f513..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb +++ /dev/null @@ -1,34 +0,0 @@ -DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise" -HOMEPAGE = "https://github.com/waltham/waltham" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://waltham-transmitter/COPYING;md5=f21c9af4de068fb53b83f0b37d262ec3" - -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 = "5287483228fa1e28f3217a54606cfe760c6582bd" - -S = "${WORKDIR}/git/" - -WALTHAM_PIPELINE_TRANSMITTER ?= "waltham-transmitter/waltham-renderer/pipeline_example_general.cfg" -WALTHAM_PIPELINE_RECEIVER ?= "waltham-receiver/receiver_pipeline_example_general.cfg" -WALTHAM_RECIEVER_IP ?= "192.168.1.2" -WALTHAM_RECEIVER_PORT ?= "3440" - -inherit pkgconfig cmake - -do_install_append () { - install -d ${D}/etc/xdg/weston/ - 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/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 - -} - -FILES_${PN} += "/etc/xdg/weston/*.cfg" -FILES_${PN} += "${libdir}/*" -FILES_${PN} += "${bindir}/*" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch deleted file mode 100644 index 32c2df3c4..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 6ecdf10a10929164f3cbdb754ae91d27576e5036 Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Fri, 16 Oct 2020 18:57:38 +0300 -Subject: [PATCH] Use python3 instead of 2 - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - configure.ac | 2 +- - tools/gen.py | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5f65a6b..94b8644 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -32,7 +32,7 @@ AC_SUBST(VERSION_INFO) - # Check for programs - AC_PROG_CC - AC_PROG_CC_STDC --AC_CHECK_PROGS([PYTHON2], [python2 python]) -+AC_CHECK_PROGS([PYTHON3], [python3 python]) - PKG_PROG_PKG_CONFIG() - - AC_ARG_ENABLE(gprof, -diff --git a/tools/gen.py b/tools/gen.py -index 19e8baa..64c5870 100755 ---- a/tools/gen.py -+++ b/tools/gen.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python2 -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - - # Copyright © 2013-2014 Collabora, Ltd. -@@ -562,11 +562,11 @@ try: - opts, args = getopt.getopt(sys.argv[1:], "hp:i:o:t:m:", - ["preamble=", "input=", "output=", "type=", "mode="]) - except getopt.GetoptError: -- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>' -+ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>') - sys.exit(2) - for opt, arg in opts: - if opt == '-h': -- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>' -+ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>') - sys.exit() - elif opt in ("-p", "--preamble"): - preamble_files.append(arg) --- -2.28.0 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch deleted file mode 100644 index 354bcbc15..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch +++ /dev/null @@ -1,55 +0,0 @@ -From cc87dddc2cdc0c20b053e3da1197efd671b4f50c Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Wed, 23 Sep 2020 22:33:50 +0300 -Subject: [PATCH 1/2] waltham: Fix compile build error - -Newer compilers will complain about the fact debug_message is declared -multiple times: - -multiple definition of `debug_message'; -.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -first defined here multiple definition of `debug_message'; -.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -first defined here /usr/bin/ld: -.libs/client-serialice.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -multiple definition of `debug_message'; -.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35: -first defined here - -Bug-AGL: SPEC-3649 - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - src/waltham/marshaller_log.h | 2 +- - src/waltham/waltham-util.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/waltham/marshaller_log.h b/src/waltham/marshaller_log.h -index 8254914..ffa87c1 100644 ---- a/src/waltham/marshaller_log.h -+++ b/src/waltham/marshaller_log.h -@@ -32,7 +32,7 @@ - /* Comment/uncomment to disable/enable debugging log */ - #define DEBUG - //#define PROFILE --int debug_message; -+extern int debug_message; - - #ifdef DEBUG - static inline void DEBUG_STAMP (void) { -diff --git a/src/waltham/waltham-util.c b/src/waltham/waltham-util.c -index 410b114..8f898f8 100644 ---- a/src/waltham/waltham-util.c -+++ b/src/waltham/waltham-util.c -@@ -34,7 +34,7 @@ - #include "waltham-connection.h" - #include "waltham-private.h" - --int debug_message; -+extern int debug_message; - - static void - wth_pfx_print(const char *pfx, const char *fmt, va_list argp) --- -2.28.0 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch deleted file mode 100644 index 5aefb922b..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch +++ /dev/null @@ -1,70 +0,0 @@ -From d30005429fe92daa14151c2a6175d5cf19506cac Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Wed, 7 Oct 2020 16:36:38 +0300 -Subject: [PATCH 2/2] commandxml: Add support wthp_app_id interface - -With it, we hang off the app_id which we can use to pass it to the -receiver side. - -Bug-AGL: SPEC-3601 - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - data/command.xml | 29 +++++++++++++++++++++++++++++ - src/waltham/header-preamble.txt | 1 + - 2 files changed, 30 insertions(+) - -diff --git a/data/command.xml b/data/command.xml -index a03082b..cb53f75 100644 ---- a/data/command.xml -+++ b/data/command.xml -@@ -1814,6 +1814,35 @@ - - </interface> - -+ <interface name="wthp_ivi_app_id" version="1"> -+ <description summary="create ivi-style surfaces"> -+ This interface is exposed as a global singleton. -+ This interface is implemented by servers that provide IVI-style user interfaces. -+ It allows clients to associate an ivi_surface with wthp_surface. -+ </description> -+ -+ <enum name="error"> -+ <entry name="role" value="0" summary="given wthp_surface has another role"/> -+ </enum> -+ -+ <request name="surface_create"> -+ <description summary="create ivi_surface with app_id in ivi compositor"> -+ This request gives the wthp_surface the role of an IVI Surface. Creating more than -+ one ivi_surface for a wthp_surface is not allowed. Note, that this still allows the -+ following example: -+ -+ 1. create a wthp_surface -+ 2. create ivi_surface for the wthp_surface -+ 3. destroy the ivi_surface -+ -+ </description> -+ <arg name="app_id" type="string"/> -+ <arg name="surface" type="object" interface="wthp_surface"/> -+ <arg name="id" type="new_id" interface="wthp_ivi_surface"/> -+ </request> -+ -+ </interface> -+ - <interface name="dummy" version="1"> - <request name="dummy_request"> - </request> -diff --git a/src/waltham/header-preamble.txt b/src/waltham/header-preamble.txt -index df765cc..2409859 100644 ---- a/src/waltham/header-preamble.txt -+++ b/src/waltham/header-preamble.txt -@@ -50,5 +50,6 @@ struct wthp_touch; - - struct wthp_ivi_surface; - struct wthp_ivi_application; -+struct wthp_ivi_app_id; - - struct dummy; --- -2.28.0 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_%.bbappend deleted file mode 100644 index 8d0436a3b..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append = "\ - file://0001-waltham-Fix-compile-build-error.patch \ - file://0002-commandxml-Add-support-wthp_app_id-interface.patch \ - file://0001-Use-python3-instead-of-2.patch \ - " diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb b/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb deleted file mode 100644 index 01023a1f2..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise" -HOMEPAGE = "https://github.com/waltham/waltham" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=e8ad01a5182f2c1b3a2640e9ea268264 \ -" -SRCREV = "1de58c3ff746ddaba7584d760c5454243723d3ca" -SRC_URI = "git://github.com/wmizuno/waltham.git \ - " -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -DEPENDS += "libdrm virtual/kernel wayland" -RDEPENDS_${PN} += "libdrm"
\ No newline at end of file diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch deleted file mode 100644 index 7ea0b6e9b..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 48977cb77410247df547063d9d7bcd381fb13cde Mon Sep 17 00:00:00 2001 -From: Michael Teyfel <mteyfel@de.adit-jv.com> -Date: Fri, 12 Oct 2018 17:12:24 +0200 -Subject: [PATCH 1/3] Added ivi-id-agent to CMake - -Reworked for wayland-ivi-extension 2.2.0 by Scott Murray. - -Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com> -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7d0044a..988fc89 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -40,6 +40,7 @@ add_subdirectory(ivi-layermanagement-api/test) - add_subdirectory(ivi-layermanagement-examples) - add_subdirectory(ivi-layermanagement-api/ilmInput) - add_subdirectory(ivi-input-modules/ivi-input-controller) -+add_subdirectory(ivi-id-agent-modules/ivi-id-agent) - - - #============================================================================================= diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch deleted file mode 100644 index 9f1ab47b7..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch +++ /dev/null @@ -1,21 +0,0 @@ -LayerManagerControl: add error exit status - -Tweak to add a non-zero exit status on errors. This is useful for -scripting, and allows writing a simple loop to detect Weston readiness. - -Upstream-Status: Pending - -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp -index 8ee0546..210e21e 100644 ---- a/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp -+++ b/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp -@@ -45,6 +45,7 @@ int main(int argc, char* argv[]) - if (CommandSuccess != interpreter.interpretCommand(userCommand)) - { - cerr << "Interpreter error: " << interpreter.getLastError() << endl; -+ return 1; - } - - return 0; diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch deleted file mode 100644 index 0fe2abb35..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch +++ /dev/null @@ -1,530 +0,0 @@ -From 42fc715a430068cdb4484e2cb119418da8ac4e6f Mon Sep 17 00:00:00 2001 -From: Michael Teyfel <mteyfel@de.adit-jv.com> -Date: Fri, 12 Oct 2018 16:46:57 +0200 -Subject: [PATCH 2/3] ivi-id-agent: added ivi-id-agent - -This is a reference implementation of an ivi-id-agent plugin. It -creates surface-ids for desktop-surfaces depending on the configuration -provided in "weston.ini". For more please refer to the reference -implementation in this commit. - -The only public interface available is the "id_agent_module_init" -function. It is responsible for initialization of structs and reading -the configuration. - -In the reference "weston.ini" two types of configurations can be found: - -[desktop-app] is used to configure a particular application. Therefore -the desired surface-id must be provided. Moreover "app-title" is the -title that is provided by the desktop application (xdg-protocol). -"app-id" behaves accordingly. Although both parameters can be set, it -is not mandatory. Finally at least one has to be set. - -[desktop-app-default] enables the id-agent to generate generic -surface-ids for unconfigured applications, e.g. for development. This -tag is optional. To generate the id an interval starting from -"default-surface-id" to "default-surface-id-max" is used. The id is -incremented until the interval is exceeded. - -In the function "get_id" a surface-id is assigned by means of the -configuration. It can be adjusted, if another behavior is desired. -In this plugin the parameters, that are described above, are evaluated. - -To use these patches please also apply the dedicated patches for -weston: https://github.com/mtey/weston/tree/xdg_support_ivi_id_agent -Since libweston-desktop is used to introduce desktop-surface support, -xdg-protocol is supported. - -Reworked for wayland-ivi-extension 2.2.0 by Scott Murray. - -Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com> -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt -new file mode 100644 -index 0000000..7354a7e ---- /dev/null -+++ b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt -@@ -0,0 +1,69 @@ -+############################################################################### -+# -+# Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH -+# -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+############################################################################### -+ -+cmake_minimum_required (VERSION 2.6) -+ -+project(ivi-id-agent) -+ -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED) -+pkg_check_modules(WESTON weston>=5.0.0 REQUIRED) -+pkg_check_modules(PIXMAN pixman-1 REQUIRED) -+pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-8 REQUIRED) -+ -+find_package(Threads REQUIRED) -+ -+include_directories( -+ src -+ ${WAYLAND_SERVER_INCLUDE_DIRS} -+ ${WESTON_INCLUDE_DIRS} -+ ${PIXMAN_INCLUDE_DIRS} -+) -+ -+link_directories( -+ ${WAYLAND_SERVER_LIBRARY_DIRS} -+ ${PIXMAN_LIBRARY_DIRS} -+) -+ -+ -+add_library(${PROJECT_NAME} MODULE -+ src/ivi-id-agent.c -+) -+ -+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") -+ -+add_dependencies(${PROJECT_NAME} -+ ${WAYLAND_SERVER_LIBRARIES} -+ ${PIXMAN_LIBRARIES} -+) -+ -+set(LIBS -+ ${LIBS} -+ ${WAYLAND_SERVER_LIBRARIES} -+ ${LIBWESTON_DESKTOP_LIBRARIES} -+) -+ -+set(CMAKE_C_LDFLAGS "-module -avoid-version") -+ -+target_link_libraries(${PROJECT_NAME} ${LIBS}) -+ -+install ( -+ TARGETS ${PROJECT_NAME} -+ LIBRARY DESTINATION lib${LIB_SUFFIX}/weston -+) -diff --git a/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c b/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c -new file mode 100644 -index 0000000..9bc115d ---- /dev/null -+++ b/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c -@@ -0,0 +1,381 @@ -+/* -+ * Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and -+ * its documentation for any purpose is hereby granted without fee, provided -+ * that the above copyright notice appear in all copies and that both that -+ * copyright notice and this permission notice appear in supporting -+ * documentation, and that the name of the copyright holders not be used in -+ * advertising or publicity pertaining to distribution of the software -+ * without specific, written prior permission. The copyright holders make -+ * no representations about the suitability of this software for any -+ * purpose. It is provided "as is" without express or implied warranty. -+ * -+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY -+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER -+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include <stdlib.h> -+#include <stdio.h> -+#include <string.h> -+#include <limits.h> -+ -+#include <weston.h> -+#include <libweston-desktop/libweston-desktop.h> -+#include "libweston/config-parser.h" -+#include <weston/ivi-layout-export.h> -+ -+#ifndef INVALID_ID -+#define INVALID_ID 0xFFFFFFFF -+#endif -+ -+struct db_elem -+{ -+ struct wl_list link; -+ uint32_t surface_id; -+ char *cfg_app_id; -+ char *cfg_title; -+ struct ivi_layout_surface *layout_surface; -+}; -+ -+struct ivi_id_agent -+{ -+ uint32_t default_behavior_set; -+ uint32_t default_surface_id; -+ uint32_t default_surface_id_max; -+ struct wl_list app_list; -+ struct weston_compositor *compositor; -+ const struct ivi_layout_interface *interface; -+ -+ struct wl_listener desktop_surface_configured; -+ struct wl_listener destroy_listener; -+ struct wl_listener surface_removed; -+}; -+ -+static int32_t -+check_config_parameter(char *cfg_val, char *val) -+{ -+ if (cfg_val == NULL) -+ return IVI_SUCCEEDED; -+ else if (val == NULL || strcmp(cfg_val, val) != 0) -+ return IVI_FAILED; -+ -+ return IVI_SUCCEEDED; -+} -+ -+static int32_t -+get_id_from_config(struct ivi_id_agent *ida, struct ivi_layout_surface -+ *layout_surface) { -+ struct db_elem *db_elem; -+ char *temp_app_id = NULL; -+ char *temp_title = NULL; -+ int ret = IVI_FAILED; -+ -+ struct weston_surface *weston_surface = -+ ida->interface->surface_get_weston_surface(layout_surface); -+ -+ /* Get app id and title */ -+ struct weston_desktop_surface *wds = weston_surface_get_desktop_surface( -+ weston_surface); -+ -+ if (weston_desktop_surface_get_app_id(wds) != NULL) -+ temp_app_id = strdup(weston_desktop_surface_get_app_id(wds)); -+ -+ if (weston_desktop_surface_get_title(wds) != NULL) -+ temp_title = strdup(weston_desktop_surface_get_title(wds)); -+ -+ /* -+ * Check for every config parameter to be fulfilled. This part must be -+ * extended, if additional attributes are desired to be checked. -+ */ -+ wl_list_for_each(db_elem, &ida->app_list, link) -+ { -+ if (check_config_parameter(db_elem->cfg_app_id, temp_app_id) == 0) { -+ if (check_config_parameter(db_elem->cfg_title, temp_title) == 0) { -+ /* Found configuration for application. */ -+ int res = ida->interface->surface_set_id(layout_surface, -+ db_elem->surface_id); -+ if (res) -+ continue; -+ -+ db_elem->layout_surface = layout_surface; -+ ret = IVI_SUCCEEDED; -+ -+ break; -+ } -+ } -+ } -+ -+ free(temp_app_id); -+ free(temp_title); -+ -+ return ret; -+} -+ -+/* -+ * This function generates the id of a surface in regard to the desired -+ * parameters. For implementation of different behavior in id generation please -+ * adjust this function. -+ * In this implementation the app_id and/or title of the application is used for -+ * identification. It is also possible to use the pid, uid or gid for example. -+ */ -+static int32_t -+get_id(struct ivi_id_agent *ida, struct ivi_layout_surface *layout_surface) -+{ -+ if (get_id_from_config(ida, layout_surface) == IVI_SUCCEEDED) -+ return IVI_SUCCEEDED; -+ -+ /* No default layer available */ -+ if (ida->default_behavior_set == 0) { -+ weston_log("ivi-id-agent: Could not find configuration for application\n"); -+ goto ivi_failed; -+ -+ /* Default behavior for unknown applications */ -+ } else if (ida->default_surface_id < ida->default_surface_id_max) { -+ weston_log("ivi-id-agent: No configuration for application adding to " -+ "default layer\n"); -+ -+ /* -+ * Check if ivi-shell application already created an application with -+ * desired surface_id -+ */ -+ struct ivi_layout_surface *temp_layout_surf = -+ ida->interface->get_surface_from_id( -+ ida->default_surface_id); -+ if ((temp_layout_surf != NULL) && (temp_layout_surf != layout_surface)) { -+ weston_log("ivi-id-agent: surface_id already used by an ivi-shell " -+ "application\n"); -+ goto ivi_failed; -+ } -+ -+ ida->interface->surface_set_id(layout_surface, -+ ida->default_surface_id); -+ ida->default_surface_id++; -+ -+ } else { -+ weston_log("ivi-id-agent: Interval for default surface_id generation " -+ "exceeded\n"); -+ goto ivi_failed; -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+static void -+desktop_surface_event_configure(struct wl_listener *listener, -+ void *data) -+{ -+ struct ivi_id_agent *ida = wl_container_of(listener, ida, -+ desktop_surface_configured); -+ -+ struct ivi_layout_surface *layout_surface = -+ (struct ivi_layout_surface *) data; -+ -+ if (get_id(ida, layout_surface) == IVI_FAILED) -+ weston_log("ivi-id-agent: Could not create surface_id for application\n"); -+} -+ -+static void -+surface_event_remove(struct wl_listener *listener, void *data) { -+ struct ivi_id_agent *ida = wl_container_of(listener, ida, -+ surface_removed); -+ struct ivi_layout_surface *layout_surface = -+ (struct ivi_layout_surface *) data; -+ struct db_elem *db_elem = NULL; -+ -+ wl_list_for_each(db_elem, &ida->app_list, link) -+ { -+ if(db_elem->layout_surface == layout_surface) { -+ db_elem->layout_surface = NULL; -+ break; -+ } -+ } -+} -+ -+static int32_t deinit(struct ivi_id_agent *ida); -+ -+static void -+id_agent_module_deinit(struct wl_listener *listener, void *data) { -+ (void)data; -+ struct ivi_id_agent *ida = wl_container_of(listener, ida, destroy_listener); -+ -+ deinit(ida); -+} -+ -+static int32_t -+check_config(struct db_elem *curr_db_elem, struct ivi_id_agent *ida) -+{ -+ struct db_elem *db_elem; -+ -+ if (ida->default_surface_id <= curr_db_elem->surface_id -+ && curr_db_elem->surface_id <= ida->default_surface_id_max) { -+ weston_log("ivi-id-agent: surface_id: %d in default id interval " -+ "[%d, %d] (CONFIG ERROR)\n", curr_db_elem->surface_id, -+ ida->default_surface_id, ida->default_surface_id_max); -+ goto ivi_failed; -+ } -+ -+ wl_list_for_each(db_elem, &ida->app_list, link) -+ { -+ if(curr_db_elem == db_elem) -+ continue; -+ -+ if (db_elem->surface_id == curr_db_elem->surface_id) { -+ weston_log("ivi-id-agent: Duplicate surface_id: %d (CONFIG ERROR)\n", -+ curr_db_elem->surface_id); -+ goto ivi_failed; -+ } -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+static int32_t -+read_config(struct ivi_id_agent *ida) -+{ -+ struct weston_config *config = NULL; -+ struct weston_config_section *section = NULL; -+ const char *name = NULL; -+ -+ config = wet_get_config(ida->compositor); -+ if (!config) -+ goto ivi_failed; -+ -+ section = weston_config_get_section(config, "desktop-app-default", NULL, -+ NULL); -+ -+ if (section) { -+ weston_log("ivi-id-agent: Default behavior for unknown applications is " -+ "set\n"); -+ ida->default_behavior_set = 1; -+ -+ weston_config_section_get_uint(section, "default-surface-id", -+ &ida->default_surface_id, INVALID_ID); -+ weston_config_section_get_uint(section, "default-surface-id-max", -+ &ida->default_surface_id_max, INVALID_ID); -+ -+ if (ida->default_surface_id == INVALID_ID || -+ ida->default_surface_id_max == INVALID_ID) { -+ weston_log("ivi-id-agent: Missing configuration for default " -+ "behavior\n"); -+ ida->default_behavior_set = 0; -+ } -+ } else { -+ ida->default_behavior_set = 0; -+ } -+ -+ section = NULL; -+ while (weston_config_next_section(config, §ion, &name)) { -+ struct db_elem *db_elem = NULL; -+ -+ if (strcmp(name, "desktop-app") != 0) -+ continue; -+ -+ db_elem = calloc(1, sizeof *db_elem); -+ if (db_elem == NULL) { -+ weston_log("ivi-id-agent: No memory to allocate\n"); -+ goto ivi_failed; -+ } -+ -+ wl_list_insert(&ida->app_list, &db_elem->link); -+ -+ weston_config_section_get_uint(section, "surface-id", -+ &db_elem->surface_id, INVALID_ID); -+ -+ if (db_elem->surface_id == INVALID_ID) { -+ weston_log("ivi-id-agent: surface-id is not set in configuration\n"); -+ goto ivi_failed; -+ } -+ -+ weston_config_section_get_string(section, "app-id", -+ &db_elem->cfg_app_id, NULL); -+ weston_config_section_get_string(section, "app-title", -+ &db_elem->cfg_title, NULL); -+ -+ if (db_elem->cfg_app_id == NULL && db_elem->cfg_title == NULL) { -+ weston_log("ivi-id-agent: Every parameter is NULL in app " -+ "configuration\n"); -+ goto ivi_failed; -+ } -+ -+ if (check_config(db_elem, ida) == IVI_FAILED) { -+ weston_log("ivi-id-agent: No valid config found, deinit...\n"); -+ goto ivi_failed; -+ } -+ } -+ -+ if(ida->default_behavior_set == 0 && wl_list_empty(&ida->app_list)) { -+ weston_log("ivi-id-agent: No valid config found, deinit...\n"); -+ goto ivi_failed; -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+WL_EXPORT int32_t -+id_agent_module_init(struct weston_compositor *compositor, -+ const struct ivi_layout_interface *interface) -+{ -+ struct ivi_id_agent *ida = NULL; -+ -+ ida = calloc(1, sizeof *ida); -+ if (ida == NULL) { -+ weston_log("failed to allocate ivi_id_agent\n"); -+ goto ivi_failed; -+ } -+ -+ ida->compositor = compositor; -+ ida->interface = interface; -+ ida->desktop_surface_configured.notify = desktop_surface_event_configure; -+ ida->destroy_listener.notify = id_agent_module_deinit; -+ ida->surface_removed.notify = surface_event_remove; -+ -+ wl_signal_add(&compositor->destroy_signal, &ida->destroy_listener); -+ ida->interface->add_listener_configure_desktop_surface( -+ &ida->desktop_surface_configured); -+ interface->add_listener_remove_surface(&ida->surface_removed); -+ -+ wl_list_init(&ida->app_list); -+ if(read_config(ida) != 0) { -+ weston_log("ivi-id-agent: Read config failed\n"); -+ deinit(ida); -+ goto ivi_failed; -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+static int32_t -+deinit(struct ivi_id_agent *ida) -+{ -+ struct db_elem *db_elem; -+ wl_list_for_each(db_elem, &ida->app_list, link) { -+ free(db_elem->cfg_app_id); -+ free(db_elem->cfg_title); -+ free(db_elem); -+ } -+ -+ wl_list_remove(&ida->desktop_surface_configured.link); -+ wl_list_remove(&ida->destroy_listener.link); -+ wl_list_remove(&ida->surface_removed.link); -+ free(ida); -+ -+ return IVI_SUCCEEDED; -+} -diff --git a/ivi-id-agent-modules/ivi-id-agent/weston.ini.in b/ivi-id-agent-modules/ivi-id-agent/weston.ini.in -new file mode 100644 -index 0000000..48a196c ---- /dev/null -+++ b/ivi-id-agent-modules/ivi-id-agent/weston.ini.in -@@ -0,0 +1,20 @@ -+[core] -+shell=ivi-shell.so -+require-input=false -+ -+[ivi-shell] -+ivi-module=ivi-controller.so -+ivi-input-module=ivi-input-controller.so -+ivi-id-agent-module=ivi-id-agent.so -+ -+[desktop-app] -+surface-id=111 -+app-title=Flower -+ -+[desktop-app] -+surface-id=251 -+app-title=Flower -+ -+[desktop-app-default] -+default-surface-id=2000000 -+default-surface-id-max=2001000 diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch deleted file mode 100644 index 8985879b0..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 5fed5c51ca8c1574804362bfdea4930c16457d34 Mon Sep 17 00:00:00 2001 -From: Michael Teyfel <mteyfel@de.adit-jv.com> -Date: Fri, 12 Oct 2018 16:57:24 +0200 -Subject: [PATCH 3/3] ivi-controller: load id-agent module - -Reworked for wayland-ivi-extension 2.2.0 by Scott Murray. - -Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com> -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c -index 8faec2a..8fa51f4 100644 ---- a/weston-ivi-shell/src/ivi-controller.c -+++ b/weston-ivi-shell/src/ivi-controller.c -@@ -2154,6 +2154,41 @@ load_input_module(struct ivishell *shell) - return 0; - } - -+static int load_id_agent_module(struct ivishell *shell) -+{ -+ struct weston_config *config = wet_get_config(shell->compositor); -+ struct weston_config_section *section; -+ char *id_agent_module = NULL; -+ -+ int (*id_agent_module_init)(struct weston_compositor *compositor, -+ const struct ivi_layout_interface *interface); -+ -+ section = weston_config_get_section(config, "ivi-shell", NULL, NULL); -+ -+ if (weston_config_section_get_string(section, "ivi-id-agent-module", -+ &id_agent_module, NULL) < 0) { -+ /* input events are handled by weston's default grabs */ -+ weston_log("ivi-controller: No ivi-id-agent-module set\n"); -+ return 0; -+ } -+ -+ id_agent_module_init = wet_load_module_entrypoint(id_agent_module, "id_agent_module_init"); -+ if (!id_agent_module_init) { -+ free(id_agent_module); -+ return -1; -+ } -+ -+ if (id_agent_module_init(shell->compositor, shell->interface) != 0) { -+ weston_log("ivi-controller: Initialization of id-agent module failed\n"); -+ free(id_agent_module); -+ return -1; -+ } -+ -+ free(id_agent_module); -+ -+ return 0; -+} -+ - static void - launch_client_process(void *data) - { -@@ -2221,6 +2256,10 @@ wet_module_init(struct weston_compositor *compositor, - shell->destroy_listener.notify = ivi_shell_destroy; - wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener); - -+ if (load_id_agent_module(shell) < 0) { -+ weston_log("ivi-controller: id-agent module not loaded\n"); -+ } -+ - if (shell->bkgnd_surface_id && shell->ivi_client_name) { - loop = wl_display_get_event_loop(compositor->wl_display); - wl_event_loop_add_idle(loop, launch_client_process, shell); diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch deleted file mode 100644 index 05d1cc238..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/ivi-layermanagement-api/ilmCommon/include/ilm_types.h b/ivi-layermanagement-api/ilmCommon/include/ilm_types.h -index a88f2b0..12a2017 100644 ---- a/ivi-layermanagement-api/ilmCommon/include/ilm_types.h -+++ b/ivi-layermanagement-api/ilmCommon/include/ilm_types.h -@@ -245,6 +245,7 @@ typedef enum - ILM_NOTIFICATION_CONTENT_AVAILABLE = ILM_BIT(6), - ILM_NOTIFICATION_CONTENT_REMOVED = ILM_BIT(7), - ILM_NOTIFICATION_CONFIGURED = ILM_BIT(8), -+ ILM_NOTIFICATION_FOCUS = ILM_BIT(9), - ILM_NOTIFICATION_ALL = 0xffff - } t_ilm_notification_mask; - -diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c -index a912e50..5166839 100644 ---- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c -+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c -@@ -819,6 +819,12 @@ input_listener_input_focus(void *data, - surf_ctx->prop.focus |= device; - else - surf_ctx->prop.focus &= ~device; -+ -+ if (surf_ctx->notification != NULL) { -+ surf_ctx->notification(surf_ctx->id_surface, -+ &surf_ctx->prop, -+ ILM_NOTIFICATION_FOCUS); -+ } - } - } - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch deleted file mode 100644 index 21028d58a..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch +++ /dev/null @@ -1,22 +0,0 @@ -Disable EGLWLMockNavigation example build - -The EGLWLMockNavigation example code has build issues on TI platforms. -To avoid needing to patch it just for those platforms, just disable -building it since there are no known users inside AGL. - -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/ivi-layermanagement-examples/CMakeLists.txt b/ivi-layermanagement-examples/CMakeLists.txt -index 1eab8e9..48bdffd 100644 ---- a/ivi-layermanagement-examples/CMakeLists.txt -+++ b/ivi-layermanagement-examples/CMakeLists.txt -@@ -24,7 +24,6 @@ project (ivi-layermanagement-examples) - # cmake configuration - #=========================================================================================================== - add_subdirectory(LayerManagerControl) --add_subdirectory(EGLWLMockNavigation) - add_subdirectory(EGLWLInputEventExample) - add_subdirectory(layer-add-surfaces) - add_subdirectory(multi-touch-viewer) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0006-fix-plugin-registry-include.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0006-fix-plugin-registry-include.patch deleted file mode 100644 index dddbfd370..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0006-fix-plugin-registry-include.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c -index a0bfc48..257a1dc 100644 ---- a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c -+++ b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c -@@ -31,7 +31,7 @@ - #include <fcntl.h> - #include <unistd.h> - --#include "plugin-registry.h" -+#include <libweston/plugin-registry.h> - #include "ilm_types.h" - - #include "ivi-input-server-protocol.h" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch deleted file mode 100644 index 86b448be1..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3610fa9..8b4614d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -34,7 +34,7 @@ add_subdirectory(ivi-layermanagement-api/ilmCommon) - add_subdirectory(ivi-layermanagement-api/ilmClient) - add_subdirectory(ivi-layermanagement-api/ilmControl) - add_subdirectory(ivi-layermanagement-api/test) --add_subdirectory(ivi-layermanagement-examples) -+#add_subdirectory(ivi-layermanagement-examples) - - if(WITH_ILM_INPUT) - add_subdirectory(ivi-input-api/ilmInput) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb deleted file mode 100644 index 68fc694a8..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Wayland IVI Extension" -DESCRIPTION = "GENIVI Layer Management API based on Wayland IVI Extension" -HOMEPAGE = "http://projects.genivi.org/wayland-ivi-extension" -BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Extension" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1f1a56bb2dadf5f2be8eb342acf4ed79" - -SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=http \ - file://0001-Added-ivi-id-agent-to-CMake.patch \ - file://0002-ivi-id-agent-added-ivi-id-agent.patch \ - file://0003-ivi-controller-load-id-agent-module.patch \ - file://0002-add-LayerManagerControl-error-status.patch \ - file://0004-ivi-ilmcontrol-added-focus-notification.patch \ - file://0005-disable-EGLWLMockNavigation-example-build.patch \ - file://0006-fix-plugin-registry-include.patch \ -" -SRC_URI_append_wandboard = " file://wandboard_fix_build.patch" -SRCREV = "736fb654ac81230cf4f9e51a5772d3a02d7639bf" - -PV = "2.2.0+git${SRCPV}" -S = "${WORKDIR}/git" - -DEPENDS = "weston virtual/libgles2 pixman wayland-native" - -FILESEXTRAPATHS_prepend := ":${THISDIR}/wayland-ivi-extension:" - -inherit cmake - -EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1" - -FILES_${PN} += "${libdir}/weston/*" -FILES_${PN} += "${datadir}/wayland-protocols/stable/ivi-application/*" - -FILES_${PN}-dbg += "${libdir}/weston/.debug/*" - -EXTRA_OECMAKE += "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch deleted file mode 100644 index d0dcb45af..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9162f7d4cfeec7103474e8703218b3679ca9ed10 Mon Sep 17 00:00:00 2001 -From: Ronan Le Martret <ronan.lemartret@iot.bzh> -Date: Tue, 18 Apr 2017 13:53:26 +0200 -Subject: [PATCH] Change socket mode:add rw for group - -Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> -[Updated for 1.18.0 to remove fuzz] -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - ---- - src/wayland-server.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/wayland-server.c b/src/wayland-server.c -index 3f48dfe..fbccb45 100644 ---- a/src/wayland-server.c -+++ b/src/wayland-server.c -@@ -1528,7 +1528,10 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s) - wl_log("bind() failed with error: %s\n", strerror(errno)); - return -1; - } -- -+ if (chmod(s->addr.sun_path, 0660) < 0) { -+ wl_log("chmod() failed with error: %m\n"); -+ return -1; -+ } - if (listen(s->fd, 128) < 0) { - wl_log("listen() failed with error: %s\n", strerror(errno)); - return -1; diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend deleted file mode 100644 index 9d1822697..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append = "\ - file://0001-Change-socket-mode-add-rw-for-group.patch \ - " diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend deleted file mode 100644 index 374e9aa75..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend +++ /dev/null @@ -1,69 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -inherit agl-graphical - -AGL_DEFAULT_WESTONSTART ??= "/usr/bin/agl-compositor --config ${sysconfdir}/xdg/weston/weston.ini" - -WESTONSTART ??= "${AGL_DEFAULT_WESTONSTART} ${WESTONARGS}" -WESTONSTART_append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/compositor.log", "",d)}" - -WIFILES = " \ - file://weston.conf.in \ - file://tmpfiles.conf.in \ - file://zz-dri.rules.in \ - file://zz-input.rules.in \ - file://zz-tty.rules.in \ -" - -WIFILES_append_imx = " \ - file://zz-dri-imx.rules.in \ -" - -SRC_URI_append = " ${WIFILES}" - -do_install_append() { - # Remove upstream weston.ini to avoid conflict with weston-ini-conf package - rm -f ${D}${sysconfdir}/xdg/weston/weston.ini - - # Remove upstream weston udev rules just to be safe - rm -f ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules - - # Process ".in" files - files=$(echo ${WIFILES} | sed s,file://,,g) - 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,@WESTONSTART@,${WESTONSTART},g" \ - ${WORKDIR}/${f} > ${WORKDIR}/${g} - fi - 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/weston-init.conf - - # Install tmpfiles drop-in - install -d ${D}${libdir}/tmpfiles.d - install -m644 ${WORKDIR}/tmpfiles.conf ${D}${libdir}/tmpfiles.d/weston-init.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/ \ - ${systemd_system_unitdir}/weston@.service.d/ \ -" - -SYSTEMD_AUTO_ENABLE = "enable" - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/tmpfiles.conf.in b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/tmpfiles.conf.in deleted file mode 100644 index c4b302faf..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/tmpfiles.conf.in +++ /dev/null @@ -1,6 +0,0 @@ -# This file is distributed to create weston XDG_RUNTIME_DIR (/run/deamon/@WESTONUSER@) -# -# See tmpfiles.d(5) for details - -d /run/platform/ 0775 root root - -d /run/platform/@WESTONUSER@ 0770 @WESTONUSER@ @WESTONGROUP@ - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.conf.in b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.conf.in deleted file mode 100644 index 9c3df052d..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.conf.in +++ /dev/null @@ -1,12 +0,0 @@ -[Service] -Type=notify -Environment="XDG_RUNTIME_DIR=@XDG_RUNTIME_DIR@" -# Note that clearing PAMName (thus not having PAMName=login) disables -# logind support for the session, which allows setting XDG_RUNTIME_DIR -# to something other than /run/user/% (as is done above). -# Without systemd-logind support, weston needs to be patched to allow -# its direct launcher to work for non-root users in this scenario. -PAMName= -ExecStart= -ExecStart=@WESTONSTART@ -SmackProcessLabel=System::Weston diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in deleted file mode 100644 index 585db6be8..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri-imx.rules.in +++ /dev/null @@ -1,2 +0,0 @@ -SUBSYSTEM=="gpu_class", MODE="0660", GROUP="@WESTONGROUP@", SECLABEL{smack}="*" - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in deleted file mode 100644 index 51c68c303..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-dri.rules.in +++ /dev/null @@ -1 +0,0 @@ -SUBSYSTEM=="drm", MODE="0660", GROUP="@WESTONGROUP@", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston@@WESTONUSER@.service" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules.in b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules.in deleted file mode 100644 index fb3e677f4..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-input.rules.in +++ /dev/null @@ -1 +0,0 @@ -SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston@@WESTONUSER@.service" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in deleted file mode 100644 index e5ce4b553..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/zz-tty.rules.in +++ /dev/null @@ -1 +0,0 @@ -SUBSYSTEM=="tty", KERNEL=="tty7", OWNER="@WESTONUSER@", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston@@WESTONUSER@.service" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready deleted file mode 100644 index c7cba3043..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2018, Konsulko Group -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Simple script to check if Weston+IVI shell is ready by calling -# LayerManagerControl, optionally waiting for a specified timeout. -# - -usage="Usage: weston-ready [-t timeout]" -timeout=0 - -function info() { echo "$@" >&2; } - -if [ $# -eq 2 ]; then - if [ $1 = "-t" ]; then - timeout=$(($2 * 10)) - else - echo $usage - exit 1 - fi -fi - -info "using timeout $timeout" - -time=0 -rc=1 -while true; do - if [ $time -gt $timeout ]; then - info "Timeout reached" - break - elif LayerManagerControl get screens >/dev/null 2>&1; then - info "Weston is now ready" - rc=0 - break - fi - info "waiting..." - if [ $timeout -gt 0 ]; then - usleep 500000 - fi - time=$(($time + 5)) -done -exit $rc diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service deleted file mode 100644 index 82490fef4..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Wait for Weston readiness -Requires=weston@display.service -After=weston@display.service - -[Service] -SupplementaryGroups=display -Environment="XDG_RUNTIME_DIR=/run/platform/display" -ExecStart=/usr/bin/weston-ready -t 10 -Type=oneshot diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb b/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb deleted file mode 100644 index a3d0bb248..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Weston readiness checker" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -inherit systemd - -SRC_URI = "file://weston-ready \ - file://weston-ready.service \ -" - -do_install() { - install -D -m 0755 ${WORKDIR}/weston-ready ${D}${bindir}/weston-ready - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -D -m 0644 ${WORKDIR}/weston-ready.service ${D}${systemd_system_unitdir}/weston-ready.service - fi -} - -SYSTEMD_SERVICE_${PN} = "weston-ready.service" - -RDEPENDS_${PN} += "weston bash" diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_7.0.0.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_7.0.0.patch deleted file mode 100644 index 362f6b064..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_7.0.0.patch +++ /dev/null @@ -1,51 +0,0 @@ -Allow regular users to launch Weston - -Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> -[Reworked for Weston 7.0.0 switch to meson] -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - -diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c -index 9fa329b6..8e218804 100644 ---- a/libweston/launcher-direct.c -+++ b/libweston/launcher-direct.c -@@ -291,8 +291,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor * - { - struct launcher_direct *launcher; - -+#ifndef ENABLE_USER_START - if (geteuid() != 0) - return -EINVAL; -+#endif - - launcher = zalloc(sizeof(*launcher)); - if (launcher == NULL) -diff --git a/libweston/meson.build b/libweston/meson.build -index d8d3fc07..0d39ebf1 100644 ---- a/libweston/meson.build -+++ b/libweston/meson.build -@@ -216,6 +216,10 @@ if get_option('weston-launch') - meson.add_install_script('echo', 'REMINDER: You are installing weston-launch, please make it setuid-root.') - endif - -+if get_option('enable-user-start') -+ config_h.set('ENABLE_USER_START', '1') -+endif -+ - subdir('renderer-gl') - subdir('backend-drm') - subdir('backend-fbdev') -diff --git a/meson_options.txt b/meson_options.txt -index d5bf1d54..c93f31d1 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -217,3 +217,10 @@ option( - value: false, - description: 'Generate documentation' - ) -+ -+option( -+ 'enable-user-start', -+ type: 'boolean', -+ value: true, -+ description: 'Tests: enable start as non-root user' -+) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch deleted file mode 100644 index 32755c4b3..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7e5fb58591a29d60657158262a0772796bfd3461 Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Wed, 12 Feb 2020 13:18:19 +0200 -Subject: [PATCH] libweston: Expose weston_output_damage() in libweston - -We have weston_compositor_damage_all() exported and declared but users -might need weston_output_damage() to refer to an individual output. The -symbol already exported so just declare it. - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - include/libweston/libweston.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h -index 1439775e..9fac5be0 100644 ---- a/include/libweston/libweston.h -+++ b/include/libweston/libweston.h -@@ -1604,6 +1604,8 @@ weston_compositor_schedule_repaint(struct weston_compositor *compositor); - void - weston_compositor_damage_all(struct weston_compositor *compositor); - void -+weston_output_damage(struct weston_output *woutput); -+void - weston_compositor_wake(struct weston_compositor *compositor); - void - weston_compositor_sleep(struct weston_compositor *compositor); --- -2.20.1 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch deleted file mode 100644 index 05ce7de30..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch +++ /dev/null @@ -1,264 +0,0 @@ -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 <libweston/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-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch deleted file mode 100644 index 388e430d8..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 2cb25adac6b968104bbfb276c684506607dfbff4 Mon Sep 17 00:00:00 2001 -From: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> -Date: Wed, 7 Aug 2019 21:05:11 +0900 -Subject: [PATCH 1/1] compositor-drm: introduce drm_get_dmafd_from_view - -This API enables to get dmafd from weston_view - -Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com> ---- - libweston/compositor-drm.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++ - libweston/compositor-drm.h | 7 ++++++ - 2 files changed, 66 insertions(+) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index b83459a..98ad85c 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -5848,6 +5848,64 @@ drm_output_set_seat(struct weston_output *base, - seat ? seat : ""); - } - -+ static int -+drm_get_dma_fd_from_view(struct weston_output *base, -+ struct weston_view *ev, int *buf_stride) -+{ -+ struct drm_backend *b = to_drm_backend(base->compositor); -+ struct weston_buffer *buffer = ev->surface->buffer_ref.buffer; -+ struct gbm_bo *bo; -+ struct drm_fb *current; -+ struct linux_dmabuf_buffer *dmabuf; -+ bool is_opaque = weston_view_is_opaque(ev,&ev->transform.boundingbox); -+ uint32_t format; -+ int fd, ret; -+ -+ if(!buffer) { -+ weston_log("buffer is NULL\n"); -+ return -1; -+ } -+ -+ if(dmabuf = linux_dmabuf_buffer_get(buffer->resource)) { -+ current = drm_fb_get_from_dmabuf(dmabuf, b, is_opaque); -+ if (!current) -+ { -+ fprintf(stderr, "failed to get drm_fb from dmabuf\n"); -+ return -1; -+ } -+ *buf_stride=current->strides[0]; -+ } -+ else if(ev->surface->buffer_ref.buffer->legacy_buffer) { -+ bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_WL_BUFFER, -+ buffer->resource, GBM_BO_USE_SCANOUT); -+ if (!bo) { -+ weston_log("failed to get gbm_bo\n"); -+ return -1; -+ } -+ current = drm_fb_get_from_bo(bo, b, is_opaque, BUFFER_CLIENT); -+ -+ if (!current) { -+ weston_log("failed to get drm_fb from bo\n"); -+ return -1; -+ } -+ *buf_stride=current->strides[0]; -+ } -+ else { -+ weston_log("Buffer is not supported\n"); -+ return -1; -+ } -+ -+ ret = drmPrimeHandleToFD(b->drm.fd, current->handles[0], -+ DRM_CLOEXEC, &fd); -+ free(current); -+ if (ret) { -+ weston_log("failed to create prime fd for front buffer\n"); -+ return -1; -+ } -+ -+ return fd; -+} -+ - static int - drm_output_init_gamma_size(struct drm_output *output) - { -@@ -7396,6 +7454,7 @@ static const struct weston_drm_output_api api = { - drm_output_set_mode, - drm_output_set_gbm_format, - drm_output_set_seat, -+ drm_get_dma_fd_from_view - }; - - static const struct weston_drm_virtual_output_api virt_api = { -diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h -index 71a306f..a9379e4 100644 ---- a/libweston/compositor-drm.h -+++ b/libweston/compositor-drm.h -@@ -78,6 +78,13 @@ struct weston_drm_output_api { - */ - void (*set_seat)(struct weston_output *output, - const char *seat); -+ -+ /** Get the dma fd from drm view. -+ * -+ * The dma fd is got from weston_view. -+ * Returns fd on success, -1 on failure. -+ */ -+ int (*get_dma_fd_from_view)(struct weston_output *output, struct weston_view *view, int *buf_stride); - }; - - static inline const struct weston_drm_output_api * --- -2.7.4 - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch deleted file mode 100644 index 61772182c..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0a0103f20437d9ed63b6cec500027a6d7bf6185f Mon Sep 17 00:00:00 2001 -From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> -Date: Mon, 20 May 2019 18:31:32 +0900 -Subject: [PATCH] main: change remoting initialization timing - -Upstream-Status: Pending[1] - -[1]: https://gitlab.freedesktop.org/wayland/weston/issues/246 - -Signed-off-by: Tomohito Esaki <etom@igel.co.jp> -Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> -[Updated for Weston 8.0.0] -Signed-off-by: Scott Murray <scott.murray@konsulko.com> - ---- -diff --git a/compositor/main.c b/compositor/main.c -index 8eb8a47..22686b0 100644 ---- a/compositor/main.c -+++ b/compositor/main.c -@@ -2518,9 +2518,6 @@ load_drm_backend(struct weston_compositor *c, - ret = weston_compositor_load_backend(c, WESTON_BACKEND_DRM, - &config.base); - -- /* remoting */ -- load_remoting(c, wc); -- - /* pipewire */ - load_pipewire(c, wc); - -@@ -3278,6 +3275,10 @@ wet_main(int argc, char *argv[]) - if (wet.init_failed) - goto out; - -+ /* remoting: only support on drm-backend */ -+ if (strstr(backend, "drm-backend.so")) -+ load_remoting(wet.compositor, config); -+ - if (idle_time < 0) - weston_config_section_get_int(section, "idle-time", &idle_time, -1); - if (idle_time < 0) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/smack-weston b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/smack-weston deleted file mode 100644 index 63a32405a..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/smack-weston +++ /dev/null @@ -1,8 +0,0 @@ -System System::Weston rwxa-- -System::Weston System rwx--- -System::Weston System::Shared rwx--- -System::Weston System::Run rwxat- -System::Weston System::Log rwxa-- -System::Weston _ r-x--l -System::Weston User::Home r-x--l -System::Weston User::App-Shared rwxat- diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend deleted file mode 100644 index bada11c3f..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend +++ /dev/null @@ -1,30 +0,0 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" - -# NOTE: -# file://0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch -# has been removed until someone more familiar with weston internals -# and waltham can take a look and update it. -SRC_URI_append = "\ - file://0001-Allow-regular-users-to-launch-Weston_7.0.0.patch \ - file://0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch \ - file://0001-libweston-Expose-weston_output_damage-in-libweston.patch \ - file://0004-main-change-remoting-initialization-timing.patch \ - file://smack-weston \ - " - -EXTRA_OEMESON_append = " -Denable-user-start=true" - -# Workaround for incorrect upstream definition -PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" -PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}" - -do_install_append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'smack', 'true', 'false', d)}; then - # Install SMACK rules - install -D -m 0644 ${WORKDIR}/smack-weston ${D}${sysconfdir}/smack/accesses.d/weston - fi -} - -FILES_${PN} += "\ - ${sysconfdir}/smack/accesses.d/* \ -" |