All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup
@ 2023-05-24 18:11 rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 1/7] weston-init: drop all the old append logic rs
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

Running Weston as root is generally a bad idea and currently breaks
interactions with the dbus interface and a handful of applications with
this newer version of Weston. Let's roll everything back to using the
standard weston-init package with some appends for those users running
touchscreens.

This also cleans up a lot of lingering patches from dunfell for Weston
which are no longer applicable.

Randolph Sapp (7):
  weston-init: drop all the old append logic
  weston: drop Fix-touch-screen-crash patch
  weston: drop allow-visual_id-to-be-0 patch
  weston: add notice about select-plane patch
  weston: add weston user to the render group
  weston: drop the fix-virtual-keyboard-display-issue patch
  weston-init: add a simple touchscreen calibration check

 .../wayland/weston-init.bbappend              |  15 +-
 .../recipes-graphics/wayland/weston-init/init | 129 ------------------
 .../wayland/weston-init/runWeston             |  39 ------
 .../wayland/weston-init/ti43x/weston.ini      |  16 ---
 .../wayland/weston-init/wayland_env.sh        |  12 --
 .../weston-init/weston-launch-calibrator.sh   |  13 ++
 .../wayland/weston-init/weston.ini            |   8 ++
 .../0002-weston-Allow-visual_id-to-be-0.patch |  34 -----
 ...al-keyboard-display-issue-for-QT5-ap.patch |  41 ------
 ...-weston-Fix-touch-screen-crash-issue.patch |  39 ------
 .../wayland/weston_10.0.2.bbappend            |  13 +-
 11 files changed, 34 insertions(+), 325 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/init
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/runWeston
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston/0002-weston-Allow-visual_id-to-be-0.patch
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston/0004-weston-Fix-touch-screen-crash-issue.patch

-- 
2.40.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 1/7] weston-init: drop all the old append logic
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
@ 2023-05-24 18:11 ` rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 2/7] weston: drop Fix-touch-screen-crash patch rs
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

First step in non-root weston.

Drop the following files:
	- weston-init/init
	- weston-init/runWeston
	- weston-init/ti43x/weston.ini
	- weston-init/wayland_env.sh

We previously had some append logic to remove the systemd-service
because people were only updating the sysVinit script, and the sysVinit
script was updated to include touch screen calibration logic. Now we can
drop this as weston now has it's own calibration routine per user.

In addition to this, this append file also introduced a runWeston
wrapper and a wayland_env script to setup environment variables for the
root user weston instance, all of which is now unnecessary as root
weston is generally not a good idea.

This append now only serves to offer a new weston.ini file to the
existing weston-init package with the hooks for libinput to create and
apply touchscreen calibrations for individual users.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../wayland/weston-init.bbappend              |  22 +--
 .../recipes-graphics/wayland/weston-init/init | 129 ------------------
 .../wayland/weston-init/runWeston             |  39 ------
 .../wayland/weston-init/ti43x/weston.ini      |  16 ---
 .../wayland/weston-init/wayland_env.sh        |  12 --
 .../wayland/weston-init/weston.ini            |   4 +
 6 files changed, 7 insertions(+), 215 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/init
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/runWeston
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
index 28e7ae39..a73b669d 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
@@ -2,22 +2,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PR:append = ".arago12"
 
-SRC_URI:append = " \
-    file://runWeston \
-    file://wayland_env.sh \
-    file://weston.ini \
-"
-
-do_install:append() {
-    install -d ${D}${bindir}
-    install -m 755 ${WORKDIR}/runWeston ${D}${bindir}
-    rm -rf ${D}${systemd_system_unitdir}
-
-    install -d ${D}${sysconfdir}/profile.d
-    install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}
-    install -m 0644 ${WORKDIR}/wayland_env.sh ${D}${sysconfdir}/profile.d/
-}
-
-FILES:${PN}:remove = "${systemd_system_unitdir}/weston.service ${systemd_system_unitdir}/weston.socket"
-FILES:${PN} += "${sysconfdir}/profile.d/* ${sysconfdir}/weston.ini"
-SYSTEMD_SERVICE:${PN}:remove = "weston.service weston.socket"
+#SRC_URI:append = " \
+#    file://weston.ini \
+#"
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/init b/meta-arago-distro/recipes-graphics/wayland/weston-init/init
deleted file mode 100644
index fa3f0372..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/init
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/sh
-#
-### BEGIN INIT INFO
-# Provides: weston
-# Required-Start: $local_fs $remote_fs
-# Required-Stop: $local_fs $remote_fs
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-### END INIT INFO
-
-killproc() {
-	all_pids=`/bin/pidof $1`
-
-	# busybox pidof doesn't ommit the current pid
-	# as this script is called weston on the target
-	# in thinlinux with a busybox based utility load
-	# later killproc operations end up killing this
-	# script.
-	for pid in $all_pids
-	do
-		if [ "$pid" != "$$" ]; then
-			kill_pids+=$pid
-		fi
-	done
-
-	[ "$kill_pids" != "" ] && kill $kill_pids
-}
-
-read CMDLINE < /proc/cmdline
-for x in $CMDLINE; do
-        case $x in
-        weston=false)
-		echo "Weston disabled"
-		exit 0;
-                ;;
-        esac
-done
-
-case "$1" in
-  start)
-        . /etc/profile
-
-        # Weston for some reason dies if these environment variables are set
-        unset WAYLAND_DISPLAY
-
-        # This is all a nasty hack
-        if test -z "$XDG_RUNTIME_DIR"; then
-            export XDG_RUNTIME_DIR=/run/user/root
-        fi
-
-        if [ ! -d "$XDG_RUNTIME_DIR" ] ; then
-            mkdir --parents $XDG_RUNTIME_DIR
-            chmod 0700 $XDG_RUNTIME_DIR
-        fi
-
-        echo "Starting Weston"
-
-        if [ ! -d "/dev/input" ]; then
-            echo "Waiting for input device..."
-            killproc weston
-            sleep 3
-        fi
-
-        openvt -c 4 -f runWeston
-
-        # If there's no touchscreen device available, done
-        if [ ! -e /dev/input/touchscreen0 ] ; then
-            exit 0
-        fi
-
-        # If it was already calibrated, done
-        if [ -f "$WS_CALUDEV_FILE" ] ; then
-            exit 0
-        fi
-
-        # Check if SD card is mounted
-        mount | grep /run/media/mmcblk0p1 | grep vfat > /dev/null 2>&1
-        if [ "$?" = "0" ] ; then
-            SD_MOUNTED="1"
-        else
-            SD_MOUNTED="0"
-        fi
-
-        # Check if SD card has a calibration rules file
-        SD_CALUDEV_FILE=/run/media/mmcblk0p1/ws-calibrate.rules
-        if [ "$SD_MOUNTED" = "1" -a -f "$SD_CALUDEV_FILE" ] ; then
-            # Copy it over to udev location
-            cp "$SD_CALUDEV_FILE" "$WS_CALUDEV_FILE"
-        else
-            # Run a calibration app and save output to udev rules
-            echo    "Calibrating touchscreen (first time only)"
-            echo
-            echo    "*** To continue, please complete the touchscreen calibration"
-            echo -n "*** by touching the crosshairs on the LCD screen"
-            sleep 2
-            CAL_VALUES=`weston-calibrator|cut -c21-`
-            echo 'SUBSYSTEM=="input", ENV{WL_CALIBRATION}="'$CAL_VALUES'"' > $WS_CALUDEV_FILE
-            echo "."
-            # Copy it back to SD
-            if [ "$SD_MOUNTED" = "1" ] ; then
-                cp "$WS_CALUDEV_FILE" "$SD_CALUDEV_FILE"
-            fi
-        fi
-
-        # Reload and re-run udev rules and restart weston
-        udevadm control --reload
-        udevadm trigger
-        killproc weston
-        sleep 2
-        openvt -c 4 -f runWeston
-  ;;
-
-  stop)
-        echo "Stopping Weston"
-        killproc weston
-  ;;
-
-  restart)
-	$0 stop
-        sleep 2
-        $0 start
-  ;;
-
-  *)
-        echo "usage: $0 { start | stop | restart }"
-  ;;
-esac
-
-exit 0
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/runWeston b/meta-arago-distro/recipes-graphics/wayland/weston-init/runWeston
deleted file mode 100644
index aed5d5f9..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/runWeston
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-clear
-cat << EOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-                                        Please wait...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-EOF
-
-weston --idle-time=0 >> /var/log/weston.log 2>&1
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini
deleted file mode 100644
index 8a9dd998..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/ti43x/weston.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-[core]
-require-input=false
-
-[shell]
-locking=false
-animation=zoom
-panel-position=top
-startup-animation=fade
-
-[screensaver]
-# Uncomment path to disable screensaver
-#path=@libexecdir@/weston-screensaver
-
-[output]
-name=HDMI-A-1
-mode=1024x768
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh b/meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh
deleted file mode 100644
index 50979b30..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/wayland_env.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-### Wayland Environment Variables ###
-
-export XDG_CONFIG_HOME=/etc/
-export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
-export WS_CALUDEV_FILE=/etc/udev/rules.d/ws-calibrate.rules
-
-if ! test -d "${XDG_RUNTIME_DIR}"; then
-       mkdir -p "${XDG_RUNTIME_DIR}"
-       chmod 0700 "${XDG_RUNTIME_DIR}"
-fi
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
index c0ae9f92..4cc2683a 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
@@ -1,4 +1,5 @@
 [core]
+idle-time=0
 require-input=false
 
 [shell]
@@ -7,6 +8,9 @@ animation=zoom
 panel-position=top
 startup-animation=fade
 
+[libinput]
+touchscreen_calibrator=true
+
 [screensaver]
 # Uncomment path to disable screensaver
 #path=@libexecdir@/weston-screensaver
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 2/7] weston: drop Fix-touch-screen-crash patch
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 1/7] weston-init: drop all the old append logic rs
@ 2023-05-24 18:11 ` rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 3/7] weston: drop allow-visual_id-to-be-0 patch rs
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

Drop the fix touchscreen crash patch as this is for an older version of
weston and it seems like they completely reworked the way the handle
touch events, adding checks for out of bounds events and extra handling
for NULL window focus events.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 ...-weston-Fix-touch-screen-crash-issue.patch | 39 -------------------
 .../wayland/weston_10.0.2.bbappend            |  1 -
 2 files changed, 40 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston/0004-weston-Fix-touch-screen-crash-issue.patch

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston/0004-weston-Fix-touch-screen-crash-issue.patch b/meta-arago-distro/recipes-graphics/wayland/weston/0004-weston-Fix-touch-screen-crash-issue.patch
deleted file mode 100644
index 4849d5b6..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston/0004-weston-Fix-touch-screen-crash-issue.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 60250e9dc57fe56148c8a24bba107bce8a873fb4 Mon Sep 17 00:00:00 2001
-From: Karthik Ramanan <a0393906@ti.com>
-Date: Mon, 12 Mar 2018 10:56:28 +0530
-Subject: [PATCH 4/4] weston: Fix touch screen crash issue
-
-Touch screen operation causes the weston to crash with segment fault sometimes.
-The crash occurs when the coordinate (x,y) passed to the weston input module
-is outside the view window, hence the weston compositor is not able to pick
-up a display view and there is no code to detect this condition at function
-notify_touch().
-
-Upstream status: pending
-
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
-Signed-off-by: Karthik Ramanan <a0393906@ti.com>
----
- libweston/input.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libweston/input.c b/libweston/input.c
-index 4fedc55..bcb2f28 100644
---- a/libweston/input.c
-+++ b/libweston/input.c
-@@ -2185,6 +2185,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id,
- 		 * until all touch points are up again. */
- 		if (touch->num_tp == 1) {
- 			ev = weston_compositor_pick_view(ec, x, y, &sx, &sy);
-+			if (!ev)
-+			{
-+				weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n",
-+							wl_fixed_to_int(x), wl_fixed_to_int(y));
-+				return;
-+			}
- 			weston_touch_set_focus(touch, ev);
- 		} else if (!touch->focus) {
- 			/* Unexpected condition: We have non-initial touch but
--- 
-1.9.1
-
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
index b1b7d26a..16ed6e67 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
@@ -5,7 +5,6 @@ PR:append = ".arago1"
 #        file://0002-weston-Allow-visual_id-to-be-0.patch
 SRC_URI += " \
         file://0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \
-        file://0004-weston-Fix-touch-screen-crash-issue.patch \
         file://0001-backend-drm-Select-plane-based-on-current-attached-C.patch \
         file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
 "
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 3/7] weston: drop allow-visual_id-to-be-0 patch
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 1/7] weston-init: drop all the old append logic rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 2/7] weston: drop Fix-touch-screen-crash patch rs
@ 2023-05-24 18:11 ` rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 4/7] weston: add notice about select-plane patch rs
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

Weston 10 now checks to see if eglGetConfigAttrib returns anything
before handling the actual EGL_NATIVE_VISUAL_ID value.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../0002-weston-Allow-visual_id-to-be-0.patch | 34 -------------------
 .../wayland/weston_10.0.2.bbappend            |  1 -
 2 files changed, 35 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston/0002-weston-Allow-visual_id-to-be-0.patch

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston/0002-weston-Allow-visual_id-to-be-0.patch b/meta-arago-distro/recipes-graphics/wayland/weston/0002-weston-Allow-visual_id-to-be-0.patch
deleted file mode 100644
index a354d947..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston/0002-weston-Allow-visual_id-to-be-0.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 5695eab02bb88318bf99d568b6d0e4592d5f9981 Mon Sep 17 00:00:00 2001
-From: Karthik Ramanan <a0393906@ti.com>
-Date: Mon, 12 Mar 2018 10:47:02 +0530
-Subject: [PATCH 2/4] weston: Allow visual_id to be 0
-
-The inquiry of visual id from egl API eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID)
-is an optional feature. The visual id will be set to 0 if this feature is
-not supported. Therefore, the return condition @function match_config_to_visual()
-should be (id == visual_id || id == 0) instead of (id == visual_id)
-
-Upstream status: Pending
-
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
-Signed-off-by: Karthik Ramanan <a0393906@ti.com>
----
- libweston/gl-renderer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
-index c6091af..9299dc6 100644
---- a/libweston/gl-renderer.c
-+++ b/libweston/gl-renderer.c
-@@ -2575,7 +2575,7 @@ match_config_to_visual(EGLDisplay egl_display,
- 				&id))
- 			continue;
- 
--		if (id == visual_id)
-+		if (id == visual_id || id == 0)
- 			return i;
- 	}
- 
--- 
-1.9.1
-
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
index 16ed6e67..dd67eec1 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
@@ -2,7 +2,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PR:append = ".arago1"
 
-#        file://0002-weston-Allow-visual_id-to-be-0.patch
 SRC_URI += " \
         file://0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \
         file://0001-backend-drm-Select-plane-based-on-current-attached-C.patch \
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 4/7] weston: add notice about select-plane patch
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
                   ` (2 preceding siblings ...)
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 3/7] weston: drop allow-visual_id-to-be-0 patch rs
@ 2023-05-24 18:11 ` rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 5/7] weston: add weston user to the render group rs
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

The select-plane patch has been accepted upstream as commit
94afcbcdc3f1b1cfc050da242c9c70009b007fc6. Add a notice to remind users
to remove that patch when we get there.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../recipes-graphics/wayland/weston_10.0.2.bbappend          | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
index dd67eec1..989bc28c 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
@@ -2,8 +2,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PR:append = ".arago1"
 
+# Drop 0001-backend-drm-Select-plane-based-on-current-attached-C.patch once we
+# get past version 11.0.1 or commit 94afcbcdc3f1b1cfc050da242c9c70009b007fc6
+# upstream
+
 SRC_URI += " \
         file://0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \
         file://0001-backend-drm-Select-plane-based-on-current-attached-C.patch \
         file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
 "
+
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 5/7] weston: add weston user to the render group
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
                   ` (3 preceding siblings ...)
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 4/7] weston: add notice about select-plane patch rs
@ 2023-05-24 18:11 ` rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 6/7] weston: drop the fix-virtual-keyboard-display-issue patch rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 7/7] weston-init: add a simple touchscreen calibration check rs
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

The weston user must be added to the render group to use dri render
devices.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../recipes-graphics/wayland/weston_10.0.2.bbappend          | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
index 989bc28c..edc1bebd 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
@@ -12,3 +12,8 @@ SRC_URI += " \
         file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
 "
 
+# required for weston user to interact with the render devices
+inherit extrausers
+EXTRA_USERS_PARAMS = " \
+	usermod -aG render weston; \
+"
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 6/7] weston: drop the fix-virtual-keyboard-display-issue patch
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
                   ` (4 preceding siblings ...)
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 5/7] weston: add weston user to the render group rs
@ 2023-05-24 18:11 ` rs
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 7/7] weston-init: add a simple touchscreen calibration check rs
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

Weston 10 changed the way it handles focus grabbing. This shouldn't be
relevant anymore.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 ...al-keyboard-display-issue-for-QT5-ap.patch | 41 -------------------
 .../wayland/weston_10.0.2.bbappend            |  1 -
 2 files changed, 42 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/wayland/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch b/meta-arago-distro/recipes-graphics/wayland/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch
deleted file mode 100644
index 32901db9..00000000
--- a/meta-arago-distro/recipes-graphics/wayland/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8034bc1862bbebb332e91917c6458ef8efb5b54e Mon Sep 17 00:00:00 2001
-From: Eric Ruei <e-ruei1@ti.com>
-Date: Fri, 8 Mar 2019 18:49:07 -0500
-Subject: [PATCH] weston: Fix virtual keyboard display issue for QT5 
- application
-
-The virtual keyboard does pop up as expected, however, it will never hide
-even when the application is terminated. This problem is due to the order
-of the text APIs( text_input_activate and test_input_show_input_panel) are
-invoked in QT5 and a potential bug of the API implementation. The virtual
-keyboard works as expected if the test_input_show_input_panel() is invoked
-prior to the test_input_activate() as most of the weston sample applications
-do. However, the problem will show up if that order is reversed and the reason
-why is that the current_panel is not set in this case and hence this panel
-cannot be hidden.
-
-It is required to set the current_panel to the text_input when the input_panel
-becomes visible at the first time.
-
-Upstream status: Pending
-
-Signed-off-by: Eric Ruei <e-ruei1@ti.com>
----
- compositor/text-backend.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/compositor/text-backend.c b/compositor/text-backend.c
-index 664c36f..b610dfb 100644
---- a/compositor/text-backend.c
-+++ b/compositor/text-backend.c
-@@ -349,6 +349,7 @@ text_input_show_input_panel(struct wl_client *client,
- 			       text_input->surface);
- 		wl_signal_emit(&ec->update_input_panel_signal,
- 			       &text_input->cursor_rectangle);
-+		text_input->manager->current_text_input = text_input;
- 	}
- }
- 
--- 
-1.9.1
-
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
index edc1bebd..698ff03e 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston_10.0.2.bbappend
@@ -7,7 +7,6 @@ PR:append = ".arago1"
 # upstream
 
 SRC_URI += " \
-        file://0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \
         file://0001-backend-drm-Select-plane-based-on-current-attached-C.patch \
         file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
 "
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [arago][kirkstone][PATCH 7/7] weston-init: add a simple touchscreen calibration check
  2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
                   ` (5 preceding siblings ...)
  2023-05-24 18:11 ` [arago][kirkstone][PATCH 6/7] weston: drop the fix-virtual-keyboard-display-issue patch rs
@ 2023-05-24 18:11 ` rs
  6 siblings, 0 replies; 8+ messages in thread
From: rs @ 2023-05-24 18:11 UTC (permalink / raw
  To: reatmon, denis, afd, detheridge; +Cc: meta-arago, Randolph Sapp

From: Randolph Sapp <rs@ti.com>

The old touchscreen calibration script created a generic UDEV rule for
all touch devices that applied the LIBINPUT_CALIBRATION_MATRIX of the
last calibrated display. This attempts to replace that to an extent.

This script executes at the start of Weston and if it detects a touch
input device, uses Weston's built in touchscreen calibrator and
touchscreen calibrator interface to apply the current calibration
without restarting Weston. This script does not attempt to make these
calibration values persistent.

If a user wants calibration values to persist for all Weston users they
should add the calibration to /etc/default/weston using the
LIBINPUT_CALIBRATION_MATRIX variable themselves. The script will bypass
calibration if it detects this variable is already set.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../recipes-graphics/wayland/weston-init.bbappend   | 13 ++++++++++---
 .../wayland/weston-init/weston-launch-calibrator.sh | 13 +++++++++++++
 .../recipes-graphics/wayland/weston-init/weston.ini |  4 ++++
 3 files changed, 27 insertions(+), 3 deletions(-)
 create mode 100644 meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
index a73b669d..4d5db58c 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
@@ -2,6 +2,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 PR:append = ".arago12"
 
-#SRC_URI:append = " \
-#    file://weston.ini \
-#"
+SRC_URI:append = " \
+    file://weston.ini \
+    file://weston-launch-calibrator.sh \
+"
+
+do_install:append() {
+    install -Dm755 weston-launch-calibrator.sh ${D}/${bindir}/weston-launch-calibrator
+}
+
+FILES:${PN}:append = "${bindir}/weston-launch-calibrator"
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh
new file mode 100644
index 00000000..45863ecd
--- /dev/null
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston-launch-calibrator.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ -e /dev/input/touchscreen0 ]; then
+	echo "Touch screen detected..."
+	if [ -n "$LIBINPUT_CALIBRATION_MATRIX" ]; then
+		echo "Calibration matrix already present, skipping calibration..."
+	else
+		echo "Calibrating touchscreen..."
+		exec weston-calibrator
+	fi
+else
+	echo "Touch screen not detected, skipping calibration..."
+fi
diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
index 4cc2683a..b9610fa8 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/weston.ini
@@ -11,6 +11,10 @@ startup-animation=fade
 [libinput]
 touchscreen_calibrator=true
 
+[autolaunch]
+# launch the calibrator on startup if a touchscreen is detected
+path=/usr/bin/weston-launch-calibrator
+
 [screensaver]
 # Uncomment path to disable screensaver
 #path=@libexecdir@/weston-screensaver
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-24 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24 18:11 [arago][kirkstone][PATCH 0/7] Rootless Weston and Weston patch cleanup rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 1/7] weston-init: drop all the old append logic rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 2/7] weston: drop Fix-touch-screen-crash patch rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 3/7] weston: drop allow-visual_id-to-be-0 patch rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 4/7] weston: add notice about select-plane patch rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 5/7] weston: add weston user to the render group rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 6/7] weston: drop the fix-virtual-keyboard-display-issue patch rs
2023-05-24 18:11 ` [arago][kirkstone][PATCH 7/7] weston-init: add a simple touchscreen calibration check rs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.