diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-08-08 20:31:15 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-09 16:37:24 +0100 |
| commit | 8b99059878e9b0d1099dfaaad34d35af91d0b1ee (patch) | |
| tree | ba6f76ee3175334704f81fffe7649430830f6fc7 | |
| parent | 8bc77f0dc6a87ada8c57dd1973912fffdf982914 (diff) | |
| download | poky-8b99059878e9b0d1099dfaaad34d35af91d0b1ee.tar.gz | |
kmscube: address linux 5.19 fails
(From OE-Core rev: d169606c547796731f528c4649295c4c1c928ea4)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-graphics/kmscube/kmscube/0001-drm-common.c-do-not-use-invalid-modifier.patch | 27 | ||||
| -rw-r--r-- | meta/recipes-graphics/kmscube/kmscube_git.bb | 6 |
2 files changed, 31 insertions, 2 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..58ff3ba561 --- /dev/null +++ b/meta/recipes-graphics/kmscube/kmscube/0001-drm-common.c-do-not-use-invalid-modifier.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From bdde833c254092a47df6c7109a9751653c82aaae Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex@linutronix.de> | ||
| 3 | Date: Mon, 8 Aug 2022 20:22:39 +0200 | ||
| 4 | Subject: [PATCH] drm-common.c: do not use invalid modifier | ||
| 5 | |||
| 6 | Prior to kernel 5.19 this was a soft failure, but 5.19 | ||
| 7 | adds checks that result in a hard syscall fail. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/kmscube/-/merge_requests/33] | ||
| 10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 11 | --- | ||
| 12 | drm-common.c | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/drm-common.c b/drm-common.c | ||
| 16 | index 5c9cca2..964e1c3 100644 | ||
| 17 | --- a/drm-common.c | ||
| 18 | +++ b/drm-common.c | ||
| 19 | @@ -92,7 +92,7 @@ struct drm_fb * drm_fb_get_from_bo(struct gbm_bo *bo) | ||
| 20 | modifiers[i] = modifiers[0]; | ||
| 21 | } | ||
| 22 | |||
| 23 | - if (modifiers[0]) { | ||
| 24 | + if (modifiers[0] && modifiers[0] != DRM_FORMAT_MOD_INVALID) { | ||
| 25 | flags = DRM_MODE_FB_MODIFIERS; | ||
| 26 | printf("Using modifier %" PRIx64 "\n", modifiers[0]); | ||
| 27 | } | ||
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb b/meta/recipes-graphics/kmscube/kmscube_git.bb index 58ce26a3d5..f7ee6e4e10 100644 --- a/meta/recipes-graphics/kmscube/kmscube_git.bb +++ b/meta/recipes-graphics/kmscube/kmscube_git.bb | |||
| @@ -11,8 +11,10 @@ DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm" | |||
| 11 | LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb" | 11 | LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb" |
| 12 | 12 | ||
| 13 | SRCREV = "9f63f359fab1b5d8e862508e4e51c9dfe339ccb0" | 13 | SRCREV = "9f63f359fab1b5d8e862508e4e51c9dfe339ccb0" |
| 14 | SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https" | 14 | SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \ |
| 15 | SRC_URI += "file://0001-texturator-Use-correct-GL-extension-header.patch" | 15 | file://0001-texturator-Use-correct-GL-extension-header.patch \ |
| 16 | file://0001-drm-common.c-do-not-use-invalid-modifier.patch \ | ||
| 17 | " | ||
| 16 | UPSTREAM_CHECK_COMMITS = "1" | 18 | UPSTREAM_CHECK_COMMITS = "1" |
| 17 | 19 | ||
| 18 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
