All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package
@ 2020-02-08 13:49 Refik Tuzakli
  2020-09-22  8:14 ` Gary Bisson
  2021-08-05 20:47 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Refik Tuzakli @ 2020-02-08 13:49 UTC (permalink / raw)
  To: buildroot

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.MX8 and i.MX 8X.

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 DEVELOPERS                                    |  1 +
 package/freescale-imx/Config.in               |  8 ++++
 package/freescale-imx/imx-dpu-g2d/Config.in   | 23 ++++++++++++
 .../imx-dpu-g2d/imx-dpu-g2d.hash              |  4 ++
 .../freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk  | 37 +++++++++++++++++++
 5 files changed, 73 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/DEVELOPERS b/DEVELOPERS
index 3520072034..198b687d39 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2077,6 +2077,7 @@ F:	package/uhttpd/
 F:	package/ustream-ssl/
 
 N:	Refik Tuzakli <tuzakli.refik@gmail.com>
+F:	package/freescale-imx/imx-dpu-g2d
 F:	package/paho-mqtt-cpp/
 
 N:	R??mi R??rolle <remi.rerolle@gmail.com>
diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index 711e8f72c2..2343511c28 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -79,6 +79,11 @@ 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_IMX8 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+
 config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 	bool
 	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
@@ -99,6 +104,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..377ad31dcb
--- /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_LIBDRM
+	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..50eee591c3
--- /dev/null
+++ b/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash
@@ -0,0 +1,4 @@
+# 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..ea5bbb9f97
--- /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 = libdrm
+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 -dpfr $(@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 -dpfr $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/
+endef
+endif
+
+define IMX_DPU_G2D_INSTALL_TARGET_CMDS
+	$(IMX_DPU_G2D_INSTALL_EXAMPLES)
+	cp -dpfr $(@D)/g2d/usr/lib $(TARGET_DIR)/usr
+endef
+
+$(eval $(generic-package))
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package
  2020-02-08 13:49 [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package Refik Tuzakli
@ 2020-09-22  8:14 ` Gary Bisson
  2021-08-05 20:47 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Bisson @ 2020-09-22  8:14 UTC (permalink / raw)
  To: buildroot

Hi,

On Sat, Feb 08, 2020 at 04:49:50PM +0300, Refik Tuzakli wrote:
> 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.MX8 and i.MX 8X.

My review on v2 [1] still applies here, this has nothing to do with VPU
operations.

> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> ---
>  DEVELOPERS                                    |  1 +
>  package/freescale-imx/Config.in               |  8 ++++
>  package/freescale-imx/imx-dpu-g2d/Config.in   | 23 ++++++++++++
>  .../imx-dpu-g2d/imx-dpu-g2d.hash              |  4 ++
>  .../freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk  | 37 +++++++++++++++++++
>  5 files changed, 73 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/DEVELOPERS b/DEVELOPERS
> index 3520072034..198b687d39 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2077,6 +2077,7 @@ F:	package/uhttpd/
>  F:	package/ustream-ssl/
>  
>  N:	Refik Tuzakli <tuzakli.refik@gmail.com>
> +F:	package/freescale-imx/imx-dpu-g2d
>  F:	package/paho-mqtt-cpp/
>  
>  N:	R?mi R?rolle <remi.rerolle@gmail.com>
> diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
> index 711e8f72c2..2343511c28 100644
> --- a/package/freescale-imx/Config.in
> +++ b/package/freescale-imx/Config.in
> @@ -79,6 +79,11 @@ 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_IMX8 || \
> +		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
> +
>  config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
>  	bool
>  	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
> @@ -99,6 +104,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..377ad31dcb
> --- /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_LIBDRM
> +	help
> +	  Userspace DPU 2D libraries for Vivante GPU on i.MX platforms.

Also, this is not Vivante-related either.

> +	  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.

Ditto.

> +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..50eee591c3
> --- /dev/null
> +++ b/package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash
> @@ -0,0 +1,4 @@
> +# 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..ea5bbb9f97
> --- /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 = libdrm
> +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 -dpfr $(@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 -dpfr $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/
> +endef
> +endif
> +
> +define IMX_DPU_G2D_INSTALL_TARGET_CMDS
> +	$(IMX_DPU_G2D_INSTALL_EXAMPLES)
> +	cp -dpfr $(@D)/g2d/usr/lib $(TARGET_DIR)/usr
> +endef
> +
> +$(eval $(generic-package))

Regards,
Gary

[1] http://patchwork.ozlabs.org/project/buildroot/patch/20200203193155.12657-2-tuzakli.refik at gmail.com/#2359160

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package
  2020-02-08 13:49 [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package Refik Tuzakli
  2020-09-22  8:14 ` Gary Bisson
@ 2021-08-05 20:47 ` Thomas Petazzoni
  2021-08-06  7:19   ` Gary Bisson
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2021-08-05 20:47 UTC (permalink / raw)
  To: Refik Tuzakli; +Cc: Gary Bisson, buildroot

Hello Refik,

On Sat,  8 Feb 2020 16:49:50 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> 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.MX8 and i.MX 8X.
> 
> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>

So I wanted to apply this, but except Gary's feedback, there is still
one issue. When I look at the libraries libg2d-dpu.so.1.6.0 is linked
with, I see:

 0x0000000000000001 (NEEDED)             Shared library: [libdrm.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libOpenCL.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-aarch64.so.1]

So libc/ld-linux-aarch64 are part of the C library, libdrm.so is taken
care of by the libdrm dependency... but what about libOpenCL ? What
package is supposed to provide that in this context ?

Gary: I know you said this imx-dpu-g2d package is independent of the
GPU, but here it links against OpenCL... which I guess is provided by
imx-gpu-viv.

Note: I looked at version 1.8.14 of imx-dpu-g2d.

Could you give me some insight here, and once we resolve this issue,
submit a v4, also taking into account the feedback from Gary?

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package
  2021-08-05 20:47 ` Thomas Petazzoni
@ 2021-08-06  7:19   ` Gary Bisson
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Bisson @ 2021-08-06  7:19 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Refik Tuzakli, buildroot, Gary Bisson

Hi Thomas,

On Thu, Aug 05, 2021 at 10:47:26PM +0200, Thomas Petazzoni wrote:
> Hello Refik,
> 
> On Sat,  8 Feb 2020 16:49:50 +0300
> Refik Tuzakli <tuzakli.refik@gmail.com> wrote:
> 
> > 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.MX8 and i.MX 8X.
> > 
> > Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> 
> So I wanted to apply this, but except Gary's feedback, there is still
> one issue. When I look at the libraries libg2d-dpu.so.1.6.0 is linked
> with, I see:
> 
>  0x0000000000000001 (NEEDED)             Shared library: [libdrm.so.2]
>  0x0000000000000001 (NEEDED)             Shared library: [libOpenCL.so.1]
>  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
>  0x0000000000000001 (NEEDED)             Shared library: [ld-linux-aarch64.so.1]
> 
> So libc/ld-linux-aarch64 are part of the C library, libdrm.so is taken
> care of by the libdrm dependency... but what about libOpenCL ? What
> package is supposed to provide that in this context ?
> 
> Gary: I know you said this imx-dpu-g2d package is independent of the
> GPU, but here it links against OpenCL... which I guess is provided by
> imx-gpu-viv.

Yes I said that ;) But to be honest I've never used any i.MX 8QM / 8QXP
CPUs, mainly the M series.
So the DPU package, on paper, is supposed to provide the same G2D API as
the other package using the Display Controller (DPU) of those processors
to do the 2D operations.
So the theory is that it has nothing to do with the GPU. But in recent
releases they indeed added a runtime dependency to OpenCL as the package
needs it for HEVC tile format coming out of the VPU [1].

Regards,
Gary

[1] https://github.com/Freescale/meta-freescale/commit/0661394c
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-06  7:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 13:49 [Buildroot] [PATCH v3 1/1] package/freescale-imx/imx-dpu-g2d: new package Refik Tuzakli
2020-09-22  8:14 ` Gary Bisson
2021-08-05 20:47 ` Thomas Petazzoni
2021-08-06  7:19   ` Gary Bisson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.