summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2024-12-15 10:17:11 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2024-12-18 01:15:55 +0900
commita0fe3c677942cab57e94b0a5f90e436b09a2a413 (patch)
tree4d2be9db970810b3d26c4c692c058b1353064a79
parentca9961ddf42d215f0e610d1743e21161bdf0c864 (diff)
Remove drm lease patch for agl-compositorHEADmaster
The drm lease support patch for agl-compositor is mantaind out of tree patch around passed years. It was cause some break of container build. A drm lease patch for agl-compositor merge into agl-compositor tree. This patch remove off tree patch from meta-agl-drm-lease layer. Bug-AGL: SPEC-4889 Change-Id: I5c64c18d59ae19d4f8d8ab215584cf89cc476847 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
-rw-r--r--meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor/0001-Add-drm-lease-support.patch225
-rw-r--r--meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor_git.bbappend5
2 files changed, 0 insertions, 230 deletions
diff --git a/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor/0001-Add-drm-lease-support.patch b/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor/0001-Add-drm-lease-support.patch
deleted file mode 100644
index a535664f..00000000
--- a/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor/0001-Add-drm-lease-support.patch
+++ /dev/null
@@ -1,225 +0,0 @@
-From a1168c605680a106f52b4c926d473e8d9f6ae453 Mon Sep 17 00:00:00 2001
-From: Marius Vlad <marius.vlad@collabora.com>
-Date: Fri, 3 May 2024 14:29:13 +0300
-Subject: [PATCH] Add drm-lease support
-
-Add an option to use a DRM lease instead of a DRM device
-as the video output. This will allow agl-compositor to
-operate alongside other applications output via a DRM
-lease.
-
-Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
-Change-Id: I78f8b9425280d4c0606003cd86f4cf30c065b888
----
- meson.build | 6 +++++
- meson_options.txt | 8 +++++++
- src/compositor.c | 8 +++++++
- src/drm-lease.c | 52 ++++++++++++++++++++++++++++++++++++++++++++
- src/drm-lease.h | 19 ++++++++++++++++
- src/ivi-compositor.h | 2 ++
- 6 files changed, 95 insertions(+)
- create mode 100644 src/drm-lease.c
- create mode 100644 src/drm-lease.h
-
-diff --git a/meson.build b/meson.build
-index 215b5ac..f25833b 100644
---- a/meson.build
-+++ b/meson.build
-@@ -159,6 +159,12 @@ elif policy_to_install == 'rba'
- message('Installing rba policy')
- endif
-
-+if get_option('drm-lease')
-+ deps_libweston += dependency('libdlmclient')
-+ srcs_agl_compositor += 'src/drm-lease.c'
-+ config_h.set('HAVE_DRM_LEASE', '1')
-+endif
-+
- # From meson documentation:
- # In order to look for headers in a specific directory you can use args :
- # '-I/extra/include/dir, but this should only be used in exceptional cases for
-diff --git a/meson_options.txt b/meson_options.txt
-index 7c0e103..e0463f4 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -5,6 +5,7 @@ option(
- value: 'allow-all',
- description: 'Default policy when no specific policy was set'
- )
-+
- option(
- 'grpc-proxy',
- type: 'boolean',
-@@ -24,3 +25,10 @@ option(
- value: '/usr/bin/Xwayland',
- description: 'Xwayland: path to installed Xwayland binary'
- )
-+
-+option(
-+ 'drm-lease',
-+ type: 'boolean',
-+ value: false,
-+ description: 'Support for running weston with a leased DRM Master'
-+)
-diff --git a/src/compositor.c b/src/compositor.c
-index 6aec416..a6db5e0 100644
---- a/src/compositor.c
-+++ b/src/compositor.c
-@@ -57,6 +57,7 @@
- #include "config.h"
- #include "agl-shell-server-protocol.h"
-
-+#include "drm-lease.h"
-
- #define WINDOWED_DEFAULT_WIDTH 1024
- #define WINDOWED_DEFAULT_HEIGHT 768
-@@ -905,10 +906,12 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[],
- bool use_shadow;
- bool without_input = false;
- struct ivi_backend *ivi_backend = NULL;
-+ char *drm_lease_name = NULL;
-
- const struct weston_option options[] = {
- { WESTON_OPTION_STRING, "seat", 0, &config.seat_id },
- { WESTON_OPTION_STRING, "drm-device", 0, &config.specific_device },
-+ { WESTON_OPTION_STRING, "drm-lease", 0, &drm_lease_name },
- { WESTON_OPTION_BOOLEAN, "current-mode", 0, &use_current_mode },
- { WESTON_OPTION_BOOLEAN, "use-pixman", 0, &force_pixman },
- { WESTON_OPTION_BOOLEAN, "continue-without-input", false, &without_input }
-@@ -930,6 +933,7 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[],
- &config.pageflip_timeout, 0);
- weston_config_section_get_bool(section, "pixman-shadow", &use_shadow, 1);
- config.use_pixman_shadow = use_shadow;
-+ config.device_fd = get_drm_lease(&ivi->drm_lease, drm_lease_name);
-
- if (without_input)
- ivi->compositor->require_input = !without_input;
-@@ -954,10 +958,13 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[],
- goto error;
- }
-
-+ free(drm_lease_name);
-+
- return 0;
-
- error:
- free(config.gbm_format);
-+ free(drm_lease_name);
- free(config.seat_id);
- return -1;
- }
-@@ -2271,6 +2278,7 @@ error_compositor:
- free(modules);
- modules = NULL;
-
-+ release_drm_lease(ivi.drm_lease);
- weston_compositor_destroy(ivi.compositor);
-
- weston_log_scope_destroy(log_scope);
-diff --git a/src/drm-lease.c b/src/drm-lease.c
-new file mode 100644
-index 0000000..887277d
---- /dev/null
-+++ b/src/drm-lease.c
-@@ -0,0 +1,52 @@
-+/*
-+ * Copyright © 2022 IGEL Co., Ltd.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+#include "drm-lease.h"
-+
-+#include <libweston/libweston.h>
-+
-+int get_drm_lease(struct dlm_lease **drm_lease, const char *drm_lease_name) {
-+ if (!drm_lease_name)
-+ return -1;
-+
-+ int drm_fd = -1;
-+ struct dlm_lease *lease = dlm_get_lease(drm_lease_name);
-+ if (lease) {
-+ drm_fd = dlm_lease_fd(lease);
-+ if (drm_fd < 0)
-+ dlm_release_lease(lease);
-+ }
-+ if (drm_fd < 0)
-+ weston_log("Could not get DRM lease %s\n", drm_lease_name);
-+
-+ *drm_lease = lease;
-+ return drm_fd;
-+}
-+
-+void release_drm_lease(struct dlm_lease *lease) {
-+ if (lease)
-+ dlm_release_lease(lease);
-+}
-+
-diff --git a/src/drm-lease.h b/src/drm-lease.h
-new file mode 100644
-index 0000000..9fdc428
---- /dev/null
-+++ b/src/drm-lease.h
-@@ -0,0 +1,19 @@
-+#ifndef DRM_LEASE_H
-+#define DRM_LEASE_H
-+
-+#include "config.h"
-+
-+#ifdef HAVE_DRM_LEASE
-+#include <dlmclient.h>
-+int get_drm_lease(struct dlm_lease **drm_lease, const char *drm_lease_name);
-+void release_drm_lease(struct dlm_lease *drm_lease);
-+#else
-+struct dlm_lease;
-+static int get_drm_lease(struct dlm_lease **drm_lease, const char *drm_lease_name) {
-+ return -1;
-+}
-+static void release_drm_lease(struct dlm_lease *drm_lease) {
-+}
-+
-+#endif
-+#endif /* DRM_LEASE_H */
-diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h
-index 1e8c55a..ea8138a 100644
---- a/src/ivi-compositor.h
-+++ b/src/ivi-compositor.h
-@@ -36,6 +36,7 @@
- #include <libweston/desktop.h>
-
- #include "remote.h"
-+#include "drm-lease.h"
-
- #include "agl-shell-server-protocol.h"
-
-@@ -148,6 +149,7 @@ struct ivi_compositor {
-
- bool need_ivi_output_relayout;
- struct wl_list child_process_list;
-+ struct dlm_lease *drm_lease;
- };
-
- struct ivi_surface;
---
-2.43.0
-
diff --git a/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor_git.bbappend b/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor_git.bbappend
index 3c64ce1f..e84635f4 100644
--- a/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor_git.bbappend
+++ b/meta-agl-drm-lease/dynamic-layers/meta-agl-core/recipes-graphics/agl-compositor/agl-compositor_git.bbappend
@@ -1,6 +1 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://0001-Add-drm-lease-support.patch"
-
-PACKAGECONFIG[drm-lease] = "-Ddrm-lease=true,-Ddrm-lease=false,drm-lease-manager"
PACKAGECONFIG:append = " drm-lease"