From 47f0410be104d69c779f9e697b86eac9eb366a12 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 18 May 2023 05:26:35 -0700 Subject: weston-init: Rework weston.ini configuration The main recipe has a different mechanism for customizing weston.ini. Rework our mechanism to follow. Signed-off-by: Tom Hochstein --- recipes-graphics/wayland/weston-init.bbappend | 98 +++++++++++----------- .../wayland/weston-init/imx-nxp-bsp/weston.ini | 10 +-- 2 files changed, 53 insertions(+), 55 deletions(-) (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index a742bb86..fa088b6f 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -8,64 +8,68 @@ REQUIRED_DISTRO_FEATURES:remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" -# To customize weston.ini, start by setting the desired assignment in weston.ini, -# commented in. For example: -# xwayland=true -# Then add the assignment to INI_COMMENT_ASSIGNMENTS. -# -# commented out. For example: -# #xwayland=true -# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. -INI_COMMENT_ASSIGNMENTS:append:imx-mainline-bsp = " \ - xwayland=true \ +PACKAGECONFIG ??= " \ + no-idle-timeout \ + rdp \ + ${PACKAGECONFIG_GBM_FORMAT} \ + ${PACKAGECONFIG_REPAINT_WINDOW} \ + ${PACKAGECONFIG_SIZE} \ + ${PACKAGECONFIG_USE_G2D} \ " -INI_UNCOMMENT_ASSIGNMENTS:append:mx8-nxp-bsp = " \ - repaint-window=16 \ -" -INI_UNCOMMENT_ASSIGNMENTS:append:mx8mq-nxp-bsp = " \ - gbm-format=argb8888 \ - \\[shell\\] \ - size=1920x1080 \ -" +PACKAGECONFIG_GBM_FORMAT ?= "" +PACKAGECONFIG_GBM_FORMAT:mx8mq-nxp-bsp ?= "gbm-format" -# FIXME: The 8QM and 8QXP SoCs have better performance without G2D so don't enable it -# Ideally, this should be seamless and Vivante ought to handle it internally and take the fastest -# rendering code. -INI_UNCOMMENT_USE_G2D ?= "" -INI_UNCOMMENT_USE_G2D:imxgpu2d ?= "use-g2d=1" -INI_UNCOMMENT_USE_G2D:mx8qm-nxp-bsp ?= "" -INI_UNCOMMENT_USE_G2D:mx8qxp-nxp-bsp ?= "" -INI_UNCOMMENT_USE_G2D:mx8dx-nxp-bsp ?= "" -INI_UNCOMMENT_ASSIGNMENTS:append = " \ - ${INI_UNCOMMENT_USE_G2D} \ -" +GBM_FORMAT_VALUE:mx8mq-nxp-bsp = "argb8888" -comment() { - if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then - bbwarn "Commented setting '#$1' not found in file $2" - fi - sed -i -e 's,^'"$1"',#'"$1"',g' $2 -} +PACKAGECONFIG_REPAINT_WINDOW ?= "" +PACKAGECONFIG_REPAINT_WINDOW:mx8-nxp-bsp ?= "repaint-window" +PACKAGECONFIG_REPAINT_WINDOW:mx9-nxp-bsp ?= "repaint-window" -uncomment() { - if ! grep -q "^#$1" $2 && ! grep -q "^$1" $2; then - bbwarn "Commented setting '#$1' not found in file $2" - fi - sed -i -e 's,^#'"$1"','"$1"',g' $2 -} +PACKAGECONFIG_SIZE ?= "" +PACKAGECONFIG_SIZE:mx8mq-nxp-bsp ?= "size" + +SIZE_VALUE:mx8mq-nxp-bsp = "1920x1080" + +PACKAGECONFIG_USE_G2D ?= "" +PACKAGECONFIG_USE_G2D:imxgpu2d ?= "use-g2d" +PACKAGECONFIG_USE_G2D:mx8qm-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx8qxp-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx8dx-nxp-bsp ?= "" + +PACKAGECONFIG[gbm-format] = ",," +PACKAGECONFIG[rdp] = ",," +PACKAGECONFIG[repaint-window] = ",," +PACKAGECONFIG[size] = ",," +PACKAGECONFIG[use-g2d] = ",," do_install:append() { if [ -f "${WORKDIR}/weston.config" ]; then install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston fi - for assignment in ${INI_COMMENT_ASSIGNMENTS}; do - comment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini - done + if [ "${@bb.utils.contains('PACKAGECONFIG', 'gbm-format', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a gbm-format=${GBM_FORMAT_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'rdp', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "s|^command=${bindir}/weston .*|& --rdp-tls-cert=${sysconfdir}/freerdp/keys/server.crt --rdp-tls-key=${sysconfdir}/freerdp/keys/server.key|" ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i -e "/^\[core\]/a modules=screen-share.so" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'repaint-window', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a repaint-window=16" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'size', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[shell\]/a size=${SIZE_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-g2d', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a use-g2d=1" ${D}${sysconfdir}/xdg/weston/weston.ini + else + sed -i -e "/^\[core\]/a #use-g2d=1" ${D}${sysconfdir}/xdg/weston/weston.ini + fi - for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do - uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini - done sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini } diff --git a/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini index 3e298973..63c26415 100644 --- a/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini +++ b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini @@ -1,13 +1,7 @@ [core] -#gbm-format=argb8888 -idle-time=0 -#use-g2d=1 -#repaint-window=16 #enable-overlay-view=1 -modules=screen-share.so -#[shell] -#size=1920x1080 +[shell] [libinput] touchscreen_calibrator=true @@ -27,4 +21,4 @@ touchscreen_calibrator=true #transform=rotate-90 [screen-share] -command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize --rdp-tls-cert=/etc/freerdp/keys/server.crt --rdp-tls-key=/etc/freerdp/keys/server.key +command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize -- cgit v1.2.3-54-g00ecf From fc6497ef28ba3aed379e63e8960e79cfee6d769b Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 18 May 2023 05:27:09 -0700 Subject: weston-init: Adjust use-g2d for weston 11 For the weston 11 fork, the use-g2d option type is changed from an integer to a boolean. Handle both cases. Signed-off-by: Tom Hochstein --- recipes-graphics/wayland/weston-init.bbappend | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index fa088b6f..3a91fbe6 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -37,6 +37,10 @@ PACKAGECONFIG_USE_G2D:mx8qm-nxp-bsp ?= "" PACKAGECONFIG_USE_G2D:mx8qxp-nxp-bsp ?= "" PACKAGECONFIG_USE_G2D:mx8dx-nxp-bsp ?= "" +USE_G2D_VALUE = "true" +USE_G2D_VALUE:mx6-nxp-bsp = "1" +USE_G2D_VALUE:mx7-nxp-bsp = "1" + PACKAGECONFIG[gbm-format] = ",," PACKAGECONFIG[rdp] = ",," PACKAGECONFIG[repaint-window] = ",," @@ -66,9 +70,9 @@ do_install:append() { fi if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-g2d', 'yes', 'no', d)}" = "yes" ]; then - sed -i -e "/^\[core\]/a use-g2d=1" ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i -e "/^\[core\]/a use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini else - sed -i -e "/^\[core\]/a #use-g2d=1" ${D}${sysconfdir}/xdg/weston/weston.ini + sed -i -e "/^\[core\]/a #use-g2d=${USE_G2D_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini fi sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini -- cgit v1.2.3-54-g00ecf From e2e4e0ddcfbea5c5de5a98b2be17c0d443cbf138 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 14:02:36 -0700 Subject: weston-init: Use G2D on i.MX 93 Signed-off-by: Tom Hochstein --- recipes-graphics/wayland/weston-init.bbappend | 1 + 1 file changed, 1 insertion(+) (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 3a91fbe6..171b9230 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -36,6 +36,7 @@ PACKAGECONFIG_USE_G2D:imxgpu2d ?= "use-g2d" PACKAGECONFIG_USE_G2D:mx8qm-nxp-bsp ?= "" PACKAGECONFIG_USE_G2D:mx8qxp-nxp-bsp ?= "" PACKAGECONFIG_USE_G2D:mx8dx-nxp-bsp ?= "" +PACKAGECONFIG_USE_G2D:mx93-nxp-bsp ?= "use-g2d" USE_G2D_VALUE = "true" USE_G2D_VALUE:mx6-nxp-bsp = "1" -- cgit v1.2.3-54-g00ecf From ddd017a990f3c06d6666a8f9224a9e3ea0c337c3 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 13:50:51 -0700 Subject: weston-init: Drop rdp default support Including rdp support is costly since it pulls in `freerdp`, which pulls in `gstreamer`. Don't include it by default. Signed-off-by: Tom Hochstein --- recipes-graphics/wayland/weston-init.bbappend | 1 - 1 file changed, 1 deletion(-) (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 171b9230..69a807a3 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -10,7 +10,6 @@ SRC_URI:append:mx6sl-nxp-bsp = " file://weston.config" PACKAGECONFIG ??= " \ no-idle-timeout \ - rdp \ ${PACKAGECONFIG_GBM_FORMAT} \ ${PACKAGECONFIG_REPAINT_WINDOW} \ ${PACKAGECONFIG_SIZE} \ -- cgit v1.2.3-54-g00ecf From bac5b1e0bbad7ce1ea8ba7d77b2a9eee3fcb618d Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 17 May 2023 13:56:10 -0700 Subject: weston-init: Add disabled start-on-startup to weston.ini Signed-off-by: Tom Hochstein --- recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini | 1 + 1 file changed, 1 insertion(+) (limited to 'recipes-graphics/wayland') diff --git a/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini index 63c26415..19e6ad24 100644 --- a/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini +++ b/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini @@ -22,3 +22,4 @@ touchscreen_calibrator=true [screen-share] command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +#start-on-startup=true -- cgit v1.2.3-54-g00ecf