summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Rafael Giani <crg7475@mailbox.org>2022-03-30 22:55:33 +0200
committerCarlos Rafael Giani <crg7475@mailbox.org>2022-03-30 23:54:14 +0200
commita81a6bb88e1887cb6a09605ebbacb2e12dc1e36e (patch)
tree5a07497edfbbf0712a20809c81fb7f60da36e79a
parent075df4defc1f3903f323f2c9b028834d8f316799 (diff)
downloadmeta-freescale-a81a6bb88e1887cb6a09605ebbacb2e12dc1e36e.tar.gz
libimxdmabuffer: Upgrade to version 1.1.0
* Add dma-heap allocator * Documentation and typo fixes * Use RW flags in ION allocator if no mapping flags are specified * Add checks for attempts to map already mapped buffers with different flags than in the original mapping Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
-rw-r--r--recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb54
-rw-r--r--recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.0.bb65
2 files changed, 65 insertions, 54 deletions
diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb
deleted file mode 100644
index 7589e514..00000000
--- a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb
+++ /dev/null
@@ -1,54 +0,0 @@
1DESCRIPTION = 'Library for allocating and managing physically contiguous memory \
2 ("DMA memory" or "DMA buffers") on i.MX devices.'
3HOMEPAGE = "https://github.com/Freescale/libimxdmabuffer"
4LICENSE = "LGPL-2.1-only"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324"
6SECTION = "base"
7
8PV .= "+git${SRCPV}"
9
10SRCBRANCH ?= "master"
11SRCREV = "d2058aa404ee1e8e8abd552c6a637787bcdcf514"
12SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH};protocol=https \
13 file://run-ptest \
14 "
15
16
17S = "${WORKDIR}/git"
18
19inherit pkgconfig waf use-imx-headers ptest
20
21EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \
22 --libdir=${libdir} \
23 ${PACKAGECONFIG_CONFARGS}"
24
25# If imxdpu is in use, the DPU is also used for implementing
26# libg2d. However, that implementation's g2d_alloc() function
27# is broken, so we cannot use it.
28LIBG2D_PACKAGECONFIG = "g2d"
29LIBG2D_PACKAGECONFIG:imxdpu = ""
30
31PACKAGECONFIG ?= " "
32PACKAGECONFIG:append:imxgpu2d = " ${LIBG2D_PACKAGECONFIG}"
33PACKAGECONFIG:append:imxipu = " ipu"
34PACKAGECONFIG:append:imxpxp = " pxp"
35PACKAGECONFIG:append:mx8m-nxp-bsp = " ion dwl"
36PACKAGECONFIG:append:mx8qm-nxp-bsp = " ion"
37PACKAGECONFIG:append:mx8qxp-nxp-bsp = " ion"
38
39HANTRO_CONF = "--hantro-headers-path=${STAGING_INCDIR}/hantro_dec --hantro-decoder-version=G2"
40
41PACKAGECONFIG[dwl] = "--with-dwl-allocator=yes ${HANTRO_CONF},--with-dwl-allocator=no,imx-vpu-hantro"
42PACKAGECONFIG[ion] = "--with-ion-allocator=yes, --with-ion-allocator=no,"
43PACKAGECONFIG[ipu] = "--with-ipu-allocator=yes, --with-ipu-allocator=no,"
44PACKAGECONFIG[g2d] = "--with-g2d-allocator=yes, --with-g2d-allocator=no,virtual/libg2d"
45PACKAGECONFIG[pxp] = "--with-pxp-allocator=yes, --with-pxp-allocator=no,"
46
47# Using do_install_ptest_base instead of do_install_ptest, since
48# the default do_install_ptest_base is hardcoded to expect Makefiles.
49do_install_ptest_base() {
50 install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
51 install -m 0755 ${B}/test-alloc ${D}${PTEST_PATH}
52}
53
54COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.0.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.0.bb
new file mode 100644
index 00000000..3b820ed6
--- /dev/null
+++ b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.0.bb
@@ -0,0 +1,65 @@
1DESCRIPTION = 'Library for allocating and managing physically contiguous memory \
2 ("DMA memory" or "DMA buffers") on i.MX devices.'
3HOMEPAGE = "https://github.com/Freescale/libimxdmabuffer"
4LICENSE = "LGPL-2.1-only"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324"
6SECTION = "base"
7
8PV .= "+git${SRCPV}"
9
10SRCBRANCH ?= "master"
11SRCREV = "5e15481b71468e689f7529d7609dc31790275504"
12SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH};protocol=https \
13 file://run-ptest \
14 "
15
16
17S = "${WORKDIR}/git"
18
19inherit pkgconfig waf use-imx-headers ptest
20
21# Device node path to the DMA-BUF heap to use in the dma-heap allocator.
22# This must be one that allocates physically contiguous memory, otherwise
23# it cannot allocate usable DMA buffers.
24DMA_HEAP_DEVICE_NODE_PATH = "/dev/dma_heap/linux,cma"
25
26EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \
27 --dma-heap-device-node-path=${DMA_HEAP_DEVICE_NODE_PATH} \
28 --libdir=${libdir} \
29 ${PACKAGECONFIG_CONFARGS}"
30
31# If imxdpu is in use, the DPU is also used for implementing
32# libg2d. However, that implementation's g2d_alloc() function
33# is broken, so we cannot use it.
34LIBG2D_PACKAGECONFIG = "g2d"
35LIBG2D_PACKAGECONFIG:imxdpu = ""
36
37PACKAGECONFIG ?= " "
38PACKAGECONFIG:append:imxgpu2d = " ${LIBG2D_PACKAGECONFIG}"
39PACKAGECONFIG:append:imxipu = " ipu"
40PACKAGECONFIG:append:imxpxp = " pxp"
41# All i.MX8 machines can use the dma-heap allocator. i.MX8m ones
42# can also use the DWL allocator, though dma-heap is preferred.
43# Vendor kernels that are older than kernel 5.6 cannot use
44# dma-heap, however, and should use ion instead, since the
45# former is not available pre-5.6.
46PACKAGECONFIG:append:mx8-nxp-bsp = " dma-heap"
47PACKAGECONFIG:append:mx8m-nxp-bsp = " dwl"
48
49HANTRO_CONF = "--hantro-headers-path=${STAGING_INCDIR}/hantro_dec --hantro-decoder-version=G2"
50
51PACKAGECONFIG[dwl] = "--with-dwl-allocator=yes ${HANTRO_CONF},--with-dwl-allocator=no,imx-vpu-hantro"
52PACKAGECONFIG[ion] = "--with-ion-allocator=yes, --with-ion-allocator=no,"
53PACKAGECONFIG[ipu] = "--with-ipu-allocator=yes, --with-ipu-allocator=no,"
54PACKAGECONFIG[g2d] = "--with-g2d-allocator=yes, --with-g2d-allocator=no,virtual/libg2d"
55PACKAGECONFIG[pxp] = "--with-pxp-allocator=yes, --with-pxp-allocator=no,"
56PACKAGECONFIG[dma-heap] = "--with-dma-heap-allocator=yes, --with-dma-heap-allocator=no,"
57
58# Using do_install_ptest_base instead of do_install_ptest, since
59# the default do_install_ptest_base is hardcoded to expect Makefiles.
60do_install_ptest_base() {
61 install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
62 install -m 0755 ${B}/test-alloc ${D}${PTEST_PATH}
63}
64
65COMPATIBLE_MACHINE = "(imx-nxp-bsp)"