From 98d066d125af0602e09d18fc9e404099741f20d0 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Sat, 7 May 2022 10:42:53 +0200 Subject: libimxdmabuffer: Upgrade to version 1.1.2 * waf: update to 2.0.23 * dma-heap: Add support for uncached dma-heap memory imx_dma_buffer_dma_heap_allocator_new_from_fd() is a new function that partially deprecates the dma_heap_fd argument of imx_dma_buffer_dma_heap_allocator_new(). * Add sync access functions to ensure cache coherency when allocating cached DMA memory; only done by dma-heap allocator at this time * Relax buffer mapping flags checks * Add API functions to retrieve dma-heap / ION FDs Signed-off-by: Carlos Rafael Giani --- .../libimxdmabuffer/libimxdmabuffer_1.1.2.bb | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb (limited to 'recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb') diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb new file mode 100644 index 00000000..dd3b65da --- /dev/null +++ b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb @@ -0,0 +1,55 @@ +DESCRIPTION = 'Library for allocating and managing physically contiguous memory \ + ("DMA memory" or "DMA buffers") on i.MX devices.' +HOMEPAGE = "https://github.com/Freescale/libimxdmabuffer" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" +SECTION = "base" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "5410b44fb0c5bbd9fb1f3ba0681e65068d8cde57" +SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH};protocol=https \ + file://0001-g2d-Fix-typo.patch \ + file://run-ptest \ + " + + +S = "${WORKDIR}/git" + +inherit pkgconfig waf use-imx-headers ptest + +# dma-heap allocator is unavailable because it requires kernel 5.6 or newer. +EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \ + --libdir=${libdir} \ + --with-dma-heap-allocator=no \ + ${PACKAGECONFIG_CONFARGS}" + +# If imxdpu is in use, the DPU is also used for implementing +# libg2d. However, that implementation's g2d_alloc() function +# is broken, so we cannot use it. +LIBG2D_PACKAGECONFIG = "g2d" +LIBG2D_PACKAGECONFIG_imxdpu = "" + +PACKAGECONFIG ?= " ion " +PACKAGECONFIG_append_imxgpu2d = " ${LIBG2D_PACKAGECONFIG}" +PACKAGECONFIG_append_imxipu = " ipu" +PACKAGECONFIG_append_imxpxp = " pxp" +PACKAGECONFIG_append_mx8m = " dwl" + +HANTRO_CONF = "--hantro-headers-path=${STAGING_INCDIR}/hantro_dec --hantro-decoder-version=G2" + +PACKAGECONFIG[dwl] = "--with-dwl-allocator=yes ${HANTRO_CONF},--with-dwl-allocator=no,imx-vpu-hantro" +PACKAGECONFIG[ion] = "--with-ion-allocator=yes, --with-ion-allocator=no," +PACKAGECONFIG[ipu] = "--with-ipu-allocator=yes, --with-ipu-allocator=no," +PACKAGECONFIG[g2d] = "--with-g2d-allocator=yes, --with-g2d-allocator=no,virtual/libg2d" +PACKAGECONFIG[pxp] = "--with-pxp-allocator=yes, --with-pxp-allocator=no," + +# Using do_install_ptest_base instead of do_install_ptest, since +# the default do_install_ptest_base is hardcoded to expect Makefiles. +do_install_ptest_base() { + install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest + install -m 0755 ${B}/test-alloc ${D}${PTEST_PATH} +} + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" -- cgit v1.2.3-54-g00ecf