summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/drm
diff options
context:
space:
mode:
authorMihai Lindner <mihai.lindner@nxp.com>2019-12-16 15:18:37 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2019-12-16 14:06:39 -0300
commit708cf0744cd073f6964cb5f3684ea45d30701c2c (patch)
tree33eb1ee63b62636f9dfa857389b2380ea6b3fd21 /recipes-graphics/drm
parenta4fdb4074644bda09b46490163886065b4c00aab (diff)
downloadmeta-freescale-708cf0744cd073f6964cb5f3684ea45d30701c2c.tar.gz
libdrm: Upgrade to 2.4.99.imx
Refresh recipe base from poky, drops patches no longer used. Signed-off-by: Mihai Lindner <mihai.lindner@nxp.com>
Diffstat (limited to 'recipes-graphics/drm')
-rw-r--r--recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch54
-rw-r--r--recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch24
-rw-r--r--recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch35
-rw-r--r--recipes-graphics/drm/libdrm/installtests.patch25
-rw-r--r--recipes-graphics/drm/libdrm/musl-ioctl.patch35
-rw-r--r--recipes-graphics/drm/libdrm_%.bbappend5
-rw-r--r--recipes-graphics/drm/libdrm_2.4.99.imx.bb (renamed from recipes-graphics/drm/libdrm_2.4.91.imx.bb)49
7 files changed, 62 insertions, 165 deletions
diff --git a/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
deleted file mode 100644
index fa7b218e..00000000
--- a/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From 9be904a70e6b7e6b3cc4e1b270bca02d14a4179b Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 5 Sep 2016 14:41:37 +0300
4Subject: [PATCH] configure.ac: Allow explicit enabling of cunit tests
5
6Add --with-cunit to make it easier to do reproducible builds. Default
7is still to probe cunit and build opportunistically.
8
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10Upstream-Status: Submitted [mailing list]
11
12---
13 configure.ac | 14 ++++++++++++--
14 1 file changed, 12 insertions(+), 2 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index 1341f51..bef46e0 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -168,6 +168,12 @@ AC_ARG_ENABLE(install-test-programs,
21 [Install test programs (default: no)]),
22 [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
23
24+AC_ARG_WITH([cunit],
25+ [AS_HELP_STRING([--with-cunit],
26+ [Build tests that use cunit (default: auto)])],
27+ [],
28+ [with_cunit=auto])
29+
30 dnl ===========================================================================
31 dnl check compiler flags
32 AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
33@@ -416,7 +422,7 @@ else
34 AC_DEFINE(HAVE_RADEON, 0)
35 fi
36
37-if test "x$AMDGPU" != xno; then
38+if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then
39 # Detect cunit library
40 PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
41 # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
42@@ -441,7 +447,11 @@ if test "x$AMDGPU" = xyes; then
43 AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support])
44
45 if test "x$have_cunit" = "xno"; then
46- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
47+ if test "x$with_cunit" = "xyes"; then
48+ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given])
49+ elif test "x$with_cunit" = "xauto"; then
50+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
51+ fi
52 fi
53 else
54 AC_DEFINE(HAVE_AMDGPU, 0)
diff --git a/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
deleted file mode 100644
index 4708bf1e..00000000
--- a/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1drmdevice.c: define _GNU_SOURCE
2
3Include config.h to fix this build error with uclibc:
4
5libdrm-2.4.66/tests/drmdevice.c: In function 'main':
6libdrm-2.4.66/tests/drmdevice.c:96:60: error:
7'O_CLOEXEC' undeclared (first use in this function)
8fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0);
9
10Upstream-Status: Pending
11
12Signed-off-by: Maxin B. John <maxin.john@intel.com>
13---
14diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c
15--- libdrm-2.4.66-orig/tests/drmdevice.c 2016-02-23 11:34:02.054904502 +0200
16+++ libdrm-2.4.66/tests/drmdevice.c 2016-02-23 11:35:34.371750383 +0200
17@@ -21,6 +21,7 @@
18 *
19 */
20
21+#include <config.h>
22 #include <errno.h>
23 #include <stdio.h>
24 #include <stdlib.h>
diff --git a/recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch b/recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch
deleted file mode 100644
index 1160cd10..00000000
--- a/recipes-graphics/drm/libdrm/imxgpu2d/drm-update-arm.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Add ARM support into xf86arm.h. This provides support for Xorg interface.
2Without this the vivante samples will hang during close requiring a reboot
3
4Upstream-Status: Pending
5
6Signed-off-by: Lauren Post <lauren.post@freescale.com>
7Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
8
9diff --git a/xf86drm.h b/xf86drm.h
10--- a/xf86drm.h
11+++ b/xf86drm.h
12@@ -461,6 +461,23 @@ do { register unsigned int __old __asm("
13 : "cr0", "memory"); \
14 } while (0)
15
16+#elif defined(__arm__)
17+ #undef DRM_DEV_MODE
18+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
19+
20+ #define DRM_CAS(lock,old,new,__ret) \
21+ do { \
22+ __asm__ __volatile__ ( \
23+ "1: ldrex %0, [%1]\n" \
24+ " teq %0, %2\n" \
25+ " ite eq\n" \
26+ " strexeq %0, %3, [%1]\n" \
27+ " movne %0, #1\n" \
28+ : "=&r" (__ret) \
29+ : "r" (lock), "r" (old), "r" (new) \
30+ : "cc","memory"); \
31+ } while (0)
32+
33 #endif /* architecture */
34 #endif /* __GNUC__ >= 2 */
35
diff --git a/recipes-graphics/drm/libdrm/installtests.patch b/recipes-graphics/drm/libdrm/installtests.patch
deleted file mode 100644
index ec1fb023..00000000
--- a/recipes-graphics/drm/libdrm/installtests.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Tue, 21 Feb 2017 14:37:52 +0200
4Subject: [PATCH] tests: also install test apps
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Yu Ke <ke.yu@intel.com>
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10---
11 tests/Makefile.am | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/tests/Makefile.am b/tests/Makefile.am
15index 0355a92..b4882cd 100644
16--- a/tests/Makefile.am
17+++ b/tests/Makefile.am
18@@ -45,3 +45,4 @@ TESTS = \
19 check_PROGRAMS = \
20 $(TESTS) \
21 drmdevice
22+bin_PROGRAMS = $(check_PROGRAMS)
23--
242.1.4
25
diff --git a/recipes-graphics/drm/libdrm/musl-ioctl.patch b/recipes-graphics/drm/libdrm/musl-ioctl.patch
new file mode 100644
index 00000000..e3d6c5b8
--- /dev/null
+++ b/recipes-graphics/drm/libdrm/musl-ioctl.patch
@@ -0,0 +1,35 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 46c0fd6c827a8cb4d04e067bf04fab579ac4712e Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Mon, 18 Jun 2018 15:07:03 +0100
7Subject: [PATCH] tests/nouveau/threaded: adapt ioctl signature
8
9POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to
10use (int, unsigned long int, ...) instead.
11
12Use a #ifdef to adapt the replacement function as appropriate.
13---
14 tests/nouveau/threaded.c | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c
18index 3669bcd3..e1c27c01 100644
19--- a/tests/nouveau/threaded.c
20+++ b/tests/nouveau/threaded.c
21@@ -36,7 +36,11 @@ static int failed;
22
23 static int import_fd;
24
25+#ifdef __GLIBC__
26 int ioctl(int fd, unsigned long request, ...)
27+#else
28+int ioctl(int fd, int request, ...)
29+#endif
30 {
31 va_list va;
32 int ret;
33--
342.11.0
35
diff --git a/recipes-graphics/drm/libdrm_%.bbappend b/recipes-graphics/drm/libdrm_%.bbappend
deleted file mode 100644
index 97b6df92..00000000
--- a/recipes-graphics/drm/libdrm_%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI_append_imxgpu2d = " file://drm-update-arm.patch"
4
5PACKAGE_ARCH_imxgpu2d = "${MACHINE_SOCARCH}"
diff --git a/recipes-graphics/drm/libdrm_2.4.91.imx.bb b/recipes-graphics/drm/libdrm_2.4.99.imx.bb
index 0a2d41a3..fb0d235b 100644
--- a/recipes-graphics/drm/libdrm_2.4.91.imx.bb
+++ b/recipes-graphics/drm/libdrm_2.4.99.imx.bb
@@ -8,31 +8,38 @@ SECTION = "x11/base"
8LICENSE = "MIT" 8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" 9LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
10PROVIDES = "drm" 10PROVIDES = "drm"
11DEPENDS = "libpthread-stubs libpciaccess" 11DEPENDS = "libpthread-stubs"
12 12
13IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1" 13IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1"
14IMX_LIBDRM_BRANCH = "libdrm-imx-2.4.91" 14IMX_LIBDRM_BRANCH ?= "libdrm-imx-2.4.99"
15SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \ 15SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \
16 file://installtests.patch \ 16 file://musl-ioctl.patch"
17 file://fix_O_CLOEXEC_undeclared.patch \ 17SRCREV = "5748c8ff40f1ae87487c01e580f145a43542cbda"
18 file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
19 "
20SRC_URI_remove = "file://drm-update-arm.patch"
21SRCREV = "95645843f59495387a072d48374718f22e69d7a4"
22S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
23 19
24DEFAULT_PREFERENCE = "-1" 20DEFAULT_PREFERENCE = "-1"
25 21
26inherit autotools pkgconfig manpages 22inherit meson pkgconfig manpages
27 23
28EXTRA_OECONF += "--disable-cairo-tests \ 24PACKAGECONFIG ??= "libkms intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv install-test-programs"
29 --without-cunit \ 25PACKAGECONFIG[libkms] = "-Dlibkms=true,-Dlibkms=false"
30 --enable-omap-experimental-api \ 26PACKAGECONFIG[intel] = "-Dintel=true,-Dintel=false,libpciaccess"
31 --enable-etnaviv-experimental-api \ 27PACKAGECONFIG[radeon] = "-Dradeon=true,-Dradeon=false"
32 --enable-install-test-programs \ 28PACKAGECONFIG[amdgpu] = "-Damdgpu=true,-Damdgpu=false"
33 --disable-valgrind \ 29PACKAGECONFIG[nouveau] = "-Dnouveau=true,-Dnouveau=false"
34 " 30PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=true,-Dvmwgfx=false"
35PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" 31PACKAGECONFIG[omap] = "-Domap=true,-Domap=false"
32PACKAGECONFIG[exynos] = "-Dexynos=true,-Dexynos=false"
33PACKAGECONFIG[freedreno] = "-Dfreedreno=true,-Dfreedreno=false"
34PACKAGECONFIG[tegra] = "-Dtegra=true,-Dtegra=false"
35PACKAGECONFIG[vc4] = "-Dvc4=true,-Dvc4=false"
36PACKAGECONFIG[etnaviv] = "-Detnaviv=true,-Detnaviv=false"
37PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false"
38PACKAGECONFIG[valgrind] = "-Dvalgrind=true,-Dvalgrind=false,valgrind"
39PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false"
40PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=true,-Dcairo-tests=false"
41PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev"
42PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native"
36 43
37ALLOW_EMPTY_${PN}-drivers = "1" 44ALLOW_EMPTY_${PN}-drivers = "1"
38PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ 45PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
@@ -51,15 +58,13 @@ FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
51FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" 58FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
52FILES_${PN}-kms = "${libdir}/libkms*.so.*" 59FILES_${PN}-kms = "${libdir}/libkms*.so.*"
53FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" 60FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
54FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*" 61FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids"
55FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" 62FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
56 63
57EXTRA_OECONF_append_imxgpu = " --enable-vivante-experimental-api" 64BBCLASSEXTEND = "native nativesdk"
58
59PACKAGES_prepend_imxgpu = "${PN}-vivante "
60 65
66PACKAGES_append_imxgpu = " ${PN}-vivante"
61RRECOMMENDS_${PN}-drivers_append_imxgpu = " ${PN}-vivante" 67RRECOMMENDS_${PN}-drivers_append_imxgpu = " ${PN}-vivante"
62
63FILES_${PN}-vivante = "${libdir}/libdrm_vivante.so.*" 68FILES_${PN}-vivante = "${libdir}/libdrm_vivante.so.*"
64 69
65PACKAGE_ARCH = "${MACHINE_SOCARCH}" 70PACKAGE_ARCH = "${MACHINE_SOCARCH}"