summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandolph Sapp <rs@ti.com>2024-10-11 15:26:35 -0500
committerSteve Sakoman <steve@sakoman.com>2024-10-24 06:31:58 -0700
commitc2dcb5102c4b80d74550c779ed61228e75686d5f (patch)
treeba0e397556943b0a5c78332985c7ab613925ef50
parentdfe311ef7a1809a595d1d6efdff23800b7343b73 (diff)
downloadpoky-c2dcb5102c4b80d74550c779ed61228e75686d5f.tar.gz
kmscube: create_framebuffer: backport modifier fix
Backport the upstream buffer modifier fix for create_framebuffer to handle the case where no valid modifiers are available. (From OE-Core rev: 983e3efb51ab22f1fa5f90cbbfba2d701aa425fc) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-graphics/kmscube/kmscube/0001-drm-common.c-do-not-use-invalid-modifier.patch31
-rw-r--r--meta/recipes-graphics/kmscube/kmscube_git.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-graphics/kmscube/kmscube/0001-drm-common.c-do-not-use-invalid-modifier.patch b/meta/recipes-graphics/kmscube/kmscube/0001-drm-common.c-do-not-use-invalid-modifier.patch
new file mode 100644
index 0000000000..dff2f20613
--- /dev/null
+++ b/meta/recipes-graphics/kmscube/kmscube/0001-drm-common.c-do-not-use-invalid-modifier.patch
@@ -0,0 +1,31 @@
1From 23e3ab9b32258bfffd302769fdd290008da8277e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 8 Aug 2022 20:22:39 +0200
4Subject: [PATCH] drm-common.c: do not use invalid modifier
5
6Prior to kernel 5.19 this was a soft failure, but 5.19
7adds checks that result in a hard syscall fail.
8
9Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/kmscube/-/commit/23e3ab9b32258bfffd302769fdd290008da8277e]
10Signed-off-by: Randolph Sapp <rs@ti.com>
11
12---
13 drm-common.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/drm-common.c b/drm-common.c
17index eb5ac20..e736922 100644
18--- a/drm-common.c
19+++ b/drm-common.c
20@@ -92,7 +92,7 @@ struct drm_fb * drm_fb_get_from_bo(struct gbm_bo *bo)
21 modifiers[i] = modifiers[0];
22 }
23
24- if (modifiers[0]) {
25+ if (modifiers[0] && modifiers[0] != DRM_FORMAT_MOD_INVALID) {
26 flags = DRM_MODE_FB_MODIFIERS;
27 printf("Using modifier %" PRIx64 "\n", modifiers[0]);
28 }
29--
302.46.0
31
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb b/meta/recipes-graphics/kmscube/kmscube_git.bb
index 40c5a14492..4051058128 100644
--- a/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -14,6 +14,7 @@ SRCREV = "9f63f359fab1b5d8e862508e4e51c9dfe339ccb0"
14SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \ 14SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \
15 file://0001-texturator-Use-correct-GL-extension-header.patch \ 15 file://0001-texturator-Use-correct-GL-extension-header.patch \
16 file://0001-common-fix-cast-type-in-init_egl.patch \ 16 file://0001-common-fix-cast-type-in-init_egl.patch \
17 file://0001-drm-common.c-do-not-use-invalid-modifier.patch \
17" 18"
18UPSTREAM_CHECK_COMMITS = "1" 19UPSTREAM_CHECK_COMMITS = "1"
19 20