summaryrefslogtreecommitdiffstats
path: root/meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-04-23 20:25:45 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-09 08:13:10 +0900
commitb3e49987c5706612ee342c685dea799be596df6a (patch)
tree7c4e724755638a387fa7bf555e050f59be81fbbe /meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch
parenta070ad4db8e4a35fc34b0610b56dcfc1e2caaad3 (diff)
Enable drm-lease support at psplash
The upstream version of psplash is supporting fb based splash screen. On the other hand, drm lease infrastructure is not support fb. This patch enable drm-lease support at psplash. This work contributed by Hiroyuki Ishii at CES2023 demo development. Bug-AGL: SPEC-4766 Change-Id: I50b382c7f8ca4b46a8fb06fd649d0cfa49800c6d Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch')
-rw-r--r--meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch b/meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch
new file mode 100644
index 00000000..e1e171fc
--- /dev/null
+++ b/meta-agl-drm-lease/recipes-core/psplash/files/0013-Reverse-modeset_list.patch
@@ -0,0 +1,48 @@
+From 6a73289e30a8b60c65f49ac477e35fd3302bafe0 Mon Sep 17 00:00:00 2001
+From: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
+Date: Mon, 25 Apr 2022 10:59:52 +0300
+Subject: [PATCH 13/17] Reverse modeset_list
+
+Now, it has the same order as connectors in drmModeGetResources. As
+result splash screen will be drawn on the first connector.
+
+drm-backend backport from:
+https://patchwork.yoctoproject.org/project/yocto/cover/20220425075954.10427-1-vasyl.vavrychuk@opensynergy.com/
+
+Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
+---
+ psplash-drm.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/psplash-drm.c b/psplash-drm.c
+index 30850ed..2468cf1 100644
+--- a/psplash-drm.c
++++ b/psplash-drm.c
+@@ -185,7 +185,7 @@ static int modeset_prepare(int fd)
+ drmModeRes *res;
+ drmModeConnector *conn;
+ int i;
+- struct modeset_dev *dev;
++ struct modeset_dev *dev, *last_dev = NULL;
+ int ret;
+
+ /* retrieve resources */
+@@ -226,8 +226,13 @@ static int modeset_prepare(int fd)
+
+ /* free connector data and link device into global list */
+ drmModeFreeConnector(conn);
+- dev->next = modeset_list;
+- modeset_list = dev;
++ if (last_dev == NULL) {
++ modeset_list = dev;
++ last_dev = dev;
++ } else {
++ last_dev->next = dev;
++ last_dev = dev;
++ }
+ }
+
+ /* free resources again */
+--
+2.25.1
+