Skip to contentSkip to conversation

weston: fix i.MX support

PATCH New Gary Bisson 2 participants 6 messages Jun 19, 2020 – Sep 12, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

cover weston: fix i.MX support

Hi,

This series aims at fixing the weston support for i.MX processors.

Long time ago, weston-imx was added for i.MX8MQ as part of the weston package. Then it was split from it as the versions differed.

Since then the weston-imx was broken and updating it seems like a bad idea as it now requires forking several other components:
- libdrm [1]
- waylands-protocols [2]

This series therefore removes weston-imx and adds vivante support to the regular weston package.

Drawback here is that the HDR capabilities of the i.MX8MQ or the GPU2D of the i.MX8M Mini won't be used in Weston. I'd rather have those limitations and use standard weston than forking everything.

Also, note that this series was tested on Nitrogen8M and Nitrogen8M Mini platforms, making sure the Vivante 3D examples are properly running. However in order to compile weston properly with Vivante as egl provider, one patch sent earlier [3] is needed.

Let me know if you have any questions.

Regards,
Gary

[1] https://source.codeaurora.org/external/imx/meta-imx/tree/meta-bsp/recipes-graphics/drm/libdrm_2.4.99.imx.bb?h=zeus-5.4.3-1.0.0
[2] https://source.codeaurora.org/external/imx/meta-imx/tree/meta-bsp/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb?h=zeus-5.4.3-1.0.0
[3] http://patchwork.ozlabs.org/project/buildroot/patch/20200402130842.918696-3-gary.bisson at boundarydevices.com/

Gary Bisson (2):
package/weston: add imx-gpu-viv as possible egl provider package/weston-imx: remove deprecated package

 Config.in.legacy                   |   6 ++
 package/Config.in                  |   1 -
 package/weston-imx/Config.in       | 114 -----------------------
 package/weston-imx/weston-imx.hash |   3 -
 package/weston-imx/weston-imx.mk   | 144 -----------------------------
 package/weston/Config.in           |   8 +-
 6 files changed, 10 insertions(+), 266 deletions(-)
 delete mode 100644 package/weston-imx/Config.in
 delete mode 100644 package/weston-imx/weston-imx.hash
 delete mode 100644 package/weston-imx/weston-imx.mk
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 package/weston: add imx-gpu-viv as possible egl provider

As the imx-gpu-viv package provides both EGL and gbm libraries.

---
 package/weston/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/weston/Config.in +4 -4
index bf783b70d4..d07eba4c9d 100644
@@ -39,11 +39,11 @@ config BR2_PACKAGE_WESTON_DEFAULT_FBDEV
 
 config BR2_PACKAGE_WESTON_DEFAULT_DRM
 	bool "drm"
-	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
+	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
 	select BR2_PACKAGE_WESTON_DRM
 
 comment "drm backend needs mesa3d w/ EGL driver"
-	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL
+	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
 
 config BR2_PACKAGE_WESTON_DEFAULT_X11
 	bool "X11"
@@ -63,11 +63,11 @@ config BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR
 
 config BR2_PACKAGE_WESTON_DRM
 	bool "DRM compositor"
-	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
+	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
 
 # Uses libgbm from mesa3d
 comment "DRM compositor needs an OpenGL EGL backend provided by mesa3d"
-	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL
+	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL
 
 config BR2_PACKAGE_WESTON_FBDEV
 	bool "fbdev compositor"
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 package/weston-imx: remove deprecated package

In reply to Gary Bisson

- the package couldn't be selected with vivante backend anyway since the split
- the package couldn't be updated to newer versions as it would imply forking libdrm and wayland-protocols for it to build
- drawback of not using NXP weston is the lack of G2D support, let's have it as a known issue for Buildroot but use standard weston package

---
 Config.in.legacy                   |   6 ++
 package/Config.in                  |   1 -
 package/weston-imx/Config.in       | 114 -----------------------
 package/weston-imx/weston-imx.hash |   3 -
 package/weston-imx/weston-imx.mk   | 144 -----------------------------
 5 files changed, 6 insertions(+), 262 deletions(-)
 delete mode 100644 package/weston-imx/Config.in
 delete mode 100644 package/weston-imx/weston-imx.hash
 delete mode 100644 package/weston-imx/weston-imx.mk
Config.in.legacy +6 -0
index 4074c34c56..f004f42c42 100644
@@ -152,6 +152,12 @@ config BR2_PACKAGE_KODI_PERIPHERAL_STEAMCONTROLLER
 	help
 	  This package is broken.
 
+config BR2_PACKAGE_WESTON_IMX
+	bool "weston-imx package was removed"
+	select BR2_LEGACY
+	help
+	  This package has been removed, use weston instead.
+
 comment "Legacy options removed in 2020.05"
 
 config BR2_PACKAGE_WIRINGPI
package/Config.in +0 -1
index 7e4476d337..780cca86b1 100644
@@ -345,7 +345,6 @@ comment "QT libraries and helper libraries"
 endif
 	source "package/tekui/Config.in"
 	source "package/weston/Config.in"
-	source "package/weston-imx/Config.in"
 	source "package/x11r7/Config.in"
 
 comment "X applications"
package/weston-imx/Config.in deleted +0 -114

114 lines not on this page · raw message

package/weston-imx/weston-imx.hash deleted +0 -3
deleted file mode 100644
index 56885d71ac..0000000000
@@ -1,3 +0,0 @@
-# locally computed
-sha256  f39f7a24a01b023aa204ad47977a6476c17a307769f29d408621a05b5cbbcfc7  weston-imx-rel_imx_4.9.51_8mq_ga.tar.gz
-sha256  fdb65868f65d0fbdb05c2d3b779e10ce9969fa0c4b9262ba4f260e87086ab860  COPYING
package/weston-imx/weston-imx.mk deleted +0 -144

144 lines not on this page · raw message

Signature · 1 line
2.26.2
#3 lore raw

cover weston: fix i.MX support

In reply to Gary Bisson

Hi,

Gentle ping on this series, do you have any questions?

Note that I got i.MX8M VPU to work using regular GStreamer packages + gtreamer-imx-v2 plugin but is only useful if Weston if fixed (as i.MX8* graphics only support Wayland backend).

Regards,
Gary

Quoted 51 lines · Gary Bisson

Hi,

This series aims at fixing the weston support for i.MX processors.

Long time ago, weston-imx was added for i.MX8MQ as part of the weston package. Then it was split from it as the versions differed.

Since then the weston-imx was broken and updating it seems like a bad idea as it now requires forking several other components:
- libdrm [1]
- waylands-protocols [2]

This series therefore removes weston-imx and adds vivante support to the regular weston package.

Drawback here is that the HDR capabilities of the i.MX8MQ or the GPU2D of the i.MX8M Mini won't be used in Weston. I'd rather have those limitations and use standard weston than forking everything.

Also, note that this series was tested on Nitrogen8M and Nitrogen8M Mini platforms, making sure the Vivante 3D examples are properly running. However in order to compile weston properly with Vivante as egl provider, one patch sent earlier [3] is needed.

Let me know if you have any questions.

Regards,
Gary

[1] https://source.codeaurora.org/external/imx/meta-imx/tree/meta-bsp/recipes-graphics/drm/libdrm_2.4.99.imx.bb?h=zeus-5.4.3-1.0.0
[2] https://source.codeaurora.org/external/imx/meta-imx/tree/meta-bsp/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb?h=zeus-5.4.3-1.0.0
[3] http://patchwork.ozlabs.org/project/buildroot/patch/20200402130842.918696-3-gary.bisson at boundarydevices.com/

Gary Bisson (2):
package/weston: add imx-gpu-viv as possible egl provider package/weston-imx: remove deprecated package

 Config.in.legacy                   |   6 ++
 package/Config.in                  |   1 -
 package/weston-imx/Config.in       | 114 -----------------------
 package/weston-imx/weston-imx.hash |   3 -
 package/weston-imx/weston-imx.mk   | 144 -----------------------------
 package/weston/Config.in           |   8 +-
 6 files changed, 10 insertions(+), 266 deletions(-)
 delete mode 100644 package/weston-imx/Config.in
 delete mode 100644 package/weston-imx/weston-imx.hash
 delete mode 100644 package/weston-imx/weston-imx.mk
Signature · 1 line
2.26.2
#4 lore raw

cover weston: fix i.MX support

In reply to Gary Bisson

Hello,

Quoted 3 lines · On Fri, 19 Jun 2020 14:54:58 +0200 Gary Bisson…

Gary Bisson (2):
package/weston: add imx-gpu-viv as possible egl provider package/weston-imx: remove deprecated package

Thanks, series applied.

For the first patch, I think we need to add a proper libgbm virtual package. I had a patch series for that, but it's not trivial as not all gbm implementations implement the full/recent GBM API. I had some ideas to address that, but needs some more investigation/time.

Thomas

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

cover weston: fix i.MX support

Hi Thomas,

Quoted 10 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · On Fri, 19 Jun 2020 14:54:58 +0200 Gary Bisson…

Gary Bisson (2):
package/weston: add imx-gpu-viv as possible egl provider package/weston-imx: remove deprecated package

Thanks, series applied.

Thanks, that is awesome!

Quoted 4 lines

For the first patch, I think we need to add a proper libgbm virtual package. I had a patch series for that, but it's not trivial as not all gbm implementations implement the full/recent GBM API. I had some ideas to address that, but needs some more investigation/time.

Yes that would indeed be a better solution, I've noticed other packages that have added dependency on Mesa3d for libgbm (kmscube, glmark2 pending patch[1]).

From the cover letter of this series I also mentioned another patch sent before that is necessary for a proper build of Weston with imx-gpu-viv [2].
I thought that was that patch that was problematic as, as you pointed out already, the sed isn't an elegant solution but I still believe it's the less intrusive one.
Let me know what you think of it.

Regards,
Gary

[1] http://patchwork.ozlabs.org/project/buildroot/patch/20200104193919.91589-2-bernd.kuhls at t-online.de/
[2] http://patchwork.ozlabs.org/project/buildroot/patch/20200402130842.918696-3-gary.bisson at boundarydevices.com/