buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x
@ 2020-02-03 19:31 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
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 package/freescale-imx/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index f010aab87b..d23bcdbd9a 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -81,7 +81,8 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
-		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
 
 source "package/freescale-imx/imx-alsa-plugins/Config.in"
 source "package/freescale-imx/imx-codec/Config.in"
-- 
2.17.1

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

* [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.
  2020-02-03 19:31 [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Refik Tuzakli
@ 2020-02-03 19:31 ` Refik Tuzakli
  2020-02-03 23:02   ` Thomas Petazzoni
  2020-02-10 15:58   ` Gary Bisson
  2020-02-03 19:31 ` [Buildroot] [PATCH v2 3/7] availability control for vpu in i.MX families Refik Tuzakli
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

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

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

* [Buildroot] [PATCH v2 3/7] availability control for vpu in i.MX families
  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 19:31 ` 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
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 package/freescale-imx/Config.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index 586e67ea72..60a43646fc 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -95,9 +95,14 @@ source "package/freescale-imx/imx-lib/Config.in"
 source "package/freescale-imx/imx-m4fwloader/Config.in"
 source "package/freescale-imx/imx-parser/Config.in"
 source "package/freescale-imx/imx-uuc/Config.in"
+if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
 source "package/freescale-imx/imx-vpu/Config.in"
+source "package/freescale-imx/imx-vpuwrap/Config.in"
+endif
+if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO
 source "package/freescale-imx/imx-vpu-hantro/Config.in"
 source "package/freescale-imx/imx-vpuwrap/Config.in"
+endif
 if BR2_PACKAGE_FREESCALE_IMX_HAS_DPU
 source "package/freescale-imx/imx-dpu-g2d/Config.in"
 endif
-- 
2.17.1

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

* [Buildroot] [PATCH v2 4/7] install video encode decode firwmare into target for imx8x
  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 19:31 ` [Buildroot] [PATCH v2 3/7] availability control for vpu in i.MX families Refik Tuzakli
@ 2020-02-03 19:31 ` 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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
index c9040e1853..f8d5c51bfe 100644
--- a/package/freescale-imx/firmware-imx/firmware-imx.mk
+++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
@@ -53,6 +53,11 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	cp $(@D)/firmware/seco/mx8qx-ahab-container.img \
 		$(BINARIES_DIR)/ahab-container.img
 endef
+define FIRMWARE_IMX_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/lib/firmware/vpu
+	cp -r $(@D)/firmware/vpu/vpu_fw_imx8_dec.bin $(TARGET_DIR)/lib/firmware/vpu
+	cp -r $(@D)/firmware/vpu/vpu_fw_imx8_enc.bin $(TARGET_DIR)/lib/firmware/vpu
+endef
 else
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/lib/firmware/imx
-- 
2.17.1

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  2020-02-03 19:31 [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Refik Tuzakli
                   ` (2 preceding siblings ...)
  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 ` Refik Tuzakli
  2020-02-04 22:10   ` Thomas Petazzoni
  2020-02-03 19:31 ` [Buildroot] [PATCH v2 6/7] package/freescale-imx/imx-gpu-g2d: " Refik Tuzakli
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash |  7 +++++--
 package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk   | 13 +++++++------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash
index 2cbc36a185..1a67b53ac5 100644
--- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash
+++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash
@@ -1,2 +1,5 @@
-sha256	dddadd164bede4793409ccfb636324dd73862c33458db66a5860f126bada25dc  imx-gpu-viv-6.2.4.p1.2-aarch32.bin
-sha256	27ed3f58681cef18f87ea20946cc89b2cef4848006064303d20583e6ed7aeec7  imx-gpu-viv-6.2.4.p1.2-aarch64.bin
+# Locally calculated
+sha256	b5c94b56a9f7c84aa084603a6ca21b5f3941b400e4f6ee8558b58c9b9f1aab36  imx-gpu-viv-6.4.0.p1.0-aarch32.bin
+sha256	45852a5c3c61a9215a2ffb7387a6e1cce7ddac6f12513fc77459ad7e1f1b3a27  imx-gpu-viv-6.4.0.p1.0-aarch64.bin
+sha256	d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
+sha256	9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7  EULA
diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
index d2a9fad459..93dd1b3cde 100644
--- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
+++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
@@ -5,9 +5,9 @@
 ################################################################################
 
 ifeq ($(BR2_aarch64),y)
-IMX_GPU_VIV_VERSION = 6.2.4.p1.2-aarch64
+IMX_GPU_VIV_VERSION = 6.4.0.p1.0-aarch64
 else
-IMX_GPU_VIV_VERSION = 6.2.4.p1.2-aarch32
+IMX_GPU_VIV_VERSION = 6.4.0.p1.0-aarch32
 endif
 IMX_GPU_VIV_SITE = $(FREESCALE_IMX_SITE)
 IMX_GPU_VIV_SOURCE = imx-gpu-viv-$(IMX_GPU_VIV_VERSION).bin
@@ -42,9 +42,10 @@ endef
 # Make sure these commands are idempotent.
 define IMX_GPU_VIV_BUILD_CMDS
 	$(SED) 's/defined(LINUX)/defined(__linux__)/g' $(@D)/gpu-core/usr/include/*/*.h
-	ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so
-	ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1
-	ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1.2.0
+	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so
+	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so.1
+	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so.1.2
+	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so.1.2.0
 	ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so
 	ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1
 	ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1.0
@@ -115,7 +116,7 @@ define IMX_GPU_VIV_INSTALL_TARGET_CMDS
 	$(IMX_GPU_VIV_INSTALL_EXAMPLES)
 	$(IMX_GPU_VIV_INSTALL_GMEM_INFO)
 	cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr
-	for lib in EGL GAL GLESv2 VDK; do \
+	for lib in EGL GAL GL GLESv2 VDK vulkan; do \
 		for f in $(TARGET_DIR)/usr/lib/lib$${lib}-*.so; do \
 			case $$f in \
 				*-$(IMX_GPU_VIV_LIB_TARGET).so) : ;; \
-- 
2.17.1

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

* [Buildroot] [PATCH v2 6/7] package/freescale-imx/imx-gpu-g2d: bump to version 6.4.0.p1.0
  2020-02-03 19:31 [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Refik Tuzakli
                   ` (3 preceding siblings ...)
  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-03 19:31 ` 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-02-03 22:46 ` [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Thomas Petazzoni
  6 siblings, 1 reply; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 package/freescale-imx/imx-gpu-g2d/Config.in        | 6 +++++-
 package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash | 7 ++++++-
 package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk   | 6 +++++-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/package/freescale-imx/imx-gpu-g2d/Config.in b/package/freescale-imx/imx-gpu-g2d/Config.in
index 47375788d1..aeca087f86 100644
--- a/package/freescale-imx/imx-gpu-g2d/Config.in
+++ b/package/freescale-imx/imx-gpu-g2d/Config.in
@@ -2,10 +2,14 @@ comment "imx-gpu-g2d needs a glibc toolchain with armhf enabled"
 	depends on BR2_arm
 	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_ARM_EABIHF
 
+comment "imx-gpu-g2d needs a glibc toolchain"
+	depends on BR2_aarch64
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
 config BR2_PACKAGE_IMX_GPU_G2D
 	bool "imx-gpu-g2d"
 	# Pre-built binaries only available for ARM EABIhf
-	depends on BR2_ARM_EABIHF
+	depends on (BR2_arm && BR2_ARM_EABIHF) || BR2_aarch64
 	# Library binaries are linked against libc.so.6
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_IMX_GPU_VIV
diff --git a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash
index 3bcbc558e2..1ad90d34a6 100644
--- a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash
+++ b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash
@@ -1 +1,6 @@
-sha256	5f2d2171d5cd57f37ab07184fc908a0f6ecb2a97f023f04c2f9f3b3d7fec8481  imx-gpu-g2d-6.2.4.p1.2.bin
+# Locally calculated
+sha256	6d6d02d035d988cbdb2014794f2efe970a3f5ac277202882bbf553bb7fd789d2  imx-gpu-g2d-6.4.0.p1.0-aarch32.bin
+sha256	35885f435dbe951d2c0f439a376ed8a59a50b67a1b7e1e14fa2ab03995abb1ad  imx-gpu-g2d-6.4.0.p1.0-aarch64.bin
+sha256	d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
+sha256	9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7  EULA
+
diff --git a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk
index 015ab628b6..6598e4c32b 100644
--- a/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk
+++ b/package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk
@@ -4,7 +4,11 @@
 #
 ################################################################################
 
-IMX_GPU_G2D_VERSION = 6.2.4.p1.2
+ifeq ($(BR2_aarch64),y)
+IMX_GPU_G2D_VERSION = 6.4.0.p1.0-aarch64
+else
+IMX_GPU_G2D_VERSION = 6.4.0.p1.0-aarch32
+endif
 IMX_GPU_G2D_SITE = $(FREESCALE_IMX_SITE)
 IMX_GPU_G2D_SOURCE = imx-gpu-g2d-$(IMX_GPU_G2D_VERSION).bin
 IMX_GPU_G2D_DEPENDENCIES = imx-gpu-viv
-- 
2.17.1

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

* [Buildroot] [PATCH v2 7/7] DEVELOPERS: update my entry list
  2020-02-03 19:31 [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Refik Tuzakli
                   ` (4 preceding siblings ...)
  2020-02-03 19:31 ` [Buildroot] [PATCH v2 6/7] package/freescale-imx/imx-gpu-g2d: " Refik Tuzakli
@ 2020-02-03 19:31 ` 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
  6 siblings, 1 reply; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-03 19:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index 172ebbf43a..13cf9d320d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2069,6 +2069,7 @@ F:	package/uhttpd/
 F:	package/ustream-ssl/
 
 N:	Refik Tuzakli <tuzakli.refik@gmail.com>
+F:	package/freescale-imx/
 F:	package/paho-mqtt-cpp/
 
 N:	R?mi R?rolle <remi.rerolle@gmail.com>
-- 
2.17.1

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

* [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x
  2020-02-03 19:31 [Buildroot] [PATCH v2 1/7] enable vivante gpu driver for imx8x Refik Tuzakli
                   ` (5 preceding siblings ...)
  2020-02-03 19:31 ` [Buildroot] [PATCH v2 7/7] DEVELOPERS: update my entry list Refik Tuzakli
@ 2020-02-03 22:46 ` Thomas Petazzoni
  6 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-03 22:46 UTC (permalink / raw)
  To: buildroot

On Mon,  3 Feb 2020 22:31:49 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> ---
>  package/freescale-imx/Config.in | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [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.
  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
  1 sibling, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-03 23:02 UTC (permalink / raw)
  To: buildroot

Hello Refik,

I was about to apply after fixing a few things, but there is one issue
that I can't really resolve by myself without asking some questions. So
while at it, I'll do the various comments.

First, the commit log is not good, you should have an empty line after
the commit title (package/freescale-imx/imx-dpu-g2d: new package),
otherwise everything goes into the commit title.

On Mon,  3 Feb 2020 22:31:50 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> 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(+)

Please add an entry in the DEVELOPERS file.

>  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

So this is the problem. What makes you think this needs imx-gpu-viv ?
When I run readelf -d on the only library installed by this package, I
see this:

$ readelf -d libg2d-dpu.so 

Dynamic section at offset 0xadc8 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libdrm.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libg2d.so.1.1]

So it means that it needs libc.so.6 (so we need glibc) and libdrm.so.2.
And libdrm.so.2 is not installed by imx-gpu-viv. So it seems like it
doesn't need imx-gpu-viv, but instead another package that provides
libdrm.so.2 (probably libdrm, but please check).

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

So that would have to be changed.

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

We normally use

	cp -dpfr

instead of cp -a.

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

Please use:

	cp -dpfr $(@D)/g2d/usr/lib/* $(TARGET_DIR)/usr/lib/

instead.

Could you fix the above issues, and resend ? The
imx-gpu-viv/libdrm.so.2 issue is the most important one.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 3/7] availability control for vpu in i.MX families
  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
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-03 23:09 UTC (permalink / raw)
  To: buildroot

On Mon,  3 Feb 2020 22:31:51 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> ---
>  package/freescale-imx/Config.in | 5 +++++
>  1 file changed, 5 insertions(+)

This patch is not necessary: the imx-vpu, imx-vpu-hantro and
imx-vpuwrap packages already have in their Config.in files the
appropriate "depends on" to ensure their options are only visible under
the right conditions.

Also, we don't want to have two "source" statements including the same
file.

So since there is no additional explanation in your patch for this
change, I'll mark it as Rejected in our patch tracking system. If you
have more details, don't hesitate to provide them.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 6/7] package/freescale-imx/imx-gpu-g2d: bump to version 6.4.0.p1.0
  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
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-04 22:06 UTC (permalink / raw)
  To: buildroot

On Mon,  3 Feb 2020 22:31:54 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> ---
>  package/freescale-imx/imx-gpu-g2d/Config.in        | 6 +++++-
>  package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash | 7 ++++++-
>  package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk   | 6 +++++-
>  3 files changed, 16 insertions(+), 3 deletions(-)

Applied to master, after slightly extending the commit log. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  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 15:54     ` Gary Bisson
  0 siblings, 2 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-04 22:10 UTC (permalink / raw)
  To: buildroot

Hello,

(Gary, there is a question for you below.)

On Mon,  3 Feb 2020 22:31:53 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>

I've applied, but with some changes, and they may need further work
from you. See below.

>  define IMX_GPU_VIV_BUILD_CMDS
>  	$(SED) 's/defined(LINUX)/defined(__linux__)/g' $(@D)/gpu-core/usr/include/*/*.h
> -	ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so
> -	ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1
> -	ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1.2.0
> +	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so
> +	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so.1
> +	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so.1.2
> +	ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGL.so.1.2.0

The libGL is only available for the wl and x11 backends, not for the fb
backend, so these statements were creating broken symlinks when fb was
the selected backend. So I've added some conditional to only do that
when wl or x11 is used.

>  	ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so
>  	ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1
>  	ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1.0
> @@ -115,7 +116,7 @@ define IMX_GPU_VIV_INSTALL_TARGET_CMDS
>  	$(IMX_GPU_VIV_INSTALL_EXAMPLES)
>  	$(IMX_GPU_VIV_INSTALL_GMEM_INFO)
>  	cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr
> -	for lib in EGL GAL GLESv2 VDK; do \
> +	for lib in EGL GAL GL GLESv2 VDK vulkan; do \

I have dropped this change. Indeed, the package was not updated to
reflect that it also provides GL support, and there is no really
organized Vulkan support in Buildroot today (except in mesa3d). So
adding these need more work, and should be done in separate commits.

Generally, I am surprised of the "fixes" done to libGL in BUILDS_CMDS
since anyway libGL does not get installed. It was like that, so I kept
it as it is, but I'm not sure why we did that. Gary, do you remember ?

>  		for f in $(TARGET_DIR)/usr/lib/lib$${lib}-*.so; do \
>  			case $$f in \
>  				*-$(IMX_GPU_VIV_LIB_TARGET).so) : ;; \

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
       [not found]     ` <CAMWBNu68n60JO5X1rUxnb5TD1RvV9FqeghtPLttJSHExkUy3gQ@mail.gmail.com>
@ 2020-02-05  8:39       ` Thomas Petazzoni
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-05  8:39 UTC (permalink / raw)
  To: buildroot

Hello Refik,

Please keep the Buildroot mailing list in Cc when replying. Thanks!

On Wed, 5 Feb 2020 10:51:28 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> X11 and fb backend do not support on i.MX 8 series. Only wayland and
> xwayland are supported. Thus there is no libGL-fb.so. I guess there must
> not be X11 backend. I suggest that X11 and fb support should be disabled
> for imx8 or 64 bit vivante GPU support. 32bit vivante GPU support has
> libGL-fb.so. .mk file is fine for 32bit but it must be adopted for 64bit
> support.

Hm, OK. Could you send follow-up patches improving that, with detailed
explanations in the commit log ?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  2020-02-04 22:10   ` Thomas Petazzoni
       [not found]     ` <CAMWBNu68n60JO5X1rUxnb5TD1RvV9FqeghtPLttJSHExkUy3gQ@mail.gmail.com>
@ 2020-02-05 15:54     ` Gary Bisson
  2020-02-05 16:48       ` Thomas Petazzoni
  1 sibling, 1 reply; 22+ messages in thread
From: Gary Bisson @ 2020-02-05 15:54 UTC (permalink / raw)
  To: buildroot

Hi Thomas, Refik,

Le mar. 4 f?vr. 2020 ? 11:10 PM, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> a ?crit :

> Hello,
>
> (Gary, there is a question for you below.)
>
> On Mon,  3 Feb 2020 22:31:53 +0300
> Refik Tuzakli <tuzakli.refik@gmail.com> wrote:
>
> > Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
>
> I've applied, but with some changes, and they may need further work
> from you. See below.
>
> >  define IMX_GPU_VIV_BUILD_CMDS
> >       $(SED) 's/defined(LINUX)/defined(__linux__)/g'
> $(@D)/gpu-core/usr/include/*/*.h
> > -     ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so
> > -     ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1
> > -     ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1.2.0
> > +     ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libGL.so
> > +     ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libGL.so.1
> > +     ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libGL.so.1.2
> > +     ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libGL.so.1.2.0
>
> The libGL is only available for the wl and x11 backends, not for the fb
> backend, so these statements were creating broken symlinks when fb was
> the selected backend. So I've added some conditional to only do that
> when wl or x11 is used.
>
> >       ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libEGL.so
> >       ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libEGL.so.1
> >       ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so
> $(@D)/gpu-core/usr/lib/libEGL.so.1.0
> > @@ -115,7 +116,7 @@ define IMX_GPU_VIV_INSTALL_TARGET_CMDS
> >       $(IMX_GPU_VIV_INSTALL_EXAMPLES)
> >       $(IMX_GPU_VIV_INSTALL_GMEM_INFO)
> >       cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr
> > -     for lib in EGL GAL GLESv2 VDK; do \
> > +     for lib in EGL GAL GL GLESv2 VDK vulkan; do \
>
> I have dropped this change. Indeed, the package was not updated to
> reflect that it also provides GL support, and there is no really
> organized Vulkan support in Buildroot today (except in mesa3d). So
> adding these need more work, and should be done in separate commits.
>
> Generally, I am surprised of the "fixes" done to libGL in BUILDS_CMDS
> since anyway libGL does not get installed. It was like that, so I kept
> it as it is, but I'm not sure why we did that. Gary, do you remember ?
>

I'm on vacation this week without any laptop around so my answer will most
likely be inaccurate.

But I'll try off the top of my head:
- the main goal was to copy the yocto recipe for the build cmds, the links
commands should match more or less
- but openGL was indeed never properly supported anyway since it required
to build mesa3d but overwrite the libGL library at the end (what was done
by yocto at the time) which wasn't supported in BR
- the only person I know who added some kind of openGL support in Buildroot
is you ;) (I recall a "imx-fix" branch in FE git server)

Hope this helps.

Regards,
Gary

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200205/3c3f6d8c/attachment.html>

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  2020-02-05 15:54     ` Gary Bisson
@ 2020-02-05 16:48       ` Thomas Petazzoni
  2020-02-05 18:44         ` Refik Tuzakli
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-05 16:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 5 Feb 2020 16:54:15 +0100
Gary Bisson <bisson.gary@gmail.com> wrote:

> I'm on vacation this week without any laptop around so my answer will most
> likely be inaccurate.

Thanks, enjoy your vacations! :-)

> But I'll try off the top of my head:
> - the main goal was to copy the yocto recipe for the build cmds, the links
> commands should match more or less
> - but openGL was indeed never properly supported anyway since it required
> to build mesa3d but overwrite the libGL library at the end (what was done
> by yocto at the time) which wasn't supported in BR

Argh. Horrible. Why do they do that ?

> - the only person I know who added some kind of openGL support in Buildroot
> is you ;) (I recall a "imx-fix" branch in FE git server)

Me Thomas, or Refik ? I might have submitted some OpenGL changes a
while ago, but I'm certainly not the only one.

Well, OK, if we want full OpenGL support with imx-gpu-viv, some more
work is needed I believe, including actual testing on the target.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  2020-02-05 16:48       ` Thomas Petazzoni
@ 2020-02-05 18:44         ` Refik Tuzakli
  2020-02-10 15:51           ` Gary Bisson
  0 siblings, 1 reply; 22+ messages in thread
From: Refik Tuzakli @ 2020-02-05 18:44 UTC (permalink / raw)
  To: buildroot

Hello,

Have nice vacation, Gary.

we don't need mesa3d to  work with opengl, opencl... if we use vivante
dirver by NXP. it is  closed source and has limitations.
For imx8 families it drops X11 and framebuffer backend for opengl support.
Unfortunately, Gary is right. Instead of supporting mesa3d to enable it for
imx users, they overwrite the opengl libraries in Yocto Project.
There is etnaviv driver to use directly with mesa3d without any vivante
driver. However it is new for gpu on imx8 families.
So I can not make it work on imx8qxp.

Thomas was right about opengl framebuffer backend. Now NXP does not supply
libGL-fb on imx-gpu-viv-6.4.0.p1.0.
It is buggy gpu driver for 32 bit architecture(imx6 familes). In Yocto
project, they solve the problem by creating dummy libGL.so for framebuffer
backend.
It is also weird. I gues we need to wait for better gpu driver.

Now I make weston and wayland work with vivante 6.4.0.p1.0 version on the
opengl wayland backend. However,
Freescale firmware is need to rearrange because after 6.4.0 there are
neural network, openvx and vulkan support.
If we add all these support, they occupy more than 125MB. I guess it is too
much to allocate such space for libraries that we don't need.

Apart from freescale firmware, I plan to update weston for imx. I saw a
discussion about it on Buildroot, too.

I work on imx8qxp mek board by NXP. I only test wayland weston on it.

It wasn't me because I am almost new to contribute to Buildroot :)

I have some experience about imx8 and  want to share.

Cheers,

On Wed, Feb 5, 2020 at 7:48 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello,
>
> On Wed, 5 Feb 2020 16:54:15 +0100
> Gary Bisson <bisson.gary@gmail.com> wrote:
>
> > I'm on vacation this week without any laptop around so my answer will
> most
> > likely be inaccurate.
>
> Thanks, enjoy your vacations! :-)
>
> > But I'll try off the top of my head:
> > - the main goal was to copy the yocto recipe for the build cmds, the
> links
> > commands should match more or less
> > - but openGL was indeed never properly supported anyway since it required
> > to build mesa3d but overwrite the libGL library at the end (what was done
> > by yocto at the time) which wasn't supported in BR
>
> Argh. Horrible. Why do they do that ?
>
> > - the only person I know who added some kind of openGL support in
> Buildroot
> > is you ;) (I recall a "imx-fix" branch in FE git server)
>
> Me Thomas, or Refik ? I might have submitted some OpenGL changes a
> while ago, but I'm certainly not the only one.
>
> Well, OK, if we want full OpenGL support with imx-gpu-viv, some more
> work is needed I believe, including actual testing on the target.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>


-- 
Refik Tuzakl?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200205/ebd472aa/attachment.html>

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  2020-02-05 18:44         ` Refik Tuzakli
@ 2020-02-10 15:51           ` Gary Bisson
  2020-02-10 15:56             ` Thomas Petazzoni
  0 siblings, 1 reply; 22+ messages in thread
From: Gary Bisson @ 2020-02-10 15:51 UTC (permalink / raw)
  To: buildroot

Hello Thomas, Refik,

On Wed, Feb 05, 2020 at 09:44:36PM +0300, Refik Tuzakli wrote:
> Hello,
> 
> Have nice vacation, Gary.
> 
> we don't need mesa3d to  work with opengl, opencl... if we use vivante
> dirver by NXP. it is  closed source and has limitations.

Yes you do need mesa3d otherwise you won't have any header and therefore
won't be able to build anything.

Yocto recipe explains it here:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-freescale/tree/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc#n23

> For imx8 families it drops X11 and framebuffer backend for opengl support.
> Unfortunately, Gary is right. Instead of supporting mesa3d to enable it for
> imx users, they overwrite the opengl libraries in Yocto Project.
> There is etnaviv driver to use directly with mesa3d without any vivante
> driver. However it is new for gpu on imx8 families.
> So I can not make it work on imx8qxp.
> 
> Thomas was right about opengl framebuffer backend. Now NXP does not supply
> libGL-fb on imx-gpu-viv-6.4.0.p1.0.
> It is buggy gpu driver for 32 bit architecture(imx6 familes). In Yocto
> project, they solve the problem by creating dummy libGL.so for framebuffer
> backend.
> It is also weird. I gues we need to wait for better gpu driver.
> 
> Now I make weston and wayland work with vivante 6.4.0.p1.0 version on the
> opengl wayland backend. However,
> Freescale firmware is need to rearrange because after 6.4.0 there are
> neural network, openvx and vulkan support.
> If we add all these support, they occupy more than 125MB. I guess it is too
> much to allocate such space for libraries that we don't need.
> 
> Apart from freescale firmware, I plan to update weston for imx. I saw a
> discussion about it on Buildroot, too.
> 
> I work on imx8qxp mek board by NXP. I only test wayland weston on it.
> 
> It wasn't me because I am almost new to contribute to Buildroot :)
> 
> I have some experience about imx8 and  want to share.
> 
> Cheers,
> 
> On Wed, Feb 5, 2020 at 7:48 PM Thomas Petazzoni <
> thomas.petazzoni at bootlin.com> wrote:
> 
> > Hello,
> >
> > On Wed, 5 Feb 2020 16:54:15 +0100
> > Gary Bisson <bisson.gary@gmail.com> wrote:
> >
> > > I'm on vacation this week without any laptop around so my answer will
> > most
> > > likely be inaccurate.
> >
> > Thanks, enjoy your vacations! :-)
> >
> > > But I'll try off the top of my head:
> > > - the main goal was to copy the yocto recipe for the build cmds, the
> > links
> > > commands should match more or less
> > > - but openGL was indeed never properly supported anyway since it required
> > > to build mesa3d but overwrite the libGL library at the end (what was done
> > > by yocto at the time) which wasn't supported in BR
> >
> > Argh. Horrible. Why do they do that ?
> >
> > > - the only person I know who added some kind of openGL support in
> > Buildroot
> > > is you ;) (I recall a "imx-fix" branch in FE git server)
> >
> > Me Thomas, or Refik ? I might have submitted some OpenGL changes a
> > while ago, but I'm certainly not the only one.

You Thomas, sorry for the confusion. I don't think you ever pushed the
change as you were not happy with it at the time.

It was on http://git.free-electrons.com/, is a bootlin equivalent
existing?

Regards,
Gary

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

* [Buildroot] [PATCH v2 5/7] package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0
  2020-02-10 15:51           ` Gary Bisson
@ 2020-02-10 15:56             ` Thomas Petazzoni
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-02-10 15:56 UTC (permalink / raw)
  To: buildroot

On Mon, 10 Feb 2020 16:51:02 +0100
Gary Bisson <bisson.gary@gmail.com> wrote:

> > we don't need mesa3d to  work with opengl, opencl... if we use vivante
> > dirver by NXP. it is  closed source and has limitations.  
> 
> Yes you do need mesa3d otherwise you won't have any header and therefore
> won't be able to build anything.

If it's only for headers, don't use mesa3d, but mesa3d-headers. The
mesa3d-headers is precisely designed to provide the OpenGL/Khronos
headers for the OpenGL implementations that don't provide it.

> > > Me Thomas, or Refik ? I might have submitted some OpenGL changes a
> > > while ago, but I'm certainly not the only one.  
> 
> You Thomas, sorry for the confusion. I don't think you ever pushed the
> change as you were not happy with it at the time.
> 
> It was on http://git.free-electrons.com/, is a bootlin equivalent
> existing?

No, we closed our own repo. Do you have the details of the change you
are talking about ? I could try to see if I still have it locally.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [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.
  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
  2021-08-05 20:51     ` Thomas Petazzoni
  1 sibling, 1 reply; 22+ messages in thread
From: Gary Bisson @ 2020-02-10 15:58 UTC (permalink / raw)
  To: buildroot

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
> 

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

* [Buildroot] [PATCH v2 7/7] DEVELOPERS: update my entry list
  2020-02-03 19:31 ` [Buildroot] [PATCH v2 7/7] DEVELOPERS: update my entry list Refik Tuzakli
@ 2020-03-15 22:11   ` Thomas Petazzoni
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2020-03-15 22:11 UTC (permalink / raw)
  To: buildroot

On Mon,  3 Feb 2020 22:31:55 +0300
Refik Tuzakli <tuzakli.refik@gmail.com> wrote:

> Signed-off-by: Refik Tuzakli <tuzakli.refik@gmail.com>
> ---
>  DEVELOPERS | 1 +
>  1 file changed, 1 insertion(+)

Applied to master with a slightly edited commit title. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [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.
  2020-02-10 15:58   ` Gary Bisson
@ 2021-08-05 20:51     ` Thomas Petazzoni
  2021-08-06  7:33       ` Gary Bisson
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas Petazzoni @ 2021-08-05 20:51 UTC (permalink / raw)
  To: Gary Bisson; +Cc: Refik Tuzakli, buildroot

Hello Gary,

On Mon, 10 Feb 2020 16:58:01 +0100
Gary Bisson <bisson.gary@gmail.com> wrote:

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

Thanks for the explanation, but I do have a number of questions
following this. Right now the imx-gpu-g2d package is included with:

if BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
source "package/freescale-imx/imx-gpu-g2d/Config.in"
...
endif

So it means it's visible and accessible to all those platforms:

config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
        bool
        default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X

But you're saying that imx-gpu-g2d only applies to i.MX6. So it seams
like we would in fact need a BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU_G2D,
like:

config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU_G2D
        bool
        default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
                BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S

And make imx-gpu-g2d only visible on these ?

Could you clarify exactly the list of i.MX6/i.MX7/i.MX8 variants on
which imx-gpu-g2d makes sense, and on which imx-dpu-g2d makes sense ?

In Yocto they have this odd:

MACHINEOVERRIDES_EXTENDER_mx25   = "use-mainline-bsp"
MACHINEOVERRIDES_EXTENDER_mx6q   = "imxfbdev:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx6dl  = "imxfbdev:imxpxp:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6sx  = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx6sl  = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6sll = "imxfbdev:imxpxp:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6ul  = "imxfbdev:imxpxp"
MACHINEOVERRIDES_EXTENDER_mx6ull = "imxfbdev:imxpxp:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6ulz = "imxfbdev:imxpxp:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx7d   = "imxfbdev:imxpxp:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx7ulp = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8qm  = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mm  = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mn  = "imxdrm:imxgpu:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mp  = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mq  = "imxdrm:imxvpu:imxgpu:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8qxp = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8dxl = "imxfbdev"

But I can't really make much sense out of this.

Thanks,

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] 22+ messages in thread

* Re: [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.
  2021-08-05 20:51     ` Thomas Petazzoni
@ 2021-08-06  7:33       ` Gary Bisson
  0 siblings, 0 replies; 22+ messages in thread
From: Gary Bisson @ 2021-08-06  7:33 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Gary Bisson, buildroot, Refik Tuzakli

Hi Thomas,

On Thu, Aug 05, 2021 at 10:51:02PM +0200, Thomas Petazzoni wrote:
> Hello Gary,
> 
> On Mon, 10 Feb 2020 16:58:01 +0100
> Gary Bisson <bisson.gary@gmail.com> wrote:
> 
> > 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.
> 
> Thanks for the explanation, but I do have a number of questions
> following this. Right now the imx-gpu-g2d package is included with:
> 
> if BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
> source "package/freescale-imx/imx-gpu-g2d/Config.in"
> ...
> endif
> 
> So it means it's visible and accessible to all those platforms:
> 
> config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
>         bool
>         default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
> 
> But you're saying that imx-gpu-g2d only applies to i.MX6. So it seams
> like we would in fact need a BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU_G2D,
> like:

I was saying it only was supported on i.MX6 series, but since then NXP
added the 2D GPU back on several new SoCs.

> config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU_G2D
>         bool
>         default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \
>                 BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S
> 
> And make imx-gpu-g2d only visible on these ?

I believe I offered something like that in the past but was told to
limit the use of "IMX_HAS_XXX". At the time I believe the reasoning was
that users should know whether they can use g2d or not.

> Could you clarify exactly the list of i.MX6/i.MX7/i.MX8 variants on
> which imx-gpu-g2d makes sense, and on which imx-dpu-g2d makes sense ?
> 
> In Yocto they have this odd:
> 
> MACHINEOVERRIDES_EXTENDER_mx25   = "use-mainline-bsp"
> MACHINEOVERRIDES_EXTENDER_mx6q   = "imxfbdev:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx6dl  = "imxfbdev:imxpxp:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxepdc"
> MACHINEOVERRIDES_EXTENDER_mx6sx  = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx6sl  = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxepdc"
> MACHINEOVERRIDES_EXTENDER_mx6sll = "imxfbdev:imxpxp:imxepdc"
> MACHINEOVERRIDES_EXTENDER_mx6ul  = "imxfbdev:imxpxp"
> MACHINEOVERRIDES_EXTENDER_mx6ull = "imxfbdev:imxpxp:imxepdc"
> MACHINEOVERRIDES_EXTENDER_mx6ulz = "imxfbdev:imxpxp:imxepdc"
> MACHINEOVERRIDES_EXTENDER_mx7d   = "imxfbdev:imxpxp:imxepdc"
> MACHINEOVERRIDES_EXTENDER_mx7ulp = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8qm  = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8mm  = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8mn  = "imxdrm:imxgpu:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8mp  = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8mq  = "imxdrm:imxvpu:imxgpu:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8qxp = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
> MACHINEOVERRIDES_EXTENDER_mx8dxl = "imxfbdev"
> 
> But I can't really make much sense out of this.

Well I guess the naming is very confusing, but having imxgpu2d in the
above means that G2D is supported, whether it is with GPU2D or DPU [1].

From that list, if you have both imxgpu2d + imxdpu it means imx-dpu-g2d
is the g2d lib provider[2]. So imx-dpu-g2d is only available for mx8qm
and mx8qxp, all the other platforms with imxgpu2d are using imx-gpu-g2d.

Hope this clarifies things (a bit at least).

Regards,
Gary

[1] https://github.com/Freescale/meta-freescale/blob/hardknott/conf/machine/include/imx-base.inc#L228
[2] https://github.com/Freescale/meta-freescale/blob/hardknott/conf/machine/include/imx-base.inc#L362
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

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

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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