Skip to contentSkip to conversation

enable vivante gpu driver for imx8x

PATCH New Refik Tuzakli 4 participants 22 messages Feb 3, 2020 – Aug 6, 2021 1 message not in the archive Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/7 enable vivante gpu driver for imx8x

---
 package/freescale-imx/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/freescale-imx/Config.in +2 -1
index f010aab87b..d23bcdbd9a 100644
@@ -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"
Signature · 1 line
2.17.1
#1 lore raw

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.

---
 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
package/freescale-imx/Config.in +7 -0
index d23bcdbd9a..586e67ea72 100644
@@ -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)
package/freescale-imx/imx-dpu-g2d/Config.in new file +23 -0
new file mode 100644
index 0000000000..2675840093
@@ -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
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash new file +5 -0
new file mode 100644
index 0000000000..22be60077f
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256	46c72ce9b98b7116e9f7f53a66aadc8fb66910473477c6553db77ed71e54d7ea  imx-dpu-g2d-1.8.2.bin
+sha256  d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
+sha256  9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7  EULA
+
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk new file +37 -0
new file mode 100644
index 0000000000..75fb7e21f0
@@ -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))
Signature · 1 line
2.17.1
#2 lore raw

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.

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.

Quoted 7 lines · On Mon, 3 Feb 2020 22:31:50 +0300 Refik Tuzakli <[email protected]>…
---
 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.

Quoted 7 lines

if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)

package/freescale-imx/imx-dpu-g2d/Config.in new file +0 -0
new file mode 100644
index 0000000000..2675840093

package/freescale-imx/imx-dpu-g2d/Config.in line 9

Quoted 9 lines
package/freescale-imx/imx-dpu-g2d/Config.in new file +9 -0
@@ -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).

package/freescale-imx/imx-dpu-g2d/Config.in line 13

Quoted 4 lines
package/freescale-imx/imx-dpu-g2d/Config.in new file +4 -0
+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.

package/freescale-imx/imx-dpu-g2d/Config.in

Quoted 12 lines
package/freescale-imx/imx-dpu-g2d/Config.in new file +12 -0
+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.

package/freescale-imx/imx-dpu-g2d/Config.in

Quoted 12 lines
package/freescale-imx/imx-dpu-g2d/Config.in new file +12 -0
+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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

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.

In reply to Refik Tuzakli

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

Quoted 122 lines · Refik Tuzakli
---
 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
package/freescale-imx/Config.in +7 -0
index d23bcdbd9a..586e67ea72 100644
@@ -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)
package/freescale-imx/imx-dpu-g2d/Config.in new file +23 -0
new file mode 100644
index 0000000000..2675840093
@@ -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
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash new file +5 -0
new file mode 100644
index 0000000000..22be60077f
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256	46c72ce9b98b7116e9f7f53a66aadc8fb66910473477c6553db77ed71e54d7ea  imx-dpu-g2d-1.8.2.bin
+sha256  d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
+sha256  9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7  EULA
+
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk new file +37 -0
new file mode 100644
index 0000000000..75fb7e21f0
@@ -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))
Signature · 1 line
2.17.1
#4 lore raw

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.

Hello Gary,

Quoted 13 lines · On Mon, 10 Feb 2020 16:58:01 +0100 Gary Bisson <[email protected]> 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.

Quoted 6 lines

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

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#5 lore raw

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.

Hi Thomas,

Quoted 47 lines · Thomas Petazzoni

Hello Gary,

Quoted 13 lines · On Mon, 10 Feb 2020 16:58:01 +0100 Gary Bisson <[email protected]> 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.

Quoted 6 lines

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
Quoted 3 lines

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.

Quoted 6 lines

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.

Quoted 21 lines

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"
Quoted 4 lines

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
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH v2 3/7 availability control for vpu in i.MX families

In reply to Refik Tuzakli
---
 package/freescale-imx/Config.in | 5 +++++
 1 file changed, 5 insertions(+)
package/freescale-imx/Config.in +5 -0
index 586e67ea72..60a43646fc 100644
@@ -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
Signature · 1 line
2.17.1
#7 lore raw

PATCH v2 3/7 availability control for vpu in i.MX families

Quoted 4 lines · On Mon, 3 Feb 2020 22:31:51 +0300 Refik Tuzakli <[email protected]>…
---
 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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH v2 4/7 install video encode decode firwmare into target for imx8x

In reply to Refik Tuzakli
---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/freescale-imx/firmware-imx/firmware-imx.mk +5 -0
index c9040e1853..f8d5c51bfe 100644
@@ -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
Signature · 1 line
2.17.1
#9 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

In reply to Refik Tuzakli
---
 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(-)
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash +5 -2
index 2cbc36a185..1a67b53ac5 100644
@@ -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
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +7 -6
index d2a9fad459..93dd1b3cde 100644
@@ -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) : ;; \
Signature · 1 line
2.17.1
#10 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

Hello,

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

Quoted 1 line · On Mon, 3 Feb 2020 22:31:53 +0300 Refik Tuzakli <[email protected]>…

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

package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk endef · line 48

Quoted 9 lines

define IMX_GPU_VIV_BUILD_CMDS

package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +4 -3
 	$(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.

package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk define IMX_GPU_VIV_INSTALL_TARGET_CMDS · line 119

Quoted 9 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +1 -1
 	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 ?

package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk define IMX_GPU_VIV_INSTALL_TARGET_CMDS · line 122

Quoted 3 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +0 -0
 		for f in $(TARGET_DIR)/usr/lib/lib$${lib}-*.so; do \
 			case $$f in \
 				*-$(IMX_GPU_VIV_LIB_TARGET).so) : ;; \

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): CAMWBNu68n60JO5X1rUxnb5TD1RvV9FqeghtPLttJSHExkUy3gQ@mail.gmail.com

#12 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

Hello Refik,

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

Quoted 6 lines · On Wed, 5 Feb 2020 10:51:28 +0300 Refik Tuzakli <[email protected]> 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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

In reply to Thomas Petazzoni

Hi Thomas, Refik,

Le mar. 4 f?vr. 2020 ? 11:10 PM, Thomas Petazzoni < [email protected]> a ?crit :

Quoted 50 lines

Hello,

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

Quoted 1 line · On Mon, 3 Feb 2020 22:31:53 +0300 Refik Tuzakli <[email protected]>…

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

Quoted 2 lines

define IMX_GPU_VIV_BUILD_CMDS

      $(SED) 's/defined(LINUX)/defined(__linux__)/g'

$(@D)/gpu-core/usr/include/*/*.h

package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk endef

Quoted 4 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +1 -3
-     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

Quoted 1 line

+ ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so

$(@D)/gpu-core/usr/lib/libGL.so.1

Quoted 1 line

+ ln -sf libGL-$(IMX_GPU_VIV_LIB_TARGET).so

$(@D)/gpu-core/usr/lib/libGL.so.1.2

Quoted 1 line

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

Quoted 1 line
      ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so

$(@D)/gpu-core/usr/lib/libEGL.so

Quoted 1 line
      ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so

$(@D)/gpu-core/usr/lib/libEGL.so.1

Quoted 1 line
      ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so

$(@D)/gpu-core/usr/lib/libEGL.so.1.0

package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk define IMX_GPU_VIV_INSTALL_TARGET_CMDS · line 119

Quoted 6 lines
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +1 -1
@@ -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.

Quoted 4 lines

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

Quoted 1 line

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

#14 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

Hello,

Quoted 2 lines · On Wed, 5 Feb 2020 16:54:15 +0100 Gary Bisson <[email protected]> wrote:

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

Thanks, enjoy your vacations! :-)

Quoted 6 lines

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 ?

Quoted 2 lines

- 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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#15 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

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,

Quoted 37 lines · Thomas Petazzoni

Hello,

Quoted 1 line · On Wed, 5 Feb 2020 16:54:15 +0100 Gary Bisson <[email protected]> wrote:

I'm on vacation this week without any laptop around so my answer will

most

Quoted 1 line

likely be inaccurate.

Thanks, enjoy your vacations! :-)

Quoted 2 lines

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

Quoted 4 lines

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 ?

Quoted 1 line

- the only person I know who added some kind of openGL support in

Buildroot

Quoted 1 line

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

Signature · 4 lines
Refik Tuzakl?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200205/ebd472aa/attachment.html>
#16 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

Hello Thomas, Refik,

Quoted 6 lines · Refik Tuzakli

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

Quoted 26 lines

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.

Quoted 36 lines

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

I have some experience about imx8 and want to share.

Cheers,

Quoted 27 lines · Thomas Petazzoni

Hello,

Quoted 1 line · On Wed, 5 Feb 2020 16:54:15 +0100 Gary Bisson <[email protected]> wrote:

I'm on vacation this week without any laptop around so my answer will

most

Quoted 1 line

likely be inaccurate.

Thanks, enjoy your vacations! :-)

Quoted 2 lines

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

Quoted 4 lines

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 ?

Quoted 1 line

- the only person I know who added some kind of openGL support in

Buildroot

Quoted 1 line

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

#17 lore raw

PATCH v2 5/7 package/freescale-imx/imx-gpu-viv: bump to version 6.4.0.p1.0

Quoted 5 lines · On Mon, 10 Feb 2020 16:51:02 +0100 Gary Bisson <[email protected]> wrote:
Quoted 2 lines

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.

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#18 lore raw

PATCH v2 6/7 package/freescale-imx/imx-gpu-g2d: bump to version 6.4.0.p1.0

In reply to Refik Tuzakli
---
 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(-)
package/freescale-imx/imx-gpu-g2d/Config.in +5 -1
index 47375788d1..aeca087f86 100644
@@ -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
package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.hash +6 -1
index 3bcbc558e2..1ad90d34a6 100644
@@ -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
+
package/freescale-imx/imx-gpu-g2d/imx-gpu-g2d.mk +5 -1
index 015ab628b6..6598e4c32b 100644
@@ -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
Signature · 1 line
2.17.1
#19 lore raw

PATCH v2 6/7 package/freescale-imx/imx-gpu-g2d: bump to version 6.4.0.p1.0

Quoted 6 lines · On Mon, 3 Feb 2020 22:31:54 +0300 Refik Tuzakli <[email protected]>…
---
 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

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#21 lore raw

PATCH v2 7/7 DEVELOPERS: update my entry list

Quoted 4 lines · On Mon, 3 Feb 2020 22:31:55 +0300 Refik Tuzakli <[email protected]>…
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

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

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#22 lore raw

PATCH v2 1/7 enable vivante gpu driver for imx8x

In reply to Refik Tuzakli
Quoted 4 lines · On Mon, 3 Feb 2020 22:31:49 +0300 Refik Tuzakli <[email protected]>…
---
 package/freescale-imx/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com