weston: remove deprecated recipe

meta-freescale updated to version '10.0.0.imx', so our bbappend fails
with:

ERROR: No recipes in default available for:
  ... meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/wayland/weston_9.0.0.imx.bbappend

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2022-08-31 11:58:36 +02:00
parent a6f56bad1a
commit 526cb3cae0
9 changed files with 2 additions and 389 deletions

View File

@ -220,7 +220,7 @@ PREFERRED_PROVIDER_opencl-clhpp:imxgpu ?= "imx-gpu-viv"
PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv"
PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv"
PREFERRED_VERSION_weston:imx-nxp-bsp ?= "9.0.0.imx" PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.0.imx"
PREFERRED_VERSION_weston:imx-mainline-bsp = "" PREFERRED_VERSION_weston:imx-mainline-bsp = ""
PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ?= "1.25.imx" PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ?= "1.25.imx"

View File

@ -1,81 +0,0 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Thu, 17 Sep 2020 13:16:04 +0200
Subject: [PATCH] libweston: g2d-renderer: try re-adjusting fb if the
FBIOPAN_DISPLAY ioctl fails
By default, the g2d renderer works with 3 buffers, and uses the FBIOPAN_DISPLAY
ioctl to have the kernel switch between them everytime the output has to be
shown. Because of this, when the renderer is initialized, it will increase the
framebuffer's yres_virtual parameter so it is 3 times the size of yres
(vertical resolution).
However, when the system goes through a suspend/resume iteration, the
framebuffer's yres_virtual parameter will change back to its original value,
causing the FBIOPAN_DISPLAY ioctl to fail when using the 2nd and 3rd buffers,
which is 2 out of 3 times whenever something changes in the output. This has
three direct effects:
* Constant "FBIOPAN_DISPLAY failed" messages in the weston log
* Choppy framerate (due to the renderer only being able to show 1/3 of the
total output frames)
* A 2/3 chance that the desktop will not show after resuming from suspend until
there's movement on the screen
To avoid this, whenever a FBIOPAN_DISPLAY ioctl fails, check if the
yres_virtual attribute read from the kernel is different from the one saved in
the renderer and, if so, update it once again and retry the ioctl. This adds
some additional overhead in case of a FBIOPAN_DISPLAY failure, but these have
only been observed in the specific suspend/resume scenario, not in an average
use case.
The only drawback to this workaround is that there's a 1/3 chance that the
display will go blank for a very small period of time when resuming from
suspend. This is due to the framebuffer being reconfigured and, although
undesireable, is much less bothersome than the original issue.
https://jira.digi.com/browse/DEL-7236
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
---
libweston/renderer-g2d/g2d-renderer.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c
index 456190a3..cfc2e8b6 100644
--- a/libweston/renderer-g2d/g2d-renderer.c
+++ b/libweston/renderer-g2d/g2d-renderer.c
@@ -528,12 +528,34 @@ static void
g2d_flip_surface(struct weston_output *output)
{
struct g2d_output_state *go = get_output_state(output);
+ struct fb_var_screeninfo aux_varinfo;
go->fb_info.varinfo.yoffset = go->activebuffer * go->fb_info.y_resolution;
if(ioctl(go->fb_info.fb_fd, FBIOPAN_DISPLAY, &(go->fb_info.varinfo)) < 0)
{
- weston_log("FBIOPAN_DISPLAY Failed\n");
+ /* Check if yres_virtual has changed (it happens on suspend/resume) */
+ if (ioctl(go->fb_info.fb_fd, FBIOGET_VSCREENINFO, &aux_varinfo) < 0) {
+ weston_log("FBIOGET_VSCREENINFO Failed\n");
+ goto out;
+ }
+
+ /* If yres_virtual has changed, adjust it and try flipping the surface again */
+ if (aux_varinfo.yres_virtual != go->fb_info.varinfo.yres_virtual) {
+ aux_varinfo.yres_virtual = aux_varinfo.yres * go->nNumBuffers;
+ if (ioctl(go->fb_info.fb_fd, FBIOPUT_VSCREENINFO, &aux_varinfo) < 0) {
+ weston_log("FBIOPUT_VSCREENINFO Failed\n");
+ goto out;
+ }
+
+ if(ioctl(go->fb_info.fb_fd, FBIOPAN_DISPLAY, &(go->fb_info.varinfo)) < 0) {
+ weston_log("FBIOPAN_DISPLAY Failed\n");
+ }
+ } else {
+ weston_log("FBIOPAN_DISPLAY Failed\n");
+ }
}
+
+out:
go->activebuffer = (go->activebuffer + 1) % go->nNumBuffers;
}

View File

@ -1,47 +0,0 @@
From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denys@ti.com>
Date: Tue, 8 Sep 2020 19:37:42 -0400
Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and
O_CREAT
musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(),
O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors:
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock':
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~
| | popen
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function)
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~~~
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function)
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~~~~~~
| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function)
| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700);
| | ^~~~~~~
Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c]
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
tests/weston-test-fixture-compositor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c
index 0c9855f..e0e32c9 100644
--- a/tests/weston-test-fixture-compositor.c
+++ b/tests/weston-test-fixture-compositor.c
@@ -31,6 +31,7 @@
#include <unistd.h>
#include <sys/file.h>
#include <errno.h>
+#include <fcntl.h>
#include "shared/helpers.h"
#include "weston-test-fixture-compositor.h"
--
2.7.4

View File

@ -1,199 +0,0 @@
From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 22 Feb 2017 15:53:30 +0200
Subject: [PATCH] weston-launch: Provide a default version that doesn't require
PAM
weston-launch requires PAM for starting weston as a non-root user.
Since starting weston as root is a valid use case by itself, if
PAM is not available, provide a default version of weston-launch
without non-root-user support.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ming Liu <ming.liu@toradex.com>
---
libweston/meson.build | 16 ++++++++++++----
libweston/weston-launch.c | 21 +++++++++++++++++++++
meson_options.txt | 7 +++++++
3 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/libweston/meson.build b/libweston/meson.build
index 08d23ec..cb9fd3f 100644
--- a/libweston/meson.build
+++ b/libweston/meson.build
@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency(
)
if get_option('weston-launch')
- dep_pam = cc.find_library('pam')
+ deps_weston_launch = [systemd_dep, dep_libdrm]
- if not cc.has_function('pam_open_session', dependencies: dep_pam)
- error('pam_open_session not found for weston-launch')
+ if get_option('pam')
+ dep_pam = cc.find_library('pam')
+ if not cc.has_function('pam_open_session', dependencies: dep_pam)
+ error('pam_open_session not found for weston-launch')
+ endif
+
+ if dep_pam.found()
+ deps_weston_launch += dep_pam
+ config_h.set('HAVE_PAM', '1')
+ endif
endif
executable(
'weston-launch',
'weston-launch.c',
- dependencies: [dep_pam, systemd_dep, dep_libdrm],
+ dependencies: deps_weston_launch,
include_directories: common_inc,
install: true
)
diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
index 521cb2c..2d42d33 100644
--- a/libweston/weston-launch.c
+++ b/libweston/weston-launch.c
@@ -51,7 +51,9 @@
#include <pwd.h>
#include <grp.h>
+#ifdef HAVE_PAM
#include <security/pam_appl.h>
+#endif
#ifdef HAVE_SYSTEMD_LOGIN
#include <systemd/sd-login.h>
@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd)
#endif
struct weston_launch {
+#ifdef HAVE_PAM
struct pam_conv pc;
pam_handle_t *ph;
+#endif
int tty;
int ttynr;
int sock[2];
@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl)
return false;
}
+#ifdef HAVE_PAM
static int
pam_conversation_fn(int msg_count,
const struct pam_message **messages,
@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl)
return 0;
}
+#endif
static int
setup_launcher_socket(struct weston_launch *wl)
@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status)
close(wl->signalfd);
close(wl->sock[0]);
+#ifdef HAVE_PAM
if (wl->new_user) {
err = pam_close_session(wl->ph, 0);
if (err)
@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status)
err, pam_strerror(wl->ph, err));
pam_end(wl->ph, err);
}
+#endif
/*
* Get a fresh handle to the tty as the previous one is in
@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
setenv("HOME", wl->pw->pw_dir, 1);
setenv("SHELL", wl->pw->pw_shell, 1);
+#ifdef HAVE_PAM
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
}
free(env);
}
+#endif
/*
* We open a new session, so it makes sense
@@ -789,8 +799,10 @@ static void
help(const char *name)
{
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
+#ifdef HAVE_PAM
fprintf(stderr, " -u, --user Start session as specified username,\n"
" e.g. -u joe, requires root.\n");
+#endif
fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
" e.g. -t /dev/tty4, requires -u option.\n");
fprintf(stderr, " -v, --verbose Be verbose\n");
@@ -804,7 +816,9 @@ main(int argc, char *argv[])
int i, c;
char *tty = NULL;
struct option opts[] = {
+#ifdef HAVE_PAM
{ "user", required_argument, NULL, 'u' },
+#endif
{ "tty", required_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "help", no_argument, NULL, 'h' },
@@ -816,11 +830,16 @@ main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
switch (c) {
case 'u':
+#ifdef HAVE_PAM
wl.new_user = optarg;
if (getuid() != 0) {
fprintf(stderr, "weston: Permission denied. -u allowed for root only\n");
exit(EXIT_FAILURE);
}
+#else
+ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n");
+ exit(EXIT_FAILURE);
+#endif
break;
case 't':
tty = optarg;
@@ -872,8 +891,10 @@ main(int argc, char *argv[])
if (setup_tty(&wl, tty) < 0)
exit(EXIT_FAILURE);
+#ifdef HAVE_PAM
if (wl.new_user && setup_pam(&wl) < 0)
exit(EXIT_FAILURE);
+#endif
if (setup_launcher_socket(&wl) < 0)
exit(EXIT_FAILURE);
diff --git a/meson_options.txt b/meson_options.txt
index 239bd2d..99e4ec3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -73,6 +73,13 @@ option(
)
option(
+ 'pam',
+ type: 'boolean',
+ value: true,
+ description: 'Define if PAM is available'
+)
+
+option(
'xwayland',
type: 'boolean',
value: true,

View File

@ -1,23 +0,0 @@
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;

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Weston
Comment=Wayland Compostitor
Exec=weston
Icon=weston
Terminal=false
Categories=Utility;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,7 +0,0 @@
#!/bin/sh
if type Xwayland >/dev/null 2>/dev/null; then
mkdir -p /tmp/.X11-unix
add_weston_argument "--modules=xwayland.so"
fi

View File

@ -1,21 +0,0 @@
# Copyright (C) 2020-2021 Digi International.
# Digi: include patches/files from this layer
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https"
SRC_URI = " \
${WESTON_SRC};branch=${SRCBRANCH} \
file://weston.png \
file://weston.desktop \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
"
SRCREV = "26da63a46b926c8301d8c271f6869c893cc35afa"
EXTRA_OEMESON:remove = "-Dbackend-rdp=false"
PACKAGECONFIG:append = " rdp"
PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
# Digi: fix ccimx6 suspend/resume issue
SRC_URI:append:ccimx6 = " file://0001-libweston-g2d-renderer-try-re-adjusting-fb-if-the-FB.patch"