weston-init: Do not use fbdev backend
PATCH 1/4 weston-init: Do not use fbdev backend
This works ok with latest weston/kernel to use drm backend
--- meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini
meta/recipes-graphics/wayland/weston-init/qemuall/weston.ini deleted +0 -2
@@ -1,2 +0,0 @@ -[core] -backend=fbdev-backend.so
Signature · 1 line
2.28.0
PATCH 2/4 weston: plane_add_prop() calls break musl atomic modesetting
This patch ensures, weston/drm backend works which ends up with blank screen on musl based systems
--- meta/recipes-graphics/wayland/weston-init.bb | 8 ------- .../weston/dont-use-plane-add-prop.patch | 23 +++++++++++++++++++ meta/recipes-graphics/wayland/weston_9.0.0.bb | 3 +++ 3 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch
meta/recipes-graphics/wayland/weston-init.bb +0 -8
@@ -38,14 +38,6 @@ do_install() { sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start } -do_install_append_libc-musl_qemux86() { - echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston -} - -do_install_append_libc-musl_qemux86-64() { - echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston -} - inherit update-rc.d features_check systemd # rdepends on weston which depends on virtual/egl
meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file +23 -0
@@ -0,0 +1,23 @@ +Fix atomic modesetting with musl + +atomic modesetting seems to fail with drm weston backend and this patch fixes +it, below errors are seen before weston exits + +atomic: couldn't commit new state: Invalid argument + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] +Signed-off-by: Khem Raj <[email protected]> + +--- a/libweston/backend-drm/kms.c ++++ b/libweston/backend-drm/kms.c +@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr + wl_list_for_each(plane, &b->plane_list, link) { + drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", + (unsigned long) plane->plane_id); +- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); +- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); + } + + flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
meta/recipes-graphics/wayland/weston_9.0.0.bb +3 -0
@@ -12,6 +12,9 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ " + +SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " + SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
Signature · 1 line
2.28.0
Re: [OE-core] [PATCH 2/4] weston: plane_add_prop() calls break musl atomic modesetting
Quoted 1 line · Khem Raj
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158]
But that issue is closed so Rejected is a better status...
Very much a workaround. Do you plan on debugging this?
Ross
Re: [OE-core] [PATCH 2/4] weston: plane_add_prop() calls break musl atomic modesetting
Quoted 7 lines · Ross Burton
Quoted 1 line · Khem Raj
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158]
But that issue is closed so Rejected is a better status...
Very much a workaround. Do you plan on debugging this?
Yes, it use to only happen with drm backend and musl and now its happening all the time.
Quoted 2 lines
Ross
PATCH 3/4 weston-init: Enable RDP screen share
In reply to Khem Raj--- meta/recipes-graphics/wayland/weston-init/weston.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/wayland/weston-init/weston.ini +2 -2
@@ -68,8 +68,8 @@ require-input=false #min_accel_factor = 0.16 #max_accel_factor = 1.0 -#[screen-share] -#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +[screen-share] +command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize #[xwayland] #path=/usr/bin/Xwayland
Signature · 1 line
2.28.0
Re: [OE-core] [PATCH 3/4] weston-init: Enable RDP screen share
Is this really something we want on by default?
Ross
Quoted 25 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-graphics/wayland/weston-init/weston.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-graphics/wayland/weston-init/weston.ini +2
-3@@ -68,8 +68,8 @@ require-input=false #min_accel_factor = 0.16 #max_accel_factor = 1.0 -#[screen-share] -#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +[screen-share] +command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize #[xwayland] #path=/usr/bin/Xwayland --2.28.0
Re: [OE-core] [PATCH 3/4] weston-init: Enable RDP screen share
Quoted 2 lines · Ross Burton
Is this really something we want on by default?
it is only launched on demand, I see other layers overriding default ini file to add this so thats why I added it here so they can use this config from core.
Quoted 28 lines
Ross
Quoted 25 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-graphics/wayland/weston-init/weston.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-graphics/wayland/weston-init/weston.ini +2
-3@@ -68,8 +68,8 @@ require-input=false #min_accel_factor = 0.16 #max_accel_factor = 1.0 -#[screen-share] -#command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize +[screen-share] +command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize #[xwayland] #path=/usr/bin/Xwayland --2.28.0
PATCH 4/4 weston-init: Select drm/fbdev backends for qemu machines
In reply to Khem Rajqemux86/x86_64/aarch64 supports drm backend well, therefore enable it on these qemu machines, other qemu machines should be defaulting to fbdev, if its not qemu then leave it empty
--- meta/recipes-graphics/wayland/weston-init.bb | 9 +++++++++ .../wayland/weston-init/qemux86-64/weston.ini | 0 .../wayland/weston-init/qemux86/weston.ini | 0 3 files changed, 9 insertions(+) delete mode 100644 meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini delete mode 100644 meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini
meta/recipes-graphics/wayland/weston-init.bb +9 -0
@@ -15,6 +15,12 @@ SRC_URI = "file://init \ S = "${WORKDIR}" +DEFAULTBACKEND ??= "" +DEFAULTBACKEND_qemuall ?= "fbdev" +DEFAULTBACKEND_qemuarm64 = "drm" +DEFAULTBACKEND_qemux86 = "drm" +DEFAULTBACKEND_qemux86-64 = "drm" + do_install() { install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
@@ -36,6 +42,9 @@ do_install() { install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start + if [ -n "${DEFAULTBACKEND}" ]; then + sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini + fi } inherit update-rc.d features_check systemd
meta/recipes-graphics/wayland/weston-init/qemux86-64/weston.ini deleted +0 -0
meta/recipes-graphics/wayland/weston-init/qemux86/weston.ini deleted +0 -0
Signature · 1 line
2.28.0