mirror of
https://codeberg.org/flk/meta-wayland.git
synced 2025-04-23 17:26:44 +02:00
Compare commits
3 Commits
877e8f6b8e
...
761ac51455
Author | SHA1 | Date | |
---|---|---|---|
|
761ac51455 | ||
|
70ff0f5e28 | ||
|
d1ed14536f |
@ -1,39 +0,0 @@
|
|||||||
From 29a06add8ef184f85e37ff8abdc34fbaa2f4ee1e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sergei Trofimovich <slyich@gmail.com>
|
|
||||||
Date: Thu, 21 Dec 2023 20:15:29 +0000
|
|
||||||
Subject: [PATCH] layer.c: fix build against upcoming `gcc-14`
|
|
||||||
(`-Werror=calloc-transposed-args`)
|
|
||||||
|
|
||||||
`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
|
|
||||||
detected minor infelicity in `calloc()` API usage in `libliftoff`:
|
|
||||||
|
|
||||||
../layer.c: In function 'liftoff_layer_create':
|
|
||||||
../layer.c:20:48: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in t
|
|
||||||
ument [-Werror=calloc-transposed-args]
|
|
||||||
20 | layer->candidate_planes = calloc(sizeof(layer->candidate_planes[0]),
|
|
||||||
| ^
|
|
||||||
../layer.c:20:48: note: earlier argument should specify number of elements, later size of each element
|
|
||||||
---
|
|
||||||
layer.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/emersion/libliftoff/-/commit/29a06add8ef184f85e37ff8abdc34fbaa2f4ee1e]
|
|
||||||
|
|
||||||
diff --git a/layer.c b/layer.c
|
|
||||||
index 73a8186..6510ea7 100644
|
|
||||||
--- a/layer.c
|
|
||||||
+++ b/layer.c
|
|
||||||
@@ -17,8 +17,8 @@ liftoff_layer_create(struct liftoff_output *output)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
layer->output = output;
|
|
||||||
- layer->candidate_planes = calloc(sizeof(layer->candidate_planes[0]),
|
|
||||||
- output->device->planes_cap);
|
|
||||||
+ layer->candidate_planes = calloc(output->device->planes_cap,
|
|
||||||
+ sizeof(layer->candidate_planes[0]));
|
|
||||||
if (layer->candidate_planes == NULL) {
|
|
||||||
liftoff_log_errno(LIFTOFF_ERROR, "calloc");
|
|
||||||
free(layer);
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
@ -3,15 +3,12 @@ HOMEPAGE = "https://gitlab.freedesktop.org/emersion/libliftoff"
|
|||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=706cd9899438a9385250ab6773c1fa53"
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=706cd9899438a9385250ab6773c1fa53"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = "git://gitlab.freedesktop.org/emersion/libliftoff.git;branch=master;protocol=https"
|
||||||
git://gitlab.freedesktop.org/emersion/libliftoff.git;branch=v0.4;protocol=https \
|
|
||||||
file://29a06add8ef184f85e37ff8abdc34fbaa2f4ee1e.patch \
|
|
||||||
"
|
|
||||||
|
|
||||||
DEPENDS = "libdrm"
|
DEPENDS = "libdrm"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
PV = "0.4.1"
|
PV = "0.5.0"
|
||||||
SRCREV = "e045589f37835d66e3ffe8130a597bb4eb9ee08f"
|
SRCREV = "8b08dc1c14fd019cc90ddabe34ad16596b0691f4"
|
||||||
|
|
||||||
inherit meson pkgconfig
|
inherit meson pkgconfig
|
||||||
|
@ -47,6 +47,8 @@ inherit meson pkgconfig features_check
|
|||||||
|
|
||||||
EXTRA_OEMESON += "--buildtype release"
|
EXTRA_OEMESON += "--buildtype release"
|
||||||
|
|
||||||
|
CFLAGS += "-Wno-calloc-transposed-args"
|
||||||
|
|
||||||
do_install:append() {
|
do_install:append() {
|
||||||
install -d ${D}${bindir}
|
install -d ${D}${bindir}
|
||||||
install -m 0755 ${B}/tinywl/tinywl ${D}${bindir}/tinywl-0.16
|
install -m 0755 ${B}/tinywl/tinywl ${D}${bindir}/tinywl-0.16
|
||||||
|
@ -39,6 +39,7 @@ PACKAGECONFIG ?= " \
|
|||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI = "git://gitlab.freedesktop.org/wlroots/wlroots.git;branch=0.17;protocol=https"
|
SRC_URI = "git://gitlab.freedesktop.org/wlroots/wlroots.git;branch=0.17;protocol=https"
|
||||||
|
SRC_URI += "file://backend-drm-add-support-for-libliftoff-v0.5.0.patch"
|
||||||
SRCREV = "bc73e507abd1e8319353a8601f1f8ebfe17307ee"
|
SRCREV = "bc73e507abd1e8319353a8601f1f8ebfe17307ee"
|
||||||
PV = "0.17.3"
|
PV = "0.17.3"
|
||||||
|
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
From 8b1628adcf530fd5396f62479175e486126efc7c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon Ser <contact@emersion.fr>
|
||||||
|
Date: Tue, 28 May 2024 00:30:33 +0200
|
||||||
|
Subject: [PATCH] backend/drm: add support for libliftoff v0.5.0
|
||||||
|
|
||||||
|
Don't require libliftoff 0.5.0 just yet: we want to be able to
|
||||||
|
backport this patch.
|
||||||
|
---
|
||||||
|
backend/drm/libliftoff.c | 5 +++++
|
||||||
|
backend/drm/meson.build | 1 +
|
||||||
|
2 files changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/backend/drm/libliftoff.c b/backend/drm/libliftoff.c
|
||||||
|
index a3b61540..12dd8fdb 100644
|
||||||
|
--- a/backend/drm/libliftoff.c
|
||||||
|
+++ b/backend/drm/libliftoff.c
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
#include "backend/drm/drm.h"
|
||||||
|
#include "backend/drm/iface.h"
|
||||||
|
+#include "config.h"
|
||||||
|
|
||||||
|
static bool init(struct wlr_drm_backend *drm) {
|
||||||
|
// TODO: lower log level
|
||||||
|
@@ -436,7 +437,11 @@ static bool crtc_commit(struct wlr_drm_connector *conn,
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if HAVE_LIBLIFTOFF_0_5
|
||||||
|
+ int ret = liftoff_output_apply(crtc->liftoff, req, flags, NULL);
|
||||||
|
+#else
|
||||||
|
int ret = liftoff_output_apply(crtc->liftoff, req, flags);
|
||||||
|
+#endif
|
||||||
|
if (ret != 0) {
|
||||||
|
wlr_drm_conn_log(conn, test_only ? WLR_DEBUG : WLR_ERROR,
|
||||||
|
"liftoff_output_apply failed: %s", strerror(-ret));
|
||||||
|
diff --git a/backend/drm/meson.build b/backend/drm/meson.build
|
||||||
|
index 5d2f2b1f8c..7c00b0f085 100644
|
||||||
|
--- a/backend/drm/meson.build
|
||||||
|
+++ b/backend/drm/meson.build
|
||||||
|
@@ -48,6 +48,7 @@ wlr_files += files(
|
||||||
|
|
||||||
|
if libliftoff.found()
|
||||||
|
wlr_files += files('libliftoff.c')
|
||||||
|
+ internal_config.set10('HAVE_LIBLIFTOFF_0_5', libliftoff.version().version_compare('>=0.5.0'))
|
||||||
|
endif
|
||||||
|
|
||||||
|
features += { 'drm-backend': true }
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -0,0 +1,51 @@
|
|||||||
|
From 8b1628adcf530fd5396f62479175e486126efc7c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon Ser <contact@emersion.fr>
|
||||||
|
Date: Tue, 28 May 2024 00:30:33 +0200
|
||||||
|
Subject: [PATCH] backend/drm: add support for libliftoff v0.5.0
|
||||||
|
|
||||||
|
Don't require libliftoff 0.5.0 just yet: we want to be able to
|
||||||
|
backport this patch.
|
||||||
|
---
|
||||||
|
backend/drm/libliftoff.c | 5 +++++
|
||||||
|
backend/drm/meson.build | 1 +
|
||||||
|
2 files changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/backend/drm/libliftoff.c b/backend/drm/libliftoff.c
|
||||||
|
index c88e1bcee0..74d4f76963 100644
|
||||||
|
--- a/backend/drm/libliftoff.c
|
||||||
|
+++ b/backend/drm/libliftoff.c
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
#include "backend/drm/drm.h"
|
||||||
|
#include "backend/drm/fb.h"
|
||||||
|
#include "backend/drm/iface.h"
|
||||||
|
+#include "config.h"
|
||||||
|
|
||||||
|
static bool init(struct wlr_drm_backend *drm) {
|
||||||
|
// TODO: lower log level
|
||||||
|
@@ -407,7 +408,11 @@ static bool commit(struct wlr_drm_backend *drm,
|
||||||
|
struct wlr_drm_connector *conn = state->connectors[i].connector;
|
||||||
|
struct wlr_drm_crtc *crtc = conn->crtc;
|
||||||
|
|
||||||
|
+#if HAVE_LIBLIFTOFF_0_5
|
||||||
|
+ int ret = liftoff_output_apply(crtc->liftoff, req, flags, NULL);
|
||||||
|
+#else
|
||||||
|
int ret = liftoff_output_apply(crtc->liftoff, req, flags);
|
||||||
|
+#endif
|
||||||
|
if (ret != 0) {
|
||||||
|
wlr_drm_conn_log(conn, test_only ? WLR_DEBUG : WLR_ERROR,
|
||||||
|
"liftoff_output_apply failed: %s", strerror(-ret));
|
||||||
|
diff --git a/backend/drm/meson.build b/backend/drm/meson.build
|
||||||
|
index 5d2f2b1f8c..7c00b0f085 100644
|
||||||
|
--- a/backend/drm/meson.build
|
||||||
|
+++ b/backend/drm/meson.build
|
||||||
|
@@ -48,6 +48,7 @@ wlr_files += files(
|
||||||
|
|
||||||
|
if libliftoff.found()
|
||||||
|
wlr_files += files('libliftoff.c')
|
||||||
|
+ internal_config.set10('HAVE_LIBLIFTOFF_0_5', libliftoff.version().version_compare('>=0.5.0'))
|
||||||
|
endif
|
||||||
|
|
||||||
|
features += { 'drm-backend': true }
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -39,6 +39,7 @@ PACKAGECONFIG ?= " \
|
|||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI = "git://gitlab.freedesktop.org/wlroots/wlroots.git;branch=master;protocol=https"
|
SRC_URI = "git://gitlab.freedesktop.org/wlroots/wlroots.git;branch=master;protocol=https"
|
||||||
|
SRC_URI += "file://backend-drm-add-support-for-libliftoff-v0.5.0.patch"
|
||||||
SRCREV = "56ebfde540da9631548773baba87beb716660322"
|
SRCREV = "56ebfde540da9631548773baba87beb716660322"
|
||||||
PV = "0.18.0-dev"
|
PV = "0.18.0-dev"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user