1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From 6e6c4408d36ddad705458ca4b2e301192f7963fd 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
@@ -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
|