From c9a6a16927e98afb18cb8bd31a0f1d64d0f58b03 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Sun, 30 Jul 2023 13:48:05 +0200 Subject: libimxdmabuffer: Upgrade to version 1.1.3 * waf: update to 2.0.25 * g2d: Fix typo in G2D allocator that caused build errors * Don't check for mxcfb.h in build script mxcfb.h is no longer present in some sysroots anymore, so it is not a reliable way for verifying the imx linux headers path. Just use the path directly; if it is wrong, the build will fail anyway. Signed-off-by: Carlos Rafael Giani (cherry picked from commit 568cdfec59a93c93279397a1a839bd01d89ed453) --- .../libimxdmabuffer/files/0001-g2d-Fix-typo.patch | 28 ------- .../libimxdmabuffer/libimxdmabuffer_1.1.2.bb | 90 ---------------------- .../libimxdmabuffer/libimxdmabuffer_1.1.3.bb | 89 +++++++++++++++++++++ 3 files changed, 89 insertions(+), 118 deletions(-) delete mode 100644 recipes-bsp/libimxdmabuffer/files/0001-g2d-Fix-typo.patch delete mode 100644 recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb create mode 100644 recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb diff --git a/recipes-bsp/libimxdmabuffer/files/0001-g2d-Fix-typo.patch b/recipes-bsp/libimxdmabuffer/files/0001-g2d-Fix-typo.patch deleted file mode 100644 index 490d3a2f..00000000 --- a/recipes-bsp/libimxdmabuffer/files/0001-g2d-Fix-typo.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 41825b11289be251fed64470893d18b89b0dd38b Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani -Date: Sun, 8 May 2022 16:25:44 +0200 -Subject: [PATCH] g2d: Fix typo - -Signed-off-by: Carlos Rafael Giani - -Upstream-Status: Backport [41825b11289be251fed64470893d18b89b0dd38b] ---- - imxdmabuffer/imxdmabuffer_g2d_allocator.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/imxdmabuffer/imxdmabuffer_g2d_allocator.c b/imxdmabuffer/imxdmabuffer_g2d_allocator.c -index f10a909..497dcea 100644 ---- a/imxdmabuffer/imxdmabuffer_g2d_allocator.c -+++ b/imxdmabuffer/imxdmabuffer_g2d_allocator.c -@@ -139,7 +139,7 @@ static uint8_t* imx_dma_buffer_g2d_allocator_map(ImxDmaBufferAllocator *allocato - * (Other allocators perform more steps than this.) */ - if (imx_g2d_buffer->mapping_refcount > 0) - { -- assert((imx_dwl_buffer->map_flags & flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK) == (flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK)); -+ assert((imx_g2d_buffer->map_flags & flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK) == (flags & IMX_DMA_BUFFER_MAPPING_READWRITE_FLAG_MASK)); - imx_g2d_buffer->mapping_refcount++; - } - else --- -2.32.0 - diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb deleted file mode 100644 index 090593be..00000000 --- a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.2.bb +++ /dev/null @@ -1,90 +0,0 @@ -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 = "LGPL-2.1-only" -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 - -EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \ - --libdir=${libdir} \ - ${@bb.utils.contains_any('PACKAGECONFIG', \ - [ 'dma-heap-cached', 'dma-heap-uncached' ], \ - '', '--with-dma-heap-allocator=no',d)} \ - ${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 = "" - -# The dma-heap allocator is special in that it can use more than one heap device -# node. In libimxdmabuffer, only heaps that allocate physically contiguous memory -# can be used, otherwise usable DMA buffers cannot be allocated. Furthermore, -# on NXP machines, there is a dma-heap for cached and one for uncached memory. -# -# One of them has to be selected by choosing either the "dma-heap-cached" or the -# "dma-heap-uncached" PACKAGECONFIG. The uncached one is picked by default for -# performance reasons (it does not suffer from cache coherence issues). -# -# Note that the uncached heap is not available prior to imx-kernel 5.15.5; -# older kernels can only use the cached one. - -CACHED_DMA_HEAP_DEVICE_NODE_PATH = "/dev/dma_heap/linux,cma" -UNCACHED_DMA_HEAP_DEVICE_NODE_PATH = "/dev/dma_heap/linux,cma-uncached" - -CACHED_DMA_HEAP_CONF = "--dma-heap-device-node-path=${CACHED_DMA_HEAP_DEVICE_NODE_PATH}" -UNCACHED_DMA_HEAP_CONF = "--dma-heap-device-node-path=${UNCACHED_DMA_HEAP_DEVICE_NODE_PATH} \ - --dma-heap-uncached-memory" - -PACKAGECONFIG ?= " " -PACKAGECONFIG:append:imxgpu2d = " ${LIBG2D_PACKAGECONFIG}" -PACKAGECONFIG:append:imxipu = " ipu" -PACKAGECONFIG:append:imxpxp = " pxp" -# All i.MX8 machines can use the dma-heap allocator. i.MX8m ones -# can also use the DWL allocator, though dma-heap is preferred. -# Vendor kernels that are older than kernel 5.6 cannot use -# dma-heap, however, and should use ion instead, since the -# former is not available pre-5.6. Out of the dma-heaps, we -# pick the uncached one by default (see above). -PACKAGECONFIG:append:mx8-nxp-bsp = " dma-heap-uncached" -PACKAGECONFIG:append:mx8m-nxp-bsp = " 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," -# --with-dma-heap-allocator=no is not added by these packageconfigs. -# Otherwise, it would always be added, since only one of these two -# dma-heap-* packageconfigs can be selected. Instead, that switch -# is added to EXTRA_OECONF above. -PACKAGECONFIG[dma-heap-cached] = "--with-dma-heap-allocator=yes ${CACHED_DMA_HEAP_CONF}, \ - ,,,,dma-heap-uncached" -PACKAGECONFIG[dma-heap-uncached] = "--with-dma-heap-allocator=yes ${UNCACHED_DMA_HEAP_CONF}, \ - ,,,,dma-heap-cached" - -# 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 = "(imx-nxp-bsp)" diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb new file mode 100644 index 00000000..b160c31d --- /dev/null +++ b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb @@ -0,0 +1,89 @@ +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 = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" +SECTION = "base" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "faf547cc2345bfbf95507ab7e86530f85289bb5b" +SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH};protocol=https \ + file://run-ptest \ + " + + +S = "${WORKDIR}/git" + +inherit pkgconfig waf use-imx-headers ptest + +EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \ + --libdir=${libdir} \ + ${@bb.utils.contains_any('PACKAGECONFIG', \ + [ 'dma-heap-cached', 'dma-heap-uncached' ], \ + '', '--with-dma-heap-allocator=no',d)} \ + ${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 = "" + +# The dma-heap allocator is special in that it can use more than one heap device +# node. In libimxdmabuffer, only heaps that allocate physically contiguous memory +# can be used, otherwise usable DMA buffers cannot be allocated. Furthermore, +# on NXP machines, there is a dma-heap for cached and one for uncached memory. +# +# One of them has to be selected by choosing either the "dma-heap-cached" or the +# "dma-heap-uncached" PACKAGECONFIG. The uncached one is picked by default for +# performance reasons (it does not suffer from cache coherence issues). +# +# Note that the uncached heap is not available prior to imx-kernel 5.15.5; +# older kernels can only use the cached one. + +CACHED_DMA_HEAP_DEVICE_NODE_PATH = "/dev/dma_heap/linux,cma" +UNCACHED_DMA_HEAP_DEVICE_NODE_PATH = "/dev/dma_heap/linux,cma-uncached" + +CACHED_DMA_HEAP_CONF = "--dma-heap-device-node-path=${CACHED_DMA_HEAP_DEVICE_NODE_PATH}" +UNCACHED_DMA_HEAP_CONF = "--dma-heap-device-node-path=${UNCACHED_DMA_HEAP_DEVICE_NODE_PATH} \ + --dma-heap-uncached-memory" + +PACKAGECONFIG ?= " " +PACKAGECONFIG:append:imxgpu2d = " ${LIBG2D_PACKAGECONFIG}" +PACKAGECONFIG:append:imxipu = " ipu" +PACKAGECONFIG:append:imxpxp = " pxp" +# All i.MX8 machines can use the dma-heap allocator. i.MX8m ones +# can also use the DWL allocator, though dma-heap is preferred. +# Vendor kernels that are older than kernel 5.6 cannot use +# dma-heap, however, and should use ion instead, since the +# former is not available pre-5.6. Out of the dma-heaps, we +# pick the uncached one by default (see above). +PACKAGECONFIG:append:mx8-nxp-bsp = " dma-heap-uncached" +PACKAGECONFIG:append:mx8m-nxp-bsp = " 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," +# --with-dma-heap-allocator=no is not added by these packageconfigs. +# Otherwise, it would always be added, since only one of these two +# dma-heap-* packageconfigs can be selected. Instead, that switch +# is added to EXTRA_OECONF above. +PACKAGECONFIG[dma-heap-cached] = "--with-dma-heap-allocator=yes ${CACHED_DMA_HEAP_CONF}, \ + ,,,,dma-heap-uncached" +PACKAGECONFIG[dma-heap-uncached] = "--with-dma-heap-allocator=yes ${UNCACHED_DMA_HEAP_CONF}, \ + ,,,,dma-heap-cached" + +# 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 = "(imx-nxp-bsp)" -- cgit v1.2.3-54-g00ecf From b79cdeb2a13a3f7559aefb04a9f0a4b62401b060 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Sun, 30 Jul 2023 13:56:06 +0200 Subject: libimxvpuapi2: Upgrade to version 2.3.0 * vpu: Implement first working version of VC8000E encoder integration This adds support for the Hanto VC8000E encoder that can be found on the i.MX8m plus. The VC8000E encoder integration is not finished. h.264 encoding works fine. h.265 encoding is not yet done. And, changing framerate mid-stream is currently not supported. * Replace mxcfb.h with ipu.h in option description Some BSPs no longer ship with the mxcfb.h header. * imx6-coda: Fix ENC_ENABLE_SOF_STUFF check The check was being performed incorrectly, leading to nullbytes being inserted at the end of the SOF0 marker. * imx6-coda: Insert JFIF APP0 segment The VPU does not insert this segment on its own. Some programs need JFIF data to be present in JPEG files, so insert APP0 manually. * imx6-coda: Fix decoder and encoder alignments * imx6-coda: Add more IPU detiler logging * imx6-coda: Fix decoder Y/U/V offset alignments As it turns out, these must be aligned to 8-byte boundaries, not to 4096 byte ones. The latter caused incorrect offset calculations. Signed-off-by: Carlos Rafael Giani (cherry picked from commit 3022b7cbdfcc05bfdbe0b6b318eb9a107d9ce240) --- .../libimxvpuapi/libimxvpuapi2_2.2.2.bb | 26 ------------------- .../libimxvpuapi/libimxvpuapi2_2.3.0.bb | 29 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 26 deletions(-) delete mode 100644 recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.2.2.bb create mode 100644 recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.2.2.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.2.2.bb deleted file mode 100644 index b7f43a61..00000000 --- a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.2.2.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "frontend for the i.MX6 / i.MX8 VPU hardware video engines" -HOMEPAGE = "https://github.com/Freescale/libimxvpuapi" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" -SECTION = "multimedia" -DEPENDS = "virtual/imxvpu libimxdmabuffer" - -PV .= "+git${SRCPV}" - -SRCBRANCH ?= "master" -SRCREV = "b6486118d47937cd717c4881158dda6e72cf2855" -SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https" - -S = "${WORKDIR}/git" - -inherit waf pkgconfig use-imx-headers - -IMX_PLATFORM:mx6-nxp-bsp = "imx6" -IMX_PLATFORM:mx8mq-nxp-bsp = "imx8m" -IMX_PLATFORM:mx8mm-nxp-bsp = "imx8mm" -IMX_PLATFORM:mx8mp-nxp-bsp = "imx8m" - -EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(imxvpu)" diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb new file mode 100644 index 00000000..1e7d8252 --- /dev/null +++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "frontend for the i.MX6 / i.MX8 VPU hardware video engines" +HOMEPAGE = "https://github.com/Freescale/libimxvpuapi" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" +SECTION = "multimedia" +DEPENDS = "virtual/imxvpu libimxdmabuffer" +# Add imx-vpu-hantro-vc as dependency for being +# able to encode video using the VC8000E encoder +DEPENDS:append:mx8mp-nxp-bsp = " imx-vpu-hantro-vc" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "6f803f46d6b53a08cf02fc3d440072e01e2f3a09" +SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https" + +S = "${WORKDIR}/git" + +inherit waf pkgconfig use-imx-headers + +IMX_PLATFORM:mx6-nxp-bsp = "imx6" +IMX_PLATFORM:mx8mq-nxp-bsp = "imx8m" +IMX_PLATFORM:mx8mm-nxp-bsp = "imx8mm" +IMX_PLATFORM:mx8mp-nxp-bsp = "imx8mp" + +EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(imxvpu)" -- cgit v1.2.3-54-g00ecf From 87b289b2b09b927cc8c7bce24fa02dd94f874ea1 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Sun, 30 Jul 2023 21:53:33 +0200 Subject: gstreamer1.0-plugins-imx: Upgrade to version 2.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * imx2d: * Add 10-bit tiled NV12/21 formats and extend Imx2dPixelFormatInfo * Fix corner case when imx2d format has no GStreamer counterpart In such a case, no GStreamer format string exists, so format_str stays NULL, and the format_string_gvalue is not taken into the format_list_gvalue array. Unset it to prevent followup g_value_init() calls from failing. * Replace num_first_plane_bpp with pixel_stride pixel_stride is more useful and more intuitive in calculations, and works properly with tiled 10-bit formats. * Fix flickering when using DPU-emulated G2D rendering * Free surface during destroy * Add support for specifying colorimetry * Take into account chroma subsampling in alignments * Add special format specific stride alignment specifier * Add overlay composition support to imx2d video sinks * ipu: Add support for YUY2 (aka YUYV) * ipu: Add video sink Even though the IPU isn't actually flexible enough for use in a video sink, it can be useful for diagnostics and debugging, so add one. * g2d: Don't restrict calls to one thread if G2D is new enough * g2d: Check if Amphion tile enums are present * g2d: Enable YVYU and NV61 when using G2D newer than 1.x * g2d: Check for colorimetry support * vpu: * Raise minimum required libimxvpuapi version to 2.3.0 A number of API additions and critical bug fixes in libimxvpuapi make it essential to raise the minimum required version. * Fix case when a gap event arrives before the caps event does * Fix gst_imx_vpu_dec_drain() return type * Free element_name after registering * encoder: Add closed-gop-interval property * encoder: Handle force-keyframe-headers flag and add sync points * encoder: Fix h264/h265 AUD handling and add enable-aud property AUDs are not enabled by "au" caps. "au" instead means that buffers contain entire access units, which is what all imx6 and imx8 VPUs produce. Fix this by always setting "au" in the output caps and adding an "enable-aud" GObject property. * decoder: Add support for producing 4x4 tiled frames The 4x4 tile format is available with Hantro VPUs. Especially when using formats that are produced by the G2 VPU, using tiled formats can yield significant performance improvements, because the VPU does not have to perform internal detiling before handing over the decoded frame to the caller. The 4x4 tile format corresponds to the GStreamer NV12_4L4 format. If GStreamer is older than 1.18, this is disabled, since NV12_4L4 was introduced in 1.18.0. * decoder: When draining before setting format, don't treat EOS as error * v4l2video: * Add ISI transform and Amphion decoder elements These are meant for older imx-kernels (<5.15) that have broken drivers for V4L2 mem2mem ISI and Amphion decoder devices. These custom elements use workarounds to address the issues these drivers have. Newer kernels use different drivers that aren't broken, so the custom elements are not needed there. * v4l2videosrc: Minor logging fixes * v4l2videosrc: Support non-mxc_v4l2 devices (like USB cameras) This enables support for devices that aren't based on the mxc_v4l2 driver. Useful for being able to use the same imxv4l2videosrc element with both MIPI/CSI and USB cameras. * v4l2videosrc: Read back format with G_FMT after having set it with S_FMT Usually, the driver should set any changes in the parameters right in the S_FMT call, but some don't (they return defaults instead), so to be safe, actually issue the G_FMT ioctl instead. * v4l2videosrc: Copy bytesperline and sizeimage into videoinfo struct This is important if the driver picked a different format, since then, the originally chosen sizes and the new ones can differ significantly. * v4l2videosrc: Unref old v4l2 object before creating new one This fixes cases where a caps renegotiation happens and the old object still keeps the V4L2 device open, preventing some of the new object's ioctls from succeeding. * Added ov5645 mipi camera * v4l2videosrc: Check for V4L2_CAP_SDR_OUTPUT and V4L2_CAP_TOUCH presence * v4l2videosrc: Don't exit with error if mxc_v4l2 chip ID is not available * Add prelude header This fixes build errors due to undeclared symbols * v4l2videosrc: Don't use V4L2 sizeimage for single-planar pixel formats * Explicitly calculate plane stride and offset values * Remove pixel-aspect-ratio from probed device caps These unfixated template caps can mislead downstream fixation logic, leading to it using a PAR of 1/maxint, which in turn causes integer overflow errors. Elements do not normally specify that kind of pixel aspect ratio range, and just omit it from the template caps. * Use sys/time.h instead of time.h * imx-gst-libs: * common: Fix incorrect imx_dma_buffer_deallocate() calls If the gst_imx_dmabuf_allocator_activate() call inside alloc() fails, imx_dma_buffer_deallocate() would be called even though no imxdmabuffer was allocated. Fix this by adding an imx_dma_buffer check. * common: Add gst_imx_dmabuf_allocator_get_physical_address() * common: Misc GstImxDmaBufAllocator improvements * common: Fix gst_imx_dmabuf_allocator_wrap_dmabuf() call This function tries to get a physical address before activating the allocator. Switch this around to make this call work with allocators like the ION allocator. * common: Replace dup() with memory ref'ing in dmabuf uploader Using dup() was causing an FD leak because the dup'ed FD was not being closed correctly. But also, just using dup() risks data races because producers can still write to the same dma-buf memory that consumers are processing. Instead, ref the input dmabuf gstmemory to let the rest of the pipeline know that the gstmemory is in use. * common: Remove volatile qualifier in allocator GType This addresses the warning: warning: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier * common: Fix assertion in raw_buffer_upload_method_create() * common: Synchronize imx gstmemory access with mutexes * video: Move GstImx2dVideoBufferPool to video/ GstImx2dVideoBufferPool is not actually imx2d specific, and can be reused in other plugins. Move it to gst-libs/gst/imx/video/ for that purpose. * video: Add functions to videobufferpool for getting info * video: Add GstImxVideoDmaBufferPool * video: Set videometa plane stride & offset values in pool * video: Take into account chroma subsampling in alignments * video: Adjust video meta before doing a CPU based frame copy * video: Fix video dma buffer pool info size modifications * video: Add function for setting new video uploader alignments Signed-off-by: Carlos Rafael Giani (cherry picked from commit 92c5a2650353f18580df13e4a344a4142ab300ea) --- .../gstreamer/gstreamer1.0-plugins-imx_2.1.0.bb | 62 -------------------- .../gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb | 68 ++++++++++++++++++++++ 2 files changed, 68 insertions(+), 62 deletions(-) delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.1.0.bb create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.1.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.1.0.bb deleted file mode 100644 index fb18f1bb..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.1.0.bb +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2018 O.S. Systems Software LTDA. -DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms" -LICENSE = "LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" -SECTION = "multimedia" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libimxdmabuffer" -# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers -# for the uniaudio decoder, videoparsersbad for the VPU video decoder -# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is -# built (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS) -RDEPENDS:gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good gstreamer1.0-plugins-bad" -RDEPENDS:gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers" -RDEPENDS:gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad" - -PV .= "+git${SRCPV}" - -SRCBRANCH ?= "master" -SRCREV = "b1e5cca1a6df9d2c0dc505ae222775798108d340" -SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https" - -S = "${WORKDIR}/git" - -inherit pkgconfig meson use-imx-headers - -# libg2d on i.MX8 SoCs with a DPU is emulated via the DPU. -# That particular libg2d .so depends on libdrm, however. -# Also, due to behavioral differences, an additional flag -# is needed to improve performance. -LIBG2D_DPU_OPTION = "-Dg2d-based-on-dpu=false" -LIBG2D_DEPENDENCIES = "virtual/libg2d" -LIBG2D_DPU_OPTION:imxdpu = "-Dg2d-based-on-dpu=true" -LIBG2D_DEPENDENCIES:imxdpu = "virtual/libg2d libdrm" - -EXTRA_OEMESON += "-Dimx-headers-path=${STAGING_INCDIR_IMX}" - -PACKAGECONFIG ?= "uniaudiodec" -PACKAGECONFIG:append:imxgpu2d = " g2d" -PACKAGECONFIG:append:imxvpu = " vpu" -PACKAGECONFIG:append:imxipu = " ipu" -PACKAGECONFIG:append:imxpxp = " pxp" -# The custom imxv4l2 elements are only available on the i.MX6. -# The 2D blitter sinks require an MXC framebuffer, which -# is not available anymore on the i.MX8 (since these SoCs -# now use KMS instead of the old Linux framebuffer). -PACKAGECONFIG:append:mx6-nxp-bsp = " imx2dvideosink v4l2" -PACKAGECONFIG:append:mx7-nxp-bsp = " imx2dvideosink" - -PACKAGECONFIG[g2d] = "-Dg2d=enabled ${LIBG2D_DPU_OPTION},-Dg2d=disabled,${LIBG2D_DEPENDENCIES}" -PACKAGECONFIG[pxp] = "-Dpxp=enabled,-Dpxp=disabled," -PACKAGECONFIG[ipu] = "-Dipu=enabled,-Dipu=disabled," -PACKAGECONFIG[vpu] = "-Dvpu=enabled,-Dvpu=disabled,libimxvpuapi2" -PACKAGECONFIG[imx2dvideosink] = "-Dimx2d-videosink=true,-Dimx2d-videosink=false," -PACKAGECONFIG[v4l2] = "-Dv4l2=true,-Dv4l2=false," -PACKAGECONFIG[uniaudiodec] = "-Duniaudiodec=enabled,-Duniaudiodec=disabled,imx-codec" -PACKAGECONFIG[mp3encoder] = "-Dmp3encoder=enabled,-Dmp3encoder=disabled,imx-codec" - -require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc - -# the following line is required to produce one package for each plugin -PACKAGES_DYNAMIC = "^${PN}-.*" - -COMPATIBLE_MACHINE = "(mx6dl-nxp-bsp|mx6q-nxp-bsp|mx6sl-nxp-bsp|mx6sx-nxp-bsp|mx6ul-nxp-bsp|mx6ull-nxp-bsp|mx7d-nxp-bsp|mx8-nxp-bsp)" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb new file mode 100644 index 00000000..70ae8937 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb @@ -0,0 +1,68 @@ +# Copyright (C) 2018 O.S. Systems Software LTDA. +DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms" +LICENSE = "LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" +SECTION = "multimedia" +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libimxdmabuffer" +# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers +# for the uniaudio decoder, videoparsersbad for the VPU video decoder +# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is +# built (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS) +RDEPENDS:gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good gstreamer1.0-plugins-bad" +RDEPENDS:gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers" +RDEPENDS:gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "cb3cd45676e808b222ac573e8a118f44fd70c288" +SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https" + +S = "${WORKDIR}/git" + +inherit pkgconfig meson use-imx-headers + +# libg2d on i.MX8 SoCs with a DPU is emulated via the DPU. +# That particular libg2d .so depends on libdrm, however. +# Also, due to behavioral differences, an additional flag +# is needed to improve performance. +LIBG2D_DPU_OPTION = "-Dg2d-based-on-dpu=false" +LIBG2D_DEPENDENCIES = "virtual/libg2d" +LIBG2D_DPU_OPTION:imxdpu = "-Dg2d-based-on-dpu=true" +LIBG2D_DEPENDENCIES:imxdpu = "virtual/libg2d libdrm" + +# v4l2-amphion and v4l2-isi are meant for the Amphion Malone +# VPU decoder and the ISI drivers in older kernels, which had +# lots of bugs that required nontrivial workarounds. In the +# kernels in this release, newer drivers are present, which +# obviate the need for these special elements. +EXTRA_OEMESON += "-Dimx-headers-path=${STAGING_INCDIR_IMX} -Dv4l2-amphion=disabled -Dv4l2-isi=false" + +PACKAGECONFIG ?= "uniaudiodec" +PACKAGECONFIG:append:imxgpu2d = " g2d" +PACKAGECONFIG:append:imxvpu = " vpu" +PACKAGECONFIG:append:imxipu = " ipu" +PACKAGECONFIG:append:imxpxp = " pxp" +# The custom imxv4l2 source and sink elements are only +# available on the i.MX6. +# The 2D blitter sinks require an MXC framebuffer, which +# is not available anymore on the i.MX8 (since these SoCs +# now use KMS instead of the old Linux framebuffer). +PACKAGECONFIG:append:mx6-nxp-bsp = " imx2dvideosink v4l2-mxc-source-sink" +PACKAGECONFIG:append:mx7-nxp-bsp = " imx2dvideosink" + +PACKAGECONFIG[g2d] = "-Dg2d=enabled ${LIBG2D_DPU_OPTION},-Dg2d=disabled,${LIBG2D_DEPENDENCIES}" +PACKAGECONFIG[pxp] = "-Dpxp=enabled,-Dpxp=disabled," +PACKAGECONFIG[ipu] = "-Dipu=enabled,-Dipu=disabled," +PACKAGECONFIG[vpu] = "-Dvpu=enabled,-Dvpu=disabled,libimxvpuapi2" +PACKAGECONFIG[imx2dvideosink] = "-Dimx2d-videosink=true,-Dimx2d-videosink=false," +PACKAGECONFIG[v4l2-mxc-source-sink] = "-Dv4l2-mxc-source-sink=true,-Dv4l2-mxc-source-sink=false," +PACKAGECONFIG[uniaudiodec] = "-Duniaudiodec=enabled,-Duniaudiodec=disabled,imx-codec" +PACKAGECONFIG[mp3encoder] = "-Dmp3encoder=enabled,-Dmp3encoder=disabled,imx-codec" + +require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc + +# the following line is required to produce one package for each plugin +PACKAGES_DYNAMIC = "^${PN}-.*" + +COMPATIBLE_MACHINE = "(mx6dl-nxp-bsp|mx6q-nxp-bsp|mx6sl-nxp-bsp|mx6sx-nxp-bsp|mx6ul-nxp-bsp|mx6ull-nxp-bsp|mx7d-nxp-bsp|mx8-nxp-bsp)" -- cgit v1.2.3-54-g00ecf