[2/4] weston: plane_add_prop() calls break musl atomic modesetting

Submitted by Khem Raj on Sept. 12, 2020, 9:04 p.m. | Patch ID: 176443

Details

Message ID 20200912210406.3328090-2-raj.khem@gmail.com
State Accepted
Commit b3a5b64f717b39536c96627ce058cf9c51cf3ba6
Headers show

Commit Message

Khem Raj Sept. 12, 2020, 9:04 p.m.
This patch ensures, weston/drm backend works which ends up with blank
screen on musl based systems

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 95d75556dc..113f0ff599 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -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
diff --git a/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch
new file mode 100644
index 0000000000..a4444e5d18
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch
@@ -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 <raj.khem@gmail.com>
+
+--- 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;
diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb b/meta/recipes-graphics/wayland/weston_9.0.0.bb
index 2c526e3016..0b037a3770 100644
--- a/meta/recipes-graphics/wayland/weston_9.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb
@@ -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"

Comments

Ross Burton Sept. 15, 2020, 10:30 a.m.
On Sat, 12 Sep 2020 at 22:04, Khem Raj <raj.khem@gmail.com> wrote:
> +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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142581): https://lists.openembedded.org/g/openembedded-core/message/142581
Mute This Topic: https://lists.openembedded.org/mt/76808950/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Khem Raj Sept. 15, 2020, 3:54 p.m.
On 9/15/20 3:30 AM, Ross Burton wrote:
> On Sat, 12 Sep 2020 at 22:04, Khem Raj <raj.khem@gmail.com> wrote:
>> +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.

> Ross
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142593): https://lists.openembedded.org/g/openembedded-core/message/142593
Mute This Topic: https://lists.openembedded.org/mt/76808950/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-