buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Gary Bisson <bisson.gary@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/7] package/freescale-imx/imx-dpu-g2d: new package imx-dpu-g2d package is used by i.MX 8 and i.MX 8X series instead of imx-vpu or imx-vpu-hantro.With this commit, imx-dpu-g2d is added and is enabled for i.MX 8X.
Date: Mon, 10 Feb 2020 16:58:01 +0100	[thread overview]
Message-ID: <20200210155801.GB335587@p1g2.work> (raw)
In-Reply-To: <20200203193155.12657-2-tuzakli.refik@gmail.com>

Hi Refik,

Sorry but I disagree with the title/log of this commit.

This has nothing to do with vpu, it's all about g2d which is NXP
interface for 2D graphics operations (CSC, rotation etc).

On most platforms (like i.MX6 for instance) there is a 3D GPU and a 2D
GPU, so for those Vivante package was providing the libg2d libraries
that leveraged the 2D GPU.

Now on newer platform such as i.MX8X, there's no 2D GPU but the display
IP (here called DPU) can perform the 2D operations so another package
was created.

Here is where the selection is made in Yocto:
https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-bsp/conf/machine/include/imx-base.inc?h=warrior-4.19.35-1.1.0#n222

So my opinion is that, like Yocto, we should create a virtual g2d
package that either be populated by Vivante libs by the platforms that
have 2D GPU or by DPU on others.

Regards,
Gary

On Mon, Feb 03, 2020 at 10:31:50PM +0300, Refik Tuzakli wrote:
> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> ---
>  package/freescale-imx/Config.in               |  7 ++++
>  package/freescale-imx/imx-dpu-g2d/Config.in   | 23 ++++++++++++
>  .../imx-dpu-g2d/imx-dpu-g2d.hash              |  5 +++
>  .../freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk  | 37 +++++++++++++++++++
>  4 files changed, 72 insertions(+)
>  create mode 100644 package/freescale-imx/imx-dpu-g2d/Config.in
>  create mode 100644 package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash
>  create mode 100644 package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk
> 
> diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
> index d23bcdbd9a..586e67ea72 100644
> --- a/package/freescale-imx/Config.in
> +++ b/package/freescale-imx/Config.in
> @@ -75,6 +75,10 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO
>  	bool
>  	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
>  
> +config BR2_PACKAGE_FREESCALE_IMX_HAS_DPU
> +	bool
> +	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
> +
>  config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
>  	bool
>  	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
> @@ -94,6 +98,9 @@ source "package/freescale-imx/imx-uuc/Config.in"
>  source "package/freescale-imx/imx-vpu/Config.in"
>  source "package/freescale-imx/imx-vpu-hantro/Config.in"
>  source "package/freescale-imx/imx-vpuwrap/Config.in"
> +if BR2_PACKAGE_FREESCALE_IMX_HAS_DPU
> +source "package/freescale-imx/imx-dpu-g2d/Config.in"
> +endif
>  source "package/freescale-imx/firmware-imx/Config.in"
>  source "package/freescale-imx/imx-sc-firmware/Config.in"
>  if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)
> diff --git a/package/freescale-imx/imx-dpu-g2d/Config.in b/package/freescale-imx/imx-dpu-g2d/Config.in
> new file mode 100644
> index 0000000000..2675840093
> --- /dev/null
> +++ b/package/freescale-imx/imx-dpu-g2d/Config.in
> @@ -0,0 +1,23 @@
> +comment "imx-dpu-g2d needs a glibc toolchain"
> +	depends on BR2_aarch64
> +	depends on !BR2_TOOLCHAIN_USES_GLIBC
> +
> +config BR2_PACKAGE_IMX_DPU_G2D
> +	bool "imx-dpu-g2d"
> +	# Library binaries are linked against libc.so.6
> +	depends on BR2_TOOLCHAIN_USES_GLIBC
> +	select BR2_PACKAGE_IMX_GPU_VIV
> +	help
> +	  Userspace DPU 2D libraries for Vivante GPU on i.MX platforms.
> +
> +	  This library is provided by NXP as-is and doesn't have an
> +	  upstream.
> +
> +if BR2_PACKAGE_IMX_DPU_G2D
> +
> +config BR2_PACKAGE_IMX_DPU_G2D_EXAMPLES
> +	bool "install examples"
> +	help
> +	  Copy the Vivante DPU examples to the target.
> +
> +endif
> diff --git a/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash b/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash
> new file mode 100644
> index 0000000000..22be60077f
> --- /dev/null
> +++ b/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash
> @@ -0,0 +1,5 @@
> +# Locally calculated
> +sha256	46c72ce9b98b7116e9f7f53a66aadc8fb66910473477c6553db77ed71e54d7ea  imx-dpu-g2d-1.8.2.bin
> +sha256  d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
> +sha256  9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7  EULA
> +
> diff --git a/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk b/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk
> new file mode 100644
> index 0000000000..75fb7e21f0
> --- /dev/null
> +++ b/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk
> @@ -0,0 +1,37 @@
> +################################################################################
> +#
> +# imx-dpu-g2d
> +#
> +################################################################################
> +
> +IMX_DPU_G2D_VERSION = 1.8.2
> +IMX_DPU_G2D_SITE = $(FREESCALE_IMX_SITE)
> +IMX_DPU_G2D_SOURCE = imx-dpu-g2d-$(IMX_DPU_G2D_VERSION).bin
> +IMX_DPU_G2D_DEPENDENCIES = imx-gpu-viv
> +IMX_DPU_G2D_INSTALL_STAGING = YES
> +
> +IMX_DPU_G2D_LICENSE = NXP Semiconductor Software License Agreement
> +IMX_DPU_G2D_LICENSE_FILES = EULA COPYING
> +IMX_DPU_G2D_REDISTRIBUTE = NO
> +
> +define IMX_DPU_G2D_EXTRACT_CMDS
> +	$(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_DPU_G2D_DL_DIR)/$(IMX_DPU_G2D_SOURCE))
> +endef
> +
> +define IMX_DPU_G2D_INSTALL_STAGING_CMDS
> +	cp -a $(@D)/g2d/usr/* $(STAGING_DIR)/usr
> +endef
> +
> +ifeq ($(BR2_PACKAGE_IMX_DPU_G2D_EXAMPLES),y)
> +define IMX_DPU_G2D_INSTALL_EXAMPLES
> +	mkdir -p $(TARGET_DIR)/usr/share/examples/
> +	cp -a $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/
> +endef
> +endif
> +
> +define IMX_DPU_G2D_INSTALL_TARGET_CMDS
> +	$(IMX_DPU_G2D_INSTALL_EXAMPLES)
> +	cp -a $(@D)/g2d/usr/lib $(TARGET_DIR)/usr
> +endef
> +
> +$(eval $(generic-package))
> -- 
> 2.17.1
> 

  parent reply	other threads:[~2020-02-10 15:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 19:31 [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Refik Tuzakli
2020-02-03 19:31 ` [Buildroot] [PATCH v2 2/7] package/freescale-imx/imx-dpu-g2d: new package imx-dpu-g2d package is used by i.MX 8 and i.MX 8X series instead of imx-vpu or imx-vpu-hantro.With this commit, imx-dpu-g2d is added and is enabled for i.MX 8X Refik Tuzakli
2020-02-03 23:02   ` Thomas Petazzoni
2020-02-10 15:58   ` Gary Bisson [this message]
2021-08-05 20:51     ` Thomas Petazzoni
2021-08-06  7:33       ` Gary Bisson
2020-02-03 19:31 ` [Buildroot] [PATCH v2 3/7] availability control for vpu in i.MX families Refik Tuzakli
2020-02-03 23:09   ` Thomas Petazzoni
2020-02-03 19:31 ` [Buildroot] [PATCH v2 4/7] install video encode decode firwmare into target for imx8x Refik Tuzakli
2020-02-03 19:31 ` [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0 Refik Tuzakli
2020-02-04 22:10   ` Thomas Petazzoni
     [not found]     ` <CAMWBNu68n60JO5X1rUxnb5TD1RvV9FqeghtPLttJSHExkUy3gQ@mail.gmail.com>
2020-02-05  8:39       ` Thomas Petazzoni
2020-02-05 15:54     ` Gary Bisson
2020-02-05 16:48       ` Thomas Petazzoni
2020-02-05 18:44         ` Refik Tuzakli
2020-02-10 15:51           ` Gary Bisson
2020-02-10 15:56             ` Thomas Petazzoni
2020-02-03 19:31 ` [Buildroot] [PATCH v2 6/7] package/freescale-imx/imx-gpu-g2d: " Refik Tuzakli
2020-02-04 22:06   ` Thomas Petazzoni
2020-02-03 19:31 ` [Buildroot] [PATCH v2 7/7] DEVELOPERS: update my entry list Refik Tuzakli
2020-03-15 22:11   ` Thomas Petazzoni
2020-02-03 22:46 ` [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200210155801.GB335587@p1g2.work \
    --to=bisson.gary@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).