initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
From b10c0e843dcb8148bbe869bb15261955b94ac98c 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);
|
||||
| | ^~~~~~~
|
||||
|
||||
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
|
||||
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
||||
[james.hilliard1@gmail.com: backport from upstream commit
|
||||
b10c0e843dcb8148bbe869bb15261955b94ac98c]
|
||||
---
|
||||
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 1c32959c..c1eb26c4 100644
|
||||
--- a/tests/weston-test-fixture-compositor.c
|
||||
+++ b/tests/weston-test-fixture-compositor.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
+#include <fcntl.h>
|
||||
|
||||
#include "shared/helpers.h"
|
||||
#include "weston-test-fixture-compositor.h"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 4b93b71067949cc5efabb9b3d59278a3f362b11c Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Date: Wed, 21 Oct 2020 13:33:25 +0200
|
||||
Subject: [PATCH] libweston/backend/drm: might need EGL
|
||||
|
||||
gbm-drm.c includes gl-renderer.h. When EGL is enabled, that in turns
|
||||
includes egl.h. As such, dependencies for drm should include EGL if
|
||||
it is available.
|
||||
|
||||
This condition is modelled after a similar one in libweston/meson.build
|
||||
|
||||
Reported-by: Gary Bisson <gary.bisson@boundarydevices.com>
|
||||
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
Cc: Refik Tuzakli <tuzakli.refik@gmail.com>
|
||||
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
---
|
||||
This patch should be a proper fix for the issue discribed in the patch from
|
||||
Gary [1].
|
||||
|
||||
Since the MR on weston upstream [2] is not merged now I add this patch
|
||||
to have working weston with imx in buildroot.
|
||||
|
||||
[1] https://patchwork.ozlabs.org/project/buildroot/patch/20200402130842.918696-3-gary.bisson@boundarydevices.com/
|
||||
[2] https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/508
|
||||
---
|
||||
libweston/backend-drm/meson.build | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libweston/backend-drm/meson.build b/libweston/backend-drm/meson.build
|
||||
index 484c2702..e3e5b976 100644
|
||||
--- a/libweston/backend-drm/meson.build
|
||||
+++ b/libweston/backend-drm/meson.build
|
||||
@@ -53,6 +53,9 @@ if get_option('renderer-gl')
|
||||
config_h.set('HAVE_GBM_FD_IMPORT', '1')
|
||||
endif
|
||||
deps_drm += dep_gbm
|
||||
+ if dep_egl.found()
|
||||
+ deps_drm += dep_egl
|
||||
+ endif
|
||||
srcs_drm += 'drm-gbm.c'
|
||||
config_h.set('BUILD_DRM_GBM', '1')
|
||||
endif
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,391 @@
|
||||
From cc08737e3fd174ec3c4c208ea4f2a3a6a9e8af3e Mon Sep 17 00:00:00 2001
|
||||
From: James Hilliard <james.hilliard1@gmail.com>
|
||||
Date: Mon, 6 Jul 2020 00:58:02 -0600
|
||||
Subject: [PATCH] pipewire: add support for 0.3 API
|
||||
|
||||
Fixes: #369
|
||||
|
||||
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
||||
[james.hilliard1@gmail.com: backport from upstream commit
|
||||
80b585f8d2a31e780b4de41fbd187a742bea7e1a]
|
||||
---
|
||||
.gitlab-ci.yml | 2 +-
|
||||
.gitlab-ci/debian-install.sh | 16 ++++-
|
||||
pipewire/meson.build | 28 ++++++---
|
||||
pipewire/pipewire-plugin.c | 118 ++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 151 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/pipewire/meson.build b/pipewire/meson.build
|
||||
index 3d3374b8..e30a0b62 100644
|
||||
--- a/pipewire/meson.build
|
||||
+++ b/pipewire/meson.build
|
||||
@@ -5,17 +5,25 @@ if get_option('pipewire')
|
||||
error('Attempting to build the pipewire plugin without the required DRM backend. ' + user_hint)
|
||||
endif
|
||||
|
||||
- depnames = [
|
||||
- 'libpipewire-0.2', 'libspa-0.1'
|
||||
- ]
|
||||
deps_pipewire = [ dep_libweston_private ]
|
||||
- foreach depname : depnames
|
||||
- dep = dependency(depname, required: false)
|
||||
- if not dep.found()
|
||||
- error('Pipewire plugin requires @0@ which was not found. '.format(depname) + user_hint)
|
||||
- endif
|
||||
- deps_pipewire += dep
|
||||
- endforeach
|
||||
+
|
||||
+ dep_libpipewire = dependency('libpipewire-0.3', required: false)
|
||||
+ if not dep_libpipewire.found()
|
||||
+ dep_libpipewire = dependency('libpipewire-0.2', required: false)
|
||||
+ endif
|
||||
+ if not dep_libpipewire.found()
|
||||
+ error('Pipewire plugin requires libpipewire which was not found. ' + user_hint)
|
||||
+ endif
|
||||
+ deps_pipewire += dep_libpipewire
|
||||
+
|
||||
+ dep_libspa = dependency('libspa-0.2', required: false)
|
||||
+ if not dep_libspa.found()
|
||||
+ dep_libspa = dependency('libspa-0.1', required: false)
|
||||
+ endif
|
||||
+ if not dep_libspa.found()
|
||||
+ error('Pipewire plugin requires libspa which was not found. ' + user_hint)
|
||||
+ endif
|
||||
+ deps_pipewire += dep_libspa
|
||||
|
||||
plugin_pipewire = shared_library(
|
||||
'pipewire-plugin',
|
||||
diff --git a/pipewire/pipewire-plugin.c b/pipewire/pipewire-plugin.c
|
||||
index 6f892574..ce70ea63 100644
|
||||
--- a/pipewire/pipewire-plugin.c
|
||||
+++ b/pipewire/pipewire-plugin.c
|
||||
@@ -34,20 +34,27 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#include <pipewire/pipewire.h>
|
||||
+
|
||||
#include <spa/param/format-utils.h>
|
||||
#include <spa/param/video/format-utils.h>
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
-#include <pipewire/pipewire.h>
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+#include <spa/buffer/meta.h>
|
||||
+#include <spa/utils/result.h>
|
||||
+#endif
|
||||
|
||||
#define PROP_RANGE(min, max) 2, (min), (max)
|
||||
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
struct type {
|
||||
struct spa_type_media_type media_type;
|
||||
struct spa_type_media_subtype media_subtype;
|
||||
struct spa_type_format_video format_video;
|
||||
struct spa_type_video_format video_format;
|
||||
};
|
||||
+#endif
|
||||
|
||||
struct weston_pipewire {
|
||||
struct weston_compositor *compositor;
|
||||
@@ -60,12 +67,19 @@ struct weston_pipewire {
|
||||
struct pw_loop *loop;
|
||||
struct wl_event_source *loop_source;
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ struct pw_context *context;
|
||||
+#endif
|
||||
struct pw_core *core;
|
||||
struct pw_type *t;
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ struct spa_hook core_listener;
|
||||
+#else
|
||||
struct type type;
|
||||
|
||||
struct pw_remote *remote;
|
||||
struct spa_hook remote_listener;
|
||||
+#endif
|
||||
};
|
||||
|
||||
struct pipewire_output {
|
||||
@@ -100,6 +114,7 @@ struct pipewire_frame_data {
|
||||
struct wl_event_source *fence_sync_event_source;
|
||||
};
|
||||
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
static inline void init_type(struct type *type, struct spa_type_map *map)
|
||||
{
|
||||
spa_type_media_type_map(map, &type->media_type);
|
||||
@@ -107,6 +122,7 @@ static inline void init_type(struct type *type, struct spa_type_map *map)
|
||||
spa_type_format_video_map(map, &type->format_video);
|
||||
spa_type_video_format_map(map, &type->video_format);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void
|
||||
pipewire_debug_impl(struct weston_pipewire *pipewire,
|
||||
@@ -141,6 +157,7 @@ pipewire_debug_impl(struct weston_pipewire *pipewire,
|
||||
free(logstr);
|
||||
}
|
||||
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
static void
|
||||
pipewire_debug(struct weston_pipewire *pipewire, const char *fmt, ...)
|
||||
{
|
||||
@@ -150,6 +167,7 @@ pipewire_debug(struct weston_pipewire *pipewire, const char *fmt, ...)
|
||||
pipewire_debug_impl(pipewire, NULL, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void
|
||||
pipewire_output_debug(struct pipewire_output *output, const char *fmt, ...)
|
||||
@@ -185,7 +203,9 @@ pipewire_output_handle_frame(struct pipewire_output *output, int fd,
|
||||
const struct weston_drm_virtual_output_api *api =
|
||||
output->pipewire->virtual_output_api;
|
||||
size_t size = output->output->height * stride;
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
struct pw_type *t = output->pipewire->t;
|
||||
+#endif
|
||||
struct pw_buffer *buffer;
|
||||
struct spa_buffer *spa_buffer;
|
||||
struct spa_meta_header *h;
|
||||
@@ -203,7 +223,12 @@ pipewire_output_handle_frame(struct pipewire_output *output, int fd,
|
||||
|
||||
spa_buffer = buffer->buffer;
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ if ((h = spa_buffer_find_meta_data(spa_buffer, SPA_META_Header,
|
||||
+ sizeof(struct spa_meta_header)))) {
|
||||
+#else
|
||||
if ((h = spa_buffer_find_meta(spa_buffer, t->meta.Header))) {
|
||||
+#endif
|
||||
h->pts = -1;
|
||||
h->flags = 0;
|
||||
h->seq = output->seq++;
|
||||
@@ -375,18 +400,40 @@ pipewire_set_dpms(struct weston_output *base_output, enum dpms_enum level)
|
||||
static int
|
||||
pipewire_output_connect(struct pipewire_output *output)
|
||||
{
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
struct weston_pipewire *pipewire = output->pipewire;
|
||||
struct type *type = &pipewire->type;
|
||||
+#endif
|
||||
uint8_t buffer[1024];
|
||||
struct spa_pod_builder builder =
|
||||
SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
const struct spa_pod *params[1];
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
struct pw_type *t = pipewire->t;
|
||||
+#endif
|
||||
int frame_rate = output->output->current_mode->refresh / 1000;
|
||||
int width = output->output->width;
|
||||
int height = output->output->height;
|
||||
int ret;
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ params[0] = spa_pod_builder_add_object(&builder,
|
||||
+ SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
||||
+ SPA_FORMAT_mediaType, SPA_POD_Id(SPA_MEDIA_TYPE_video),
|
||||
+ SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_raw),
|
||||
+ SPA_FORMAT_VIDEO_format, SPA_POD_Id(SPA_VIDEO_FORMAT_BGRx),
|
||||
+ SPA_FORMAT_VIDEO_size, SPA_POD_Rectangle(&SPA_RECTANGLE(width, height)),
|
||||
+ SPA_FORMAT_VIDEO_framerate, SPA_POD_Fraction(&SPA_FRACTION (0, 1)),
|
||||
+ SPA_FORMAT_VIDEO_maxFramerate,
|
||||
+ SPA_POD_CHOICE_RANGE_Fraction(&SPA_FRACTION(frame_rate, 1),
|
||||
+ &SPA_FRACTION(1, 1),
|
||||
+ &SPA_FRACTION(frame_rate, 1)));
|
||||
+
|
||||
+ ret = pw_stream_connect(output->stream, PW_DIRECTION_OUTPUT, SPA_ID_INVALID,
|
||||
+ (PW_STREAM_FLAG_DRIVER |
|
||||
+ PW_STREAM_FLAG_MAP_BUFFERS),
|
||||
+ params, 1);
|
||||
+#else
|
||||
params[0] = spa_pod_builder_object(&builder,
|
||||
t->param.idEnumFormat, t->spa_format,
|
||||
"I", type->media_type.video,
|
||||
@@ -406,6 +453,7 @@ pipewire_output_connect(struct pipewire_output *output)
|
||||
(PW_STREAM_FLAG_DRIVER |
|
||||
PW_STREAM_FLAG_MAP_BUFFERS),
|
||||
params, 1);
|
||||
+#endif
|
||||
if (ret != 0) {
|
||||
weston_log("Failed to connect pipewire stream: %s",
|
||||
spa_strerror(ret));
|
||||
@@ -482,26 +530,42 @@ pipewire_output_stream_state_changed(void *data, enum pw_stream_state old,
|
||||
}
|
||||
|
||||
static void
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+pipewire_output_stream_param_changed(void *data, uint32_t id, const struct spa_pod *format)
|
||||
+#else
|
||||
pipewire_output_stream_format_changed(void *data, const struct spa_pod *format)
|
||||
+#endif
|
||||
{
|
||||
struct pipewire_output *output = data;
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
struct weston_pipewire *pipewire = output->pipewire;
|
||||
+#endif
|
||||
uint8_t buffer[1024];
|
||||
struct spa_pod_builder builder =
|
||||
SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
const struct spa_pod *params[2];
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
struct pw_type *t = pipewire->t;
|
||||
+#endif
|
||||
int32_t width, height, stride, size;
|
||||
const int bpp = 4;
|
||||
|
||||
if (!format) {
|
||||
pipewire_output_debug(output, "format = None");
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ pw_stream_update_params(output->stream, NULL, 0);
|
||||
+#else
|
||||
pw_stream_finish_format(output->stream, 0, NULL, 0);
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ spa_format_video_raw_parse(format, &output->video_format);
|
||||
+#else
|
||||
spa_format_video_raw_parse(format, &output->video_format,
|
||||
&pipewire->type.format_video);
|
||||
+#endif
|
||||
|
||||
width = output->video_format.size.width;
|
||||
height = output->video_format.size.height;
|
||||
@@ -510,6 +574,21 @@ pipewire_output_stream_format_changed(void *data, const struct spa_pod *format)
|
||||
|
||||
pipewire_output_debug(output, "format = %dx%d", width, height);
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ params[0] = spa_pod_builder_add_object(&builder,
|
||||
+ SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
|
||||
+ SPA_PARAM_BUFFERS_size, SPA_POD_Int(size),
|
||||
+ SPA_PARAM_BUFFERS_stride, SPA_POD_Int(stride),
|
||||
+ SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(4, 2, 8),
|
||||
+ SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
|
||||
+
|
||||
+ params[1] = spa_pod_builder_add_object(&builder,
|
||||
+ SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,
|
||||
+ SPA_PARAM_META_type, SPA_POD_Id(SPA_META_Header),
|
||||
+ SPA_PARAM_META_size, SPA_POD_Int(sizeof(struct spa_meta_header)));
|
||||
+
|
||||
+ pw_stream_update_params(output->stream, params, 2);
|
||||
+#else
|
||||
params[0] = spa_pod_builder_object(&builder,
|
||||
t->param.idBuffers, t->param_buffers.Buffers,
|
||||
":", t->param_buffers.size,
|
||||
@@ -527,12 +606,17 @@ pipewire_output_stream_format_changed(void *data, const struct spa_pod *format)
|
||||
":", t->param_meta.size, "i", sizeof(struct spa_meta_header));
|
||||
|
||||
pw_stream_finish_format(output->stream, 0, params, 2);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static const struct pw_stream_events stream_events = {
|
||||
PW_VERSION_STREAM_EVENTS,
|
||||
.state_changed = pipewire_output_stream_state_changed,
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ .param_changed = pipewire_output_stream_param_changed,
|
||||
+#else
|
||||
.format_changed = pipewire_output_stream_format_changed,
|
||||
+#endif
|
||||
};
|
||||
|
||||
static struct weston_output *
|
||||
@@ -560,7 +644,11 @@ pipewire_output_create(struct weston_compositor *c, char *name)
|
||||
if (!head)
|
||||
goto err;
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ output->stream = pw_stream_new(pipewire->core, name, NULL);
|
||||
+#else
|
||||
output->stream = pw_stream_new(pipewire->remote, name, NULL);
|
||||
+#endif
|
||||
if (!output->stream) {
|
||||
weston_log("Cannot initialize pipewire stream\n");
|
||||
goto err;
|
||||
@@ -704,6 +792,14 @@ weston_pipewire_loop_handler(int fd, uint32_t mask, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+static void
|
||||
+weston_pipewire_error(void *data, uint32_t id, int seq, int res,
|
||||
+ const char *error)
|
||||
+{
|
||||
+ weston_log("pipewire remote error: %s\n", error);
|
||||
+}
|
||||
+#else
|
||||
static void
|
||||
weston_pipewire_state_changed(void *data, enum pw_remote_state old,
|
||||
enum pw_remote_state state, const char *error)
|
||||
@@ -725,12 +821,20 @@ weston_pipewire_state_changed(void *data, enum pw_remote_state old,
|
||||
break;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+static const struct pw_core_events core_events = {
|
||||
+ PW_VERSION_CORE_EVENTS,
|
||||
+ .error = weston_pipewire_error,
|
||||
+};
|
||||
+#else
|
||||
static const struct pw_remote_events remote_events = {
|
||||
PW_VERSION_REMOTE_EVENTS,
|
||||
.state_changed = weston_pipewire_state_changed,
|
||||
};
|
||||
+#endif
|
||||
|
||||
static int
|
||||
weston_pipewire_init(struct weston_pipewire *pipewire)
|
||||
@@ -745,10 +849,19 @@ weston_pipewire_init(struct weston_pipewire *pipewire)
|
||||
|
||||
pw_loop_enter(pipewire->loop);
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ pipewire->context = pw_context_new(pipewire->loop, NULL, 0);
|
||||
+#else
|
||||
pipewire->core = pw_core_new(pipewire->loop, NULL);
|
||||
pipewire->t = pw_core_get_type(pipewire->core);
|
||||
init_type(&pipewire->type, pipewire->t->map);
|
||||
+#endif
|
||||
|
||||
+#if PW_CHECK_VERSION(0, 2, 90)
|
||||
+ pw_core_add_listener(pipewire->core,
|
||||
+ &pipewire->core_listener,
|
||||
+ &core_events, pipewire);
|
||||
+#else
|
||||
pipewire->remote = pw_remote_new(pipewire->core, NULL, 0);
|
||||
pw_remote_add_listener(pipewire->remote,
|
||||
&pipewire->remote_listener,
|
||||
@@ -777,6 +890,7 @@ weston_pipewire_init(struct weston_pipewire *pipewire)
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
loop = wl_display_get_event_loop(pipewire->compositor->wl_display);
|
||||
pipewire->loop_source =
|
||||
@@ -786,12 +900,14 @@ weston_pipewire_init(struct weston_pipewire *pipewire)
|
||||
pipewire);
|
||||
|
||||
return 0;
|
||||
+#if !PW_CHECK_VERSION(0, 2, 90)
|
||||
err:
|
||||
if (pipewire->remote)
|
||||
pw_remote_destroy(pipewire->remote);
|
||||
pw_loop_leave(pipewire->loop);
|
||||
pw_loop_destroy(pipewire->loop);
|
||||
return -1;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static const struct weston_pipewire_api pipewire_api = {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From a67393c353e0f25b142910a817be5a7754d436c3 Mon Sep 17 00:00:00 2001
|
||||
From: Ambareesh Balaji <ambareeshbalaji@gmail.com>
|
||||
Date: Sat, 5 Dec 2020 20:49:55 -0500
|
||||
Subject: [PATCH] pipewire: fix null deref in 0.3 API
|
||||
|
||||
Signed-off-by: Ambareesh Balaji <ambareeshbalaji@gmail.com>
|
||||
[Retrieved from:
|
||||
https://gitlab.freedesktop.org/wayland/weston/-/commit/a67393c353e0f25b142910a817be5a7754d436c3]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
pipewire/pipewire-plugin.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/pipewire/pipewire-plugin.c b/pipewire/pipewire-plugin.c
|
||||
index ca5cbfec1..55705acfc 100644
|
||||
--- a/pipewire/pipewire-plugin.c
|
||||
+++ b/pipewire/pipewire-plugin.c
|
||||
@@ -856,6 +856,7 @@ weston_pipewire_init(struct weston_pipewire *pipewire)
|
||||
|
||||
#if PW_CHECK_VERSION(0, 2, 90)
|
||||
pipewire->context = pw_context_new(pipewire->loop, NULL, 0);
|
||||
+ pipewire->core = pw_context_connect(pipewire->context, NULL, 0);
|
||||
#else
|
||||
pipewire->core = pw_core_new(pipewire->loop, NULL);
|
||||
pipewire->t = pw_core_get_type(pipewire->core);
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0"
|
||||
depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || BR2_STATIC_LIBS || \
|
||||
!BR2_ENABLE_LOCALE
|
||||
|
||||
config BR2_PACKAGE_WESTON
|
||||
bool "weston"
|
||||
depends on BR2_PACKAGE_HAS_UDEV
|
||||
depends on !BR2_STATIC_LIBS # wayland
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
|
||||
select BR2_PACKAGE_WAYLAND
|
||||
select BR2_PACKAGE_WAYLAND_PROTOCOLS
|
||||
select BR2_PACKAGE_LIBXKBCOMMON
|
||||
select BR2_PACKAGE_CAIRO
|
||||
select BR2_PACKAGE_CAIRO_PNG
|
||||
select BR2_PACKAGE_LIBPNG
|
||||
select BR2_PACKAGE_JPEG
|
||||
select BR2_PACKAGE_LIBINPUT
|
||||
select BR2_PACKAGE_LIBDRM
|
||||
# Runtime dependency
|
||||
select BR2_PACKAGE_XKEYBOARD_CONFIG
|
||||
select BR2_PACKAGE_WESTON_SHELL_DESKTOP if !BR2_PACKAGE_WESTON_HAS_SHELL
|
||||
help
|
||||
Weston is the reference implementation of a Wayland
|
||||
compositor, and a useful compositor in its own right.
|
||||
Weston has various backends that lets it run on Linux kernel
|
||||
modesetting and evdev input as well as under X11.
|
||||
|
||||
http://wayland.freedesktop.org/
|
||||
|
||||
if BR2_PACKAGE_WESTON
|
||||
|
||||
choice
|
||||
prompt "default compositor"
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEFAULT_FBDEV
|
||||
bool "fbdev"
|
||||
select BR2_PACKAGE_WESTON_FBDEV
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEFAULT_DRM
|
||||
bool "drm"
|
||||
depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
select BR2_PACKAGE_WESTON_DRM
|
||||
|
||||
comment "drm backend needs mesa3d w/ EGL driver"
|
||||
depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEFAULT_X11
|
||||
bool "X11"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_WESTON_X11
|
||||
|
||||
comment "X11 backend needs X.org"
|
||||
depends on !BR2_PACKAGE_XORG7
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR
|
||||
string
|
||||
default "fbdev" if BR2_PACKAGE_WESTON_DEFAULT_FBDEV
|
||||
default "drm" if BR2_PACKAGE_WESTON_DEFAULT_DRM
|
||||
default "x11" if BR2_PACKAGE_WESTON_DEFAULT_X11
|
||||
|
||||
config BR2_PACKAGE_WESTON_DRM
|
||||
bool "DRM compositor"
|
||||
depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
|
||||
# Uses libgbm from mesa3d
|
||||
comment "DRM compositor needs an OpenGL EGL backend provided by mesa3d"
|
||||
depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
|
||||
|
||||
config BR2_PACKAGE_WESTON_FBDEV
|
||||
bool "fbdev compositor"
|
||||
|
||||
# FreeRDP needs threads and !static, already the case for weston
|
||||
config BR2_PACKAGE_WESTON_RDP
|
||||
bool "RDP compositor"
|
||||
depends on BR2_USE_MMU # freerdp, libglib2
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on BR2_USE_WCHAR # freerdp
|
||||
depends on BR2_INSTALL_LIBSTDCPP # freerdp
|
||||
select BR2_PACKAGE_FREERDP
|
||||
help
|
||||
This enables the RDP backend, which allows accessing weston
|
||||
through the network with any RDP-compliant client.
|
||||
|
||||
Please note that one must pass those options to weston for RDP
|
||||
to be functional:
|
||||
--rdp-tls-cert=/path/to/server.crt
|
||||
--rdp-tls-key=/path/to/server.key
|
||||
|
||||
By default, Buildroot installs such files in
|
||||
/etc/freerdp/server/ so you may want to change them in a
|
||||
post-build script or a rootfs overlay.
|
||||
|
||||
comment "RDP compositor needs a toolchain w/ wchar, C++"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_WESTON_X11
|
||||
bool "X11 compositor"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
select BR2_PACKAGE_LIBXCB
|
||||
select BR2_PACKAGE_XLIB_LIBX11
|
||||
|
||||
comment "X11 compositor needs X.org enabled"
|
||||
depends on !BR2_PACKAGE_XORG7
|
||||
|
||||
config BR2_PACKAGE_WESTON_XWAYLAND
|
||||
bool "XWayland support"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on BR2_PACKAGE_LIBEPOXY
|
||||
select BR2_PACKAGE_CAIRO
|
||||
select BR2_PACKAGE_LIBXCB
|
||||
select BR2_PACKAGE_XLIB_LIBX11
|
||||
select BR2_PACKAGE_XLIB_LIBXCURSOR
|
||||
|
||||
comment "XWayland support needs libepoxy and X.org enabled"
|
||||
depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_LIBEPOXY
|
||||
|
||||
# Weston needs at least one shell; this can be one of the bundled ones,
|
||||
# below, of from a third-party package, which should then select this.
|
||||
config BR2_PACKAGE_WESTON_HAS_SHELL
|
||||
bool
|
||||
|
||||
config BR2_PACKAGE_WESTON_SHELL_DESKTOP
|
||||
bool "desktop shell"
|
||||
default y
|
||||
|
||||
config BR2_PACKAGE_WESTON_SHELL_FULLSCREEN
|
||||
bool "fullscreen shell"
|
||||
default y
|
||||
select BR2_PACKAGE_WESTON_HAS_SHELL
|
||||
|
||||
config BR2_PACKAGE_WESTON_SHELL_IVI
|
||||
bool "ivi shell"
|
||||
default y
|
||||
select BR2_PACKAGE_WESTON_HAS_SHELL
|
||||
|
||||
config BR2_PACKAGE_WESTON_SHELL_KIOSK
|
||||
bool "kiosk shell"
|
||||
default y
|
||||
select BR2_PACKAGE_WESTON_HAS_SHELL
|
||||
|
||||
config BR2_PACKAGE_WESTON_DEMO_CLIENTS
|
||||
bool "demo clients"
|
||||
depends on BR2_USE_MMU # pango
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango
|
||||
depends on BR2_INSTALL_LIBSTDCPP # pango
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # pango
|
||||
depends on BR2_USE_WCHAR # pango
|
||||
depends on BR2_PACKAGE_HAS_LIBGLES
|
||||
depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND
|
||||
select BR2_PACKAGE_PANGO
|
||||
help
|
||||
This enables the installation of Weston's demo clients.
|
||||
|
||||
comment "demo clients needs an OpenGL ES provider, an OpenEGL-capable Wayland backend and a toolchain w/ wchar, threads, C++"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_USE_WCHAR || !BR2_PACKAGE_HAS_LIBGLES || \
|
||||
!BR2_PACKAGE_HAS_LIBEGL_WAYLAND
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,6 @@
|
||||
# From https://lists.freedesktop.org/archives/wayland-devel/2020-September/041595.html
|
||||
md5 b406da0fe9139fd39653238fde22a6cf weston-9.0.0.tar.xz
|
||||
sha1 90b9540a0bd6d6f7a465817f1c696d4d393183c9 weston-9.0.0.tar.xz
|
||||
sha256 5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe weston-9.0.0.tar.xz
|
||||
sha512 ccc263f8279b7b23e5c593b4a8a023de2c3dc178b1b8d6593599171770bcfe97608de9fcb77aa1cab39255451d289d323e51c317dae190c7641282e085b84f90 weston-9.0.0.tar.xz
|
||||
sha256 fdb65868f65d0fbdb05c2d3b779e10ce9969fa0c4b9262ba4f260e87086ab860 COPYING
|
||||
@@ -0,0 +1,167 @@
|
||||
################################################################################
|
||||
#
|
||||
# weston
|
||||
#
|
||||
################################################################################
|
||||
|
||||
WESTON_VERSION = 9.0.0
|
||||
WESTON_SITE = https://wayland.freedesktop.org/releases
|
||||
WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz
|
||||
WESTON_LICENSE = MIT
|
||||
WESTON_LICENSE_FILES = COPYING
|
||||
WESTON_CPE_ID_VENDOR = wayland
|
||||
|
||||
WESTON_DEPENDENCIES = host-pkgconf wayland wayland-protocols \
|
||||
libxkbcommon pixman libpng jpeg udev cairo libinput libdrm
|
||||
|
||||
WESTON_CONF_OPTS = \
|
||||
-Dbackend-headless=false \
|
||||
-Dcolor-management-colord=false \
|
||||
-Dremoting=false
|
||||
|
||||
# Uses VIDIOC_EXPBUF, only available from 3.8+
|
||||
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y)
|
||||
WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dsimple-clients=
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_SYSTEMD),yy)
|
||||
WESTON_CONF_OPTS += -Dlauncher-logind=true
|
||||
WESTON_DEPENDENCIES += dbus systemd
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dlauncher-logind=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WEBP),y)
|
||||
WESTON_CONF_OPTS += -Dimage-webp=true
|
||||
WESTON_DEPENDENCIES += webp
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dimage-webp=false
|
||||
endif
|
||||
|
||||
# weston-launch must be u+s root in order to work properly
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
define WESTON_PERMISSIONS
|
||||
/usr/bin/weston-launch f 4755 0 0 - - - - -
|
||||
endef
|
||||
define WESTON_USERS
|
||||
- - weston-launch -1 - - - - Weston launcher group
|
||||
endef
|
||||
WESTON_CONF_OPTS += -Dweston-launch=true
|
||||
WESTON_DEPENDENCIES += linux-pam
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dweston-launch=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_HAS_LIBEGL_WAYLAND)$(BR2_PACKAGE_HAS_LIBGLES),yy)
|
||||
WESTON_CONF_OPTS += -Drenderer-gl=true
|
||||
WESTON_DEPENDENCIES += libegl libgles
|
||||
ifeq ($(BR2_PACKAGE_PIPEWIRE)$(BR2_PACKAGE_WESTON_DRM),yy)
|
||||
WESTON_CONF_OPTS += -Dpipewire=true
|
||||
WESTON_DEPENDENCIES += pipewire
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dpipewire=false
|
||||
endif
|
||||
else
|
||||
WESTON_CONF_OPTS += \
|
||||
-Drenderer-gl=false \
|
||||
-Dpipewire=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_RDP),y)
|
||||
WESTON_DEPENDENCIES += freerdp
|
||||
WESTON_CONF_OPTS += -Dbackend-rdp=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dbackend-rdp=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y)
|
||||
WESTON_CONF_OPTS += -Dbackend-fbdev=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dbackend-fbdev=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_DRM),y)
|
||||
WESTON_CONF_OPTS += -Dbackend-drm=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dbackend-drm=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_X11),y)
|
||||
WESTON_CONF_OPTS += -Dbackend-x11=true
|
||||
WESTON_DEPENDENCIES += libxcb xlib_libX11
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dbackend-x11=false
|
||||
endif
|
||||
|
||||
# We're guaranteed to have at least one backend
|
||||
WESTON_CONF_OPTS += -Dbackend-default=$(call qstrip,$(BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR))
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_XWAYLAND),y)
|
||||
WESTON_CONF_OPTS += -Dxwayland=true
|
||||
WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dxwayland=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVA),y)
|
||||
WESTON_CONF_OPTS += -Dbackend-drm-screencast-vaapi=true
|
||||
WESTON_DEPENDENCIES += libva
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dbackend-drm-screencast-vaapi=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LCMS2),y)
|
||||
WESTON_CONF_OPTS += -Dcolor-management-lcms=true
|
||||
WESTON_DEPENDENCIES += lcms2
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dcolor-management-lcms=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
WESTON_CONF_OPTS += -Dsystemd=true
|
||||
WESTON_DEPENDENCIES += systemd
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dsystemd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBXML2),y)
|
||||
WESTON_CONF_OPTS += -Dtest-junit-xml=true
|
||||
WESTON_DEPENDENCIES += libxml2
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dtest-junit-xml=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_SHELL_DESKTOP),y)
|
||||
WESTON_CONF_OPTS += -Dshell-desktop=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dshell-desktop=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_SHELL_FULLSCREEN),y)
|
||||
WESTON_CONF_OPTS += -Dshell-fullscreen=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dshell-fullscreen=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_SHELL_IVI),y)
|
||||
WESTON_CONF_OPTS += -Dshell-ivi=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dshell-ivi=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_SHELL_KIOSK),y)
|
||||
WESTON_CONF_OPTS += -Dshell-kiosk=true
|
||||
else
|
||||
WESTON_CONF_OPTS += -Dshell-kiosk=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_WESTON_DEMO_CLIENTS),y)
|
||||
WESTON_CONF_OPTS += -Ddemo-clients=true
|
||||
WESTON_DEPENDENCIES += pango
|
||||
else
|
||||
WESTON_CONF_OPTS += -Ddemo-clients=false
|
||||
endif
|
||||
|
||||
$(eval $(meson-package))
|
||||
Reference in New Issue
Block a user