diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-04-30 11:58:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-03 15:41:39 +0100 |
commit | f3c303597694102d185713b2e709c8362e0d3bda (patch) | |
tree | 2f65de6fd42fc6752776c61e089940628fc0bca6 | |
parent | dba033caf3edf315508421f65e2f2e22c85e5990 (diff) | |
download | poky-f3c303597694102d185713b2e709c8362e0d3bda.tar.gz |
kmscube: update to latest commit
Drop a mali-specific patch that was never ported to meson or accepted
upstream.
(From OE-Core rev: a4c04903be056ec289e67a3319e9941cb506d3fa)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch | 117 | ||||
-rw-r--r-- | meta/recipes-graphics/kmscube/kmscube_git.bb | 5 |
2 files changed, 2 insertions, 120 deletions
diff --git a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch deleted file mode 100644 index a7a08f14e6..0000000000 --- a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | From a91c588b5a4122506e7fe949c37d530621bdd997 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> | ||
3 | Date: Tue, 11 Jul 2017 14:50:37 -0500 | ||
4 | Subject: [PATCH] Detect gst_bo_map/_unmap and use it (or avoid it) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Those functions are not available on libMali, thus breaking | ||
10 | builds and creating havoc. | ||
11 | |||
12 | Removing the specific parts of the code that deal with | ||
13 | gbm_bo_map() and gbm_bo_unmap() renders the kmscube utility | ||
14 | a little less useful, but still valuable. | ||
15 | |||
16 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
17 | Cc: Rob Clark <robdclark@gmail.com> | ||
18 | Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> | ||
19 | |||
20 | Upstream-Status: Submitted [https://lists.freedesktop.org/archives/mesa-dev/2017-July/163020.html] | ||
21 | Signed-off-by: Zoltan Kuscsik <zoltan.kuscsik@solution57.com> | ||
22 | --- | ||
23 | Makefile.am | 5 ++++- | ||
24 | configure.ac | 3 +++ | ||
25 | gst-decoder.c | 7 ++++++- | ||
26 | kmscube.c | 4 ++++ | ||
27 | 4 files changed, 17 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/Makefile.am b/Makefile.am | ||
30 | index ba064e4..3a0a50b 100644 | ||
31 | --- a/Makefile.am | ||
32 | +++ b/Makefile.am | ||
33 | @@ -43,7 +43,6 @@ kmscube_SOURCES = \ | ||
34 | common.c \ | ||
35 | common.h \ | ||
36 | cube-smooth.c \ | ||
37 | - cube-tex.c \ | ||
38 | drm-atomic.c \ | ||
39 | drm-common.c \ | ||
40 | drm-common.h \ | ||
41 | @@ -68,3 +67,7 @@ texturator_SOURCES = \ | ||
42 | drm-common.c \ | ||
43 | drm-legacy.c \ | ||
44 | texturator.c | ||
45 | + | ||
46 | +if ENABLE_GBM_MAP | ||
47 | +kmscube_SOURCES += cube-tex.c | ||
48 | +endif | ||
49 | diff --git a/configure.ac b/configure.ac | ||
50 | index 6be6541..3d20121 100644 | ||
51 | --- a/configure.ac | ||
52 | +++ b/configure.ac | ||
53 | @@ -49,5 +49,8 @@ if test "x$HAVE_GST" = "xyes"; then | ||
54 | fi | ||
55 | AM_CONDITIONAL(ENABLE_GST, [test "x$HAVE_GST" = "xyes"]) | ||
56 | |||
57 | +AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], []) | ||
58 | +AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"]) | ||
59 | + | ||
60 | AC_CONFIG_FILES([Makefile]) | ||
61 | AC_OUTPUT | ||
62 | diff --git a/gst-decoder.c b/gst-decoder.c | ||
63 | index 5431014..0aa7a55 100644 | ||
64 | --- a/gst-decoder.c | ||
65 | +++ b/gst-decoder.c | ||
66 | @@ -332,6 +332,7 @@ set_last_frame(struct decoder *dec, EGLImage frame, GstSample *samp) | ||
67 | dec->last_samp = samp; | ||
68 | } | ||
69 | |||
70 | +#if HAVE_GBM_BO_MAP | ||
71 | // TODO this could probably be a helper re-used by cube-tex: | ||
72 | static int | ||
73 | buf_to_fd(const struct gbm *gbm, int size, void *ptr) | ||
74 | @@ -357,6 +358,7 @@ buf_to_fd(const struct gbm *gbm, int size, void *ptr) | ||
75 | |||
76 | return fd; | ||
77 | } | ||
78 | +#endif | ||
79 | |||
80 | static EGLImage | ||
81 | buffer_to_image(struct decoder *dec, GstBuffer *buf) | ||
82 | @@ -410,12 +412,15 @@ buffer_to_image(struct decoder *dec, GstBuffer *buf) | ||
83 | |||
84 | if (is_dmabuf_mem) { | ||
85 | dmabuf_fd = dup(gst_dmabuf_memory_get_fd(mem)); | ||
86 | - } else { | ||
87 | + } | ||
88 | +#if HAVE_GBM_BO_MAP | ||
89 | + else { | ||
90 | GstMapInfo map_info; | ||
91 | gst_buffer_map(buf, &map_info, GST_MAP_READ); | ||
92 | dmabuf_fd = buf_to_fd(dec->gbm, map_info.size, map_info.data); | ||
93 | gst_buffer_unmap(buf, &map_info); | ||
94 | } | ||
95 | +#endif | ||
96 | |||
97 | if (dmabuf_fd < 0) { | ||
98 | GST_ERROR("could not obtain DMABUF FD"); | ||
99 | diff --git a/kmscube.c b/kmscube.c | ||
100 | index 81803be..e93da67 100644 | ||
101 | --- a/kmscube.c | ||
102 | +++ b/kmscube.c | ||
103 | @@ -166,7 +166,11 @@ int main(int argc, char *argv[]) | ||
104 | else if (mode == VIDEO) | ||
105 | egl = init_cube_video(gbm, video, samples); | ||
106 | else | ||
107 | +#if HAVE_GBM_BO_MAP | ||
108 | egl = init_cube_tex(gbm, mode, samples); | ||
109 | +#else | ||
110 | + printf("gbm_bo_map() support missing\n"); | ||
111 | +#endif | ||
112 | |||
113 | if (!egl) { | ||
114 | printf("failed to initialize EGL\n"); | ||
115 | -- | ||
116 | 2.22.0 | ||
117 | |||
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb b/meta/recipes-graphics/kmscube/kmscube_git.bb index a1a295f660..c72fbc61a9 100644 --- a/meta/recipes-graphics/kmscube/kmscube_git.bb +++ b/meta/recipes-graphics/kmscube/kmscube_git.bb | |||
@@ -6,9 +6,8 @@ DEPENDS = "virtual/libgles2 virtual/egl libdrm" | |||
6 | 6 | ||
7 | LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb" | 7 | LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb" |
8 | 8 | ||
9 | SRCREV = "76bb57d539cb43d267e561024c34e031bf351e04" | 9 | SRCREV = "4660a7dca6512b6e658759d00cff7d4ad2a2059d" |
10 | SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https \ | 10 | SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https" |
11 | file://detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch" | ||
12 | UPSTREAM_CHECK_COMMITS = "1" | 11 | UPSTREAM_CHECK_COMMITS = "1" |
13 | 12 | ||
14 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |