package/opengl/libgbm: new virtual package
PATCH v2 1/7 package/opengl/libgbm: new virtual package
From: Bernd Kuhls <[email protected]>
Kodi 18.0-Leia will implement stand-alone gbm support alongside x11 & wayland. To enable building libgbm in mesa3d without x11 & wayland we need to create a virtual package for libgbm.
Also other packages besides mesa3d may provide libgbm.so, see
http://patchwork.ozlabs.org/patch/647235/
http://patchwork.ozlabs.org/patch/939703/
We also introduce two feature that shall help user choosing the version implemented by a libgbm provider. This foresightly avoid building package without having the required libgbm version (e.g. kmscube, qt5, sdl2 etc.)
---
Changes v1 -> v2:
- Squashed patch 1/2
- Added more relevant comment for each features added
package/opengl/Config.in | 1 + package/opengl/libgbm/Config.in | 24 ++++++++++++++++++++++++ package/opengl/libgbm/libgbm.mk | 9 +++++++++ 3 files changed, 34 insertions(+) create mode 100644 package/opengl/libgbm/Config.in create mode 100644 package/opengl/libgbm/libgbm.mk
package/opengl/Config.in +1 -0
@@ -1,5 +1,6 @@ source "package/opengl/libgl/Config.in" source "package/opengl/libegl/Config.in" +source "package/opengl/libgbm/Config.in" source "package/opengl/libgles/Config.in" source "package/opengl/libopencl/Config.in" source "package/opengl/libopenvg/Config.in"
package/opengl/libgbm/Config.in new file +24 -0
@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HAS_LIBGBM + bool + +config BR2_PACKAGE_PROVIDES_LIBGBM + string + depends on BR2_PACKAGE_HAS_LIBGBM + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# format modifier plane count feature. This API was initially introduced +# in mesa3d version 17. A gbm implementation provides this feature if it +# is implement function gbm_device_get_format_modifier_plane_count. + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# dma buffer feature. This API was initially introduced in mesa3d +# version 10. A gbm implementation provides this feature if it +# is implement function gbm_bo_get_fd.
package/opengl/libgbm/libgbm.mk new file +9 -0
@@ -0,0 +1,9 @@ +################################################################################ +# +# libgbm +# +################################################################################ + +# This package requires to install a gbm.pc which needs +# to be provided by GBM providers. +$(eval $(virtual-package))
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/7 package/mesa3d: add gbm api features
From: Bernd Kuhls <[email protected]>
Introduce gbm features so that each packages depending on it can choose which implementation is required.
--- package/mesa3d/Config.in | 6 ++++++ 1 file changed, 6 insertions(+)
package/mesa3d/Config.in +6 -0
@@ -387,6 +387,9 @@ config BR2_PACKAGE_MESA3D_GBM bool "gbm" depends on BR2_PACKAGE_MESA3D_DRI_DRIVER \ || (BR2_PACKAGE_MESA3D_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_OPENGL_EGL) + select BR2_PACKAGE_HAS_LIBGBM + select BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF help Enable Generic Buffer Management (gbm)
@@ -423,6 +426,9 @@ config BR2_PACKAGE_MESA3D_OPENGL_ES endif # BR2_PACKAGE_MESA3D_DRIVER +config BR2_PACKAGE_PROVIDES_LIBGBM + default "mesa3d" if BR2_PACKAGE_MESA3D_GBM + config BR2_PACKAGE_PROVIDES_LIBGL default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_GLX
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/7 package/sunxi-mali-mainline: bump version
In reply to Kamel BouharaFrom: Thomas Petazzoni <[email protected]>
Bumps the sunxi-mali-mainline upstream version to 418f55585e76f375792dbebb3e97532f0c1c556d
---
Changes v1 -> v2:
- Updated package hash
package/sunxi-mali-mainline/sunxi-mali-mainline.hash | 2 +- package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/sunxi-mali-mainline/sunxi-mali-mainline.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 72969ecf470b9e5ce787c2f8f36242926e1e892af0891924ee59a2cd206de39f sunxi-mali-mainline-d691cb93884ca8ac67860502117bbec283dc19aa.tar.gz +sha256 b5e7e8f9f2886ed0b273f72ea16ae4868711726fe33e3d80ef24e86269c90fd2 sunxi-mali-mainline-418f55585e76f375792dbebb3e97532f0c1c556d.tar.gz sha256 8a06bcae44a41a886f339b4338422415a786787f113e9ed6456ae117104a0b6a EULA_for_Mali_400MP_AW.pdf
package/sunxi-mali-mainline/sunxi-mali-mainline.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -SUNXI_MALI_MAINLINE_VERSION = d691cb93884ca8ac67860502117bbec283dc19aa +SUNXI_MALI_MAINLINE_VERSION = 418f55585e76f375792dbebb3e97532f0c1c556d SUNXI_MALI_MAINLINE_SITE = $(call github,bootlin,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION)) SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/7 package/sunxi-mali-mainline: add support for different outputs
In reply to Kamel BouharaFrom: Thomas Petazzoni <[email protected]>
Adds support for selecting one of the four display API supported: fbdev, wayland, x11-dmabuf, x11-ump.
--- package/sunxi-mali-mainline/Config.in | 26 ++++++++++++++++ .../sunxi-mali-mainline.mk | 30 +++++++++++++++++-- 2 files changed, 53 insertions(+), 3 deletions(-)
package/sunxi-mali-mainline/Config.in +26 -0
@@ -17,6 +17,24 @@ config BR2_PACKAGE_PROVIDES_LIBEGL config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-mainline" +choice + prompt "Output" + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV + bool "fbdev" + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND + bool "wayland" + depends on BR2_PACKAGE_WAYLAND + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_DMABUF + bool "x11 dma-buf" + +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_UMP + bool "x11 ump" + +endchoice + choice prompt "Version" default BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2
@@ -27,9 +45,17 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 bool "r6p2" config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 bool "r8p1" + depends on BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV endchoice +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT + string + default "fbdev" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV + default "wayland" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND + default "x11_dma_buf" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_DMABUF + default "x11_ump" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_UMP + config BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION string default "r6p2" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2
package/sunxi-mali-mainline/sunxi-mali-mainline.mk +27 -3
@@ -21,22 +21,46 @@ else ifeq ($(BR2_aarch64),y) SUNXI_MALI_MAINLINE_ARCH=arm64 endif +SUNXI_MALI_MAINLINE_OUTPUT = $(call qstrip,$(BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT)) +SUNXI_MALI_MAINLINE_LIB_SUBDIR = \ + $(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/$(SUNXI_MALI_MAINLINE_OUTPUT) + +ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_DMABUF)$(BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_UMP),y) +SUNXI_MALI_MAINLINE_INCLUDE_SUBDIR = include/x11 +else +SUNXI_MALI_MAINLINE_INCLUDE_SUBDIR = \ + include/$(SUNXI_MALI_MAINLINE_OUTPUT) +define SUNXI_MALI_MAINLINE_FIXUP_EGL_PC + $(SED) "s/Cflags: /Cflags: -DMESA_EGL_NO_X11_HEADERS /" \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc +endef +endif + +ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND),y) +SUNXI_MALI_MAINLINE_DEPENDENCIES += wayland +endif + +# FIXME: install gbm.pc conditionally define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include - cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_LIB_SUBDIR)/*.so* \ $(STAGING_DIR)/usr/lib/ - cp -rf $(@D)/include/fbdev/* $(STAGING_DIR)/usr/include/ + cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_INCLUDE_SUBDIR)/* \ + $(STAGING_DIR)/usr/include/ $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/egl.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/glesv2.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc + $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/gbm.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/gbm.pc + $(SUNXI_MALI_MAINLINE_FIXUP_EGL_PC) endef define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_REV)/$(SUNXI_MALI_MAINLINE_ARCH)/fbdev/*.so* \ + cp -rf $(@D)/$(SUNXI_MALI_MAINLINE_LIB_SUBDIR)/*.so* \ $(TARGET_DIR)/usr/lib/ endef
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 4/7] package/sunxi-mali-mainline: add support for different outputs
package/sunxi-mali-mainline/sunxi-mali-mainline.mk else ifeq ($(BR2_aarch64),y) · line 57
Quoted 2 lines · On Wed, 29 Sep 2021 00:37:51 +0200 Kamel Bouhara <[email protected]>…
package/sunxi-mali-mainline/sunxi-mali-mainline.mk +2
-0+ $(INSTALL) -D -m 0644 package/sunxi-mali-mainline/gbm.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/gbm.pc
This needs to go in patch 5/7, as it's patch 5/7 that adds the file package/sunxi-mali-mainline/gbm.pc.
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 5/7 package/sunxi-mali-mainline: provides libgbm
In reply to Kamel BouharaRegisters the package as a libgbm provider.
---
Changes v1 -> v2:
- Fixed gbm features are provided only when wayland is set
package/sunxi-mali-mainline/Config.in | 6 ++++++ package/sunxi-mali-mainline/gbm.pc | 12 ++++++++++++ package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 1 + 3 files changed, 19 insertions(+) create mode 100644 package/sunxi-mali-mainline/gbm.pc
package/sunxi-mali-mainline/Config.in +6 -0
@@ -3,6 +3,7 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE depends on BR2_aarch64 || (BR2_ARM_EABIHF && BR2_arm) depends on BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGBM select BR2_PACKAGE_HAS_LIBGLES help Install userspace Allwinner OpenGL libraries.
@@ -14,6 +15,9 @@ if BR2_PACKAGE_SUNXI_MALI_MAINLINE config BR2_PACKAGE_PROVIDES_LIBEGL default "sunxi-mali-mainline" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-mainline" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND + config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-mainline"
@@ -26,6 +30,8 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND bool "wayland" depends on BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + select BR2_PACKAGE_HAS_LIBGBM config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_DMABUF bool "x11 dma-buf"
package/sunxi-mali-mainline/gbm.pc new file +12 -0
@@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=/usr +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: gbm +Description: ARM Mali implementation of gbm +Requires.private: +Version: 1.0 +Libs: -L${libdir} -lgbm +Libs.private: +Cflags: -I${includedir}
package/sunxi-mali-mainline/sunxi-mali-mainline.mk +1 -0
@@ -38,6 +38,7 @@ endif ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND),y) SUNXI_MALI_MAINLINE_DEPENDENCIES += wayland +SUNXI_MALI_MAINLINE_PROVIDES += libgbm endif # FIXME: install gbm.pc conditionally
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 5/7] package/sunxi-mali-mainline: provides libgbm
Quoted 37 lines · On Wed, 29 Sep 2021 00:37:52 +0200 Kamel Bouhara <[email protected]>…
Registers the package as a libgbm provider.
Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Kamel Bouhara <[email protected]>---
Changes v1 -> v2:
- Fixed gbm features are provided only when wayland is setpackage/sunxi-mali-mainline/Config.in | 6 ++++++ package/sunxi-mali-mainline/gbm.pc | 12 ++++++++++++ package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 1 + 3 files changed, 19 insertions(+) create mode 100644 package/sunxi-mali-mainline/gbm.pcpackage/sunxi-mali-mainline/Config.in +4
-0@@ -3,6 +3,7 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE depends on BR2_aarch64 || (BR2_ARM_EABIHF && BR2_arm) depends on BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGBM select BR2_PACKAGE_HAS_LIBGLES help Install userspace Allwinner OpenGL libraries.@@ -14,6 +15,9 @@ if BR2_PACKAGE_SUNXI_MALI_MAINLINE config BR2_PACKAGE_PROVIDES_LIBEGL default "sunxi-mali-mainline" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "sunxi-mali-mainline" if BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND + config BR2_PACKAGE_PROVIDES_LIBGLES default "sunxi-mali-mainline"
package/sunxi-mali-mainline/Config.in config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV · line 34
Quoted 5 lines
package/sunxi-mali-mainline/Config.in +2
-0@@ -26,6 +30,8 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND bool "wayland" depends on BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + select BR2_PACKAGE_HAS_LIBGBM
It still doesn't make sense: you're selecting BR2_PACKAGE_HAS_LIBGBM both in the main package option and here.
So either libgbm is only provided by the wayland-variant of the sunxi-mali-mainline OpenGL implementation, or it's provided by all. But having the "select BR2_PACKAGE_HAS_LIBGBM" in two places doesn't make sense.
package/sunxi-mali-mainline/Config.in config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_FBDEV
Quoted 4 lines
package/sunxi-mali-mainline/Config.in +1
-0ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND),y) SUNXI_MALI_MAINLINE_DEPENDENCIES += wayland +SUNXI_MALI_MAINLINE_PROVIDES += libgbm endif
According to this, it's only the wayland-variant that supports libgbm. So the "select BR2_PACKAGE_HAS_LIBGBM" in BR2_PACKAGE_SUNXI_MALI_MAINLINE is wrong. I think this was already pointed out in the review of v1.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 6/7 package/kmscube: use libgbm virtual package
In reply to Kamel BouharaFrom: Thomas Petazzoni <[email protected]>
kmscube requires a libgbm implementation, which until now, only Mesa3D was providing, so kmscube had a direct dependency on Mesa3D.
However, now that we have a proper libgbm virtual package, so this commit converts the kmscube package to use the libegl, libgbm and libgles virtual packages.
--- package/kmscube/Config.in | 18 ++++++++++++++---- package/kmscube/kmscube.mk | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-)
package/kmscube/Config.in +14 -4
@@ -1,9 +1,19 @@ config BR2_PACKAGE_KMSCUBE bool "kmscube" - # requires libgbm from mesa3d - depends on BR2_PACKAGE_MESA3D_OPENGL_EGL - depends on BR2_PACKAGE_MESA3D_OPENGL_ES + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm + select BR2_PACKAGE_LIBDRM help kmscube is an application to test kms/drm drivers. - https://gitlab.freedesktop.org/mesa/kmscube + https://cgit.freedesktop.org/mesa/kmscube/ + +comment "kmscube needs EGL, GBM and OpenGL ES, and a toolchain w/ thread support" + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + depends on BR2_PACKAGE_HAS_LIBGLES + depends on !BR2_TOOLCHAIN_HAS_THREADS
package/kmscube/kmscube.mk +1 -1
@@ -8,6 +8,6 @@ KMSCUBE_VERSION = 4660a7dca6512b6e658759d00cff7d4ad2a2059d KMSCUBE_SITE = https://gitlab.freedesktop.org/mesa/kmscube/-/archive/$(KMSCUBE_VERSION) KMSCUBE_LICENSE = MIT KMSCUBE_LICENSE_FILES = COPYING -KMSCUBE_DEPENDENCIES = host-pkgconf mesa3d libdrm +KMSCUBE_DEPENDENCIES = host-pkgconf libgles libegl libgbm libdrm $(eval $(meson-package))
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 6/7] package/kmscube: use libgbm virtual package
Quoted 18 lines · On Wed, 29 Sep 2021 00:37:53 +0200 Kamel Bouhara <[email protected]>…
package/kmscube/Config.in +6
-3@@ -1,9 +1,19 @@ config BR2_PACKAGE_KMSCUBE bool "kmscube" - # requires libgbm from mesa3d - depends on BR2_PACKAGE_MESA3D_OPENGL_EGL - depends on BR2_PACKAGE_MESA3D_OPENGL_ES + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm + select BR2_PACKAGE_LIBDRM help kmscube is an application to test kms/drm drivers.
package/kmscube/Config.in line 19
Quoted 10 lines
package/kmscube/Config.in +8
-1- https://gitlab.freedesktop.org/mesa/kmscube + https://cgit.freedesktop.org/mesa/kmscube/ + +comment "kmscube needs EGL, GBM and OpenGL ES, and a toolchain w/ thread support" + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + depends on BR2_PACKAGE_HAS_LIBGLES + depends on !BR2_TOOLCHAIN_HAS_THREADS
This should be:
depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGBM || !BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT || !depends on BR2_PACKAGE_HAS_LIBGLES || !BR2_TOOLCHAIN_HAS_THREADS
Indeed, in your current implementation, the comment will only show up if we have EGL, gbm, OpenGLES available but threads are not available. This makes a comment suggesting to enable EGL, GBM and OpenGL ES a bit useless.
Instead what we want is to show the comment if EGL is missing, or if GBM is missing, or if OpenGL ES is missing, or if threads are missing.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 7/7 package/gcnano-binaries: provides libgbm
In reply to Kamel BouharaAdd package as a libgbm provider
--- package/gcnano-binaries/Config.in | 6 ++++++ package/gcnano-binaries/gcnano-binaries.mk | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
package/gcnano-binaries/Config.in +6 -0
@@ -15,6 +15,9 @@ config BR2_PACKAGE_GCNANO_BINARIES depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland depends on !BR2_STATIC_LIBS select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGBM + select BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF select BR2_PACKAGE_HAS_LIBGLES select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_WAYLAND
@@ -27,6 +30,9 @@ if BR2_PACKAGE_GCNANO_BINARIES config BR2_PACKAGE_PROVIDES_LIBEGL default "gcnano-binaries" +config BR2_PACKAGE_PROVIDES_LIBGBM + default "gcnano-binaries" + config BR2_PACKAGE_PROVIDES_LIBGLES default "gcnano-binaries"
package/gcnano-binaries/gcnano-binaries.mk +1 -1
@@ -20,7 +20,7 @@ GCNANO_BINARIES_DEPENDENCIES = linux wayland libdrm GCNANO_BINARIES_INSTALL_STAGING = YES -GCNANO_BINARIES_PROVIDES = libegl libgles +GCNANO_BINARIES_PROVIDES = libegl libgles libgbm # The Github repository doesn't contain the source code as-is: it # contains a tarball with the kernel driver source code, and a
Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 6 lines · On Wed, 29 Sep 2021 00:37:48 +0200 Kamel Bouhara <[email protected]>…
From: Bernd Kuhls <[email protected]>
Kodi 18.0-Leia will implement stand-alone gbm support alongside x11 & wayland. To enable building libgbm in mesa3d without x11 & wayland we need to create a virtual package for libgbm.
Quoted 8 lines
Also other packages besides mesa3d may provide libgbm.so, see
http://patchwork.ozlabs.org/patch/647235/
http://patchwork.ozlabs.org/patch/939703/We also introduce two feature that shall help user choosing the version implemented by a libgbm provider. This foresightly avoid building package without having the required libgbm version (e.g. kmscube, qt5, sdl2 etc.)
I would rephrase this as such:
"""
It turns out that libgbm has seen several additions in its API over time, and therefore not all libgbm implementations provide support for all features. In order to account for this, this commit adds two hidden boolean options that allow libgbm providers to indicate which optional features they support:BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT and BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF. These booleans must be selected by the packages providing libgbm implementations, and depended on by packages using libgbm.
"""
Question: do we have in the tree some libgbm implementation that support neither BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT nor BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF ?
Quoted 11 lines
package/opengl/libgbm/Config.in new file +5
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HAS_LIBGBM + bool + +config BR2_PACKAGE_PROVIDES_LIBGBM + string
package/opengl/libgbm/Config.in line 15
Quoted 10 lines
package/opengl/libgbm/Config.in new file +10
-0+ depends on BR2_PACKAGE_HAS_LIBGBM + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# format modifier plane count feature. This API was initially introduced +# in mesa3d version 17. A gbm implementation provides this feature if it +# is implement function gbm_device_get_format_modifier_plane_count.
The comment should be before the option.
package/opengl/libgbm/Config.in line 24
Quoted 8 lines
package/opengl/libgbm/Config.in new file +8
-0+config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# dma buffer feature. This API was initially introduced in mesa3d +# version 10. A gbm implementation provides this feature if it +# is implement function gbm_bo_get_fd.
Ditto.
Note: no need to resend to address those comments, they can be fixed up when applying.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · Thomas Petazzoni
Hello,
Hello Thomas,
Quoted 20 lines
Quoted 6 lines · On Wed, 29 Sep 2021 00:37:48 +0200 Kamel Bouhara <[email protected]>…
From: Bernd Kuhls <[email protected]>
Kodi 18.0-Leia will implement stand-alone gbm support alongside x11 & wayland. To enable building libgbm in mesa3d without x11 & wayland we need to create a virtual package for libgbm.
Quoted 8 lines
Also other packages besides mesa3d may provide libgbm.so, see
http://patchwork.ozlabs.org/patch/647235/
http://patchwork.ozlabs.org/patch/939703/We also introduce two feature that shall help user choosing the version implemented by a libgbm provider. This foresightly avoid building package without having the required libgbm version (e.g. kmscube, qt5, sdl2 etc.)
I would rephrase this as such:
Quoted 12 lines
"""
It turns out that libgbm has seen several additions in its API over time, and therefore not all libgbm implementations provide support for all features. In order to account for this, this commit adds two hidden boolean options that allow libgbm providers to indicate which optional features they support:BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNTandBR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF. These booleans must be selected by the packages providing libgbm implementations, and depended on by packages using libgbm.
"""
OK.
Quoted 4 lines
Question: do we have in the tree some libgbm implementation that support neither
BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNTnorBR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF?
So far, the dma buf feature (mesa gbm v10) is provided by every implementation I compared (gcnano, ti, sunxi, imx-gpu).
Thanks for the review, sending a v3 soon.
Kamel
Quoted 39 lines
Quoted 12 lines
package/opengl/libgbm/Config.in new file +5
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HAS_LIBGBM + bool + +config BR2_PACKAGE_PROVIDES_LIBGBM + stringpackage/opengl/libgbm/Config.in line 15
Quoted 10 lines
package/opengl/libgbm/Config.in new file +10
-0+ depends on BR2_PACKAGE_HAS_LIBGBM + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# format modifier plane count feature. This API was initially introduced +# in mesa3d version 17. A gbm implementation provides this feature if it +# is implement function gbm_device_get_format_modifier_plane_count.The comment should be before the option.
package/opengl/libgbm/Config.in line 24
Quoted 8 lines
package/opengl/libgbm/Config.in new file +8
-0+config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# dma buffer feature. This API was initially introduced in mesa3d +# version 10. A gbm implementation provides this feature if it +# is implement function gbm_bo_get_fd.Ditto.
Note: no need to resend to address those comments, they can be fixed up when applying.
Quoted 7 lines
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Kamel,
Quoted 7 lines · On Thu, 7 Oct 2021 11:35:34 +0200 Kamel Bouhara <[email protected]>…
Quoted 4 lines
Question: do we have in the tree some libgbm implementation that support neither
BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNTnorBR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF?So far, the dma buf feature (mesa gbm v10) is provided by every implementation I compared (gcnano, ti, sunxi, imx-gpu).
So what made you think we need to identify this feature separately from others?
The whole point of this "feature" mechanism is to be able to distinguish the different GBM implementations in the features they provide.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
A message that is not in the archive (sent off-list or not yet received): YWA98UOCDjOFh51v@aptenodytes
Quoted 9 lines · On Fri, 8 Oct 2021 14:47:45 +0200 Paul Kocialkowski…
Quoted 2 lines
So what made you think we need to identify this feature separately from others?
I seem to recall that earlier versions of the sunxi blobs didn't have dma-buf support, and they eventually released some that did.
So my two cents would be that dma-buf is not part of the "base" set of features from the GBM API and it makes sense to recognize it as an additional feature.
Thanks, useful feedback (should I say "as usual" ?). Should perhaps be captured "somewhere" (commit log ? comment above the feature option ?).
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Kamel, All,
Your series has had a few comments. Most are minor, but one or two need a bit more insights and can't be fixed while applying. As such, I've marked it as Changes Requested in Patchwork.
Also, could you write a cover-letter that exlpains the goal behind that series and how it is organised? A cover letter usually helps reviewers udnerstand the bigger picture of a series, while the individual patches describe more localised changes.
Regards,
Yann E. MORIN.
On 2021-09-29 00:37 +0200, Kamel Bouhara spake thusly:
Quoted 94 lines
From: Bernd Kuhls <[email protected]>
Kodi 18.0-Leia will implement stand-alone gbm support alongside x11 & wayland. To enable building libgbm in mesa3d without x11 & wayland we need to create a virtual package for libgbm.
Also other packages besides mesa3d may provide libgbm.so, see
http://patchwork.ozlabs.org/patch/647235/
http://patchwork.ozlabs.org/patch/939703/We also introduce two feature that shall help user choosing the version implemented by a libgbm provider. This foresightly avoid building package without having the required libgbm version (e.g. kmscube, qt5, sdl2 etc.)
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Kamel Bouhara <[email protected]>[ Kamel : introduce gbm api features ]---
Changes v1 -> v2:
- Squashed patch 1/2
- Added more relevant comment for each features addedpackage/opengl/Config.in | 1 + package/opengl/libgbm/Config.in | 24 ++++++++++++++++++++++++ package/opengl/libgbm/libgbm.mk | 9 +++++++++ 3 files changed, 34 insertions(+) create mode 100644 package/opengl/libgbm/Config.in create mode 100644 package/opengl/libgbm/libgbm.mkpackage/opengl/Config.in +1
-0@@ -1,5 +1,6 @@ source "package/opengl/libgl/Config.in" source "package/opengl/libegl/Config.in" +source "package/opengl/libgbm/Config.in" source "package/opengl/libgles/Config.in" source "package/opengl/libopencl/Config.in" source "package/opengl/libopenvg/Config.in"package/opengl/libgbm/Config.in new file +24
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HAS_LIBGBM + bool + +config BR2_PACKAGE_PROVIDES_LIBGBM + string + depends on BR2_PACKAGE_HAS_LIBGBM + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# format modifier plane count feature. This API was initially introduced +# in mesa3d version 17. A gbm implementation provides this feature if it +# is implement function gbm_device_get_format_modifier_plane_count. + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# dma buffer feature. This API was initially introduced in mesa3d +# version 10. A gbm implementation provides this feature if it +# is implement function gbm_bo_get_fd.package/opengl/libgbm/libgbm.mk new file +9
-0@@ -0,0 +1,9 @@ +################################################################################ +# +# libgbm +# +################################################################################ + +# This package requires to install a gbm.pc which needs +# to be provided by GBM providers. +$(eval $(virtual-package))Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · Yann E. MORIN
Kamel, All,
Hello,
Quoted 9 lines
Your series has had a few comments. Most are minor, but one or two need a bit more insights and can't be fixed while applying. As such, I've marked it as Changes Requested in Patchwork.
Also, could you write a cover-letter that exlpains the goal behind that series and how it is organised? A cover letter usually helps reviewers udnerstand the bigger picture of a series, while the individual patches describe more localised changes.
Of course, I actually sent the cover-letter in the first version and I tough it was not nececessary to re-sent it again.
"This series introduce a virtual/package for the libgbm.
We also introduce two gbm features so that packages depending on it can select which version of the api is required.
Note that we only added sunxi, gcnano and mesa3d api but other implementations can be added later based on this series."
Regards,
Kamel
Quoted 101 lines
Regards,
Yann E. MORIN.On 2021-09-29 00:37 +0200, Kamel Bouhara spake thusly:
Quoted 90 lines
From: Bernd Kuhls <[email protected]>
Kodi 18.0-Leia will implement stand-alone gbm support alongside x11 & wayland. To enable building libgbm in mesa3d without x11 & wayland we need to create a virtual package for libgbm.
Also other packages besides mesa3d may provide libgbm.so, see
http://patchwork.ozlabs.org/patch/647235/
http://patchwork.ozlabs.org/patch/939703/We also introduce two feature that shall help user choosing the version implemented by a libgbm provider. This foresightly avoid building package without having the required libgbm version (e.g. kmscube, qt5, sdl2 etc.)
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Kamel Bouhara <[email protected]>[ Kamel : introduce gbm api features ]---
Changes v1 -> v2:
- Squashed patch 1/2
- Added more relevant comment for each features addedpackage/opengl/Config.in | 1 + package/opengl/libgbm/Config.in | 24 ++++++++++++++++++++++++ package/opengl/libgbm/libgbm.mk | 9 +++++++++ 3 files changed, 34 insertions(+) create mode 100644 package/opengl/libgbm/Config.in create mode 100644 package/opengl/libgbm/libgbm.mkpackage/opengl/Config.in +1
-0@@ -1,5 +1,6 @@ source "package/opengl/libgl/Config.in" source "package/opengl/libegl/Config.in" +source "package/opengl/libgbm/Config.in" source "package/opengl/libgles/Config.in" source "package/opengl/libopencl/Config.in" source "package/opengl/libopenvg/Config.in"package/opengl/libgbm/Config.in new file +24
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HAS_LIBGBM + bool + +config BR2_PACKAGE_PROVIDES_LIBGBM + string + depends on BR2_PACKAGE_HAS_LIBGBM + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# format modifier plane count feature. This API was initially introduced +# in mesa3d version 17. A gbm implementation provides this feature if it +# is implement function gbm_device_get_format_modifier_plane_count. + +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF + bool + depends on BR2_PACKAGE_HAS_LIBGBM + +# gbm implementations should select this option if they provide the +# dma buffer feature. This API was initially introduced in mesa3d +# version 10. A gbm implementation provides this feature if it +# is implement function gbm_bo_get_fd.package/opengl/libgbm/libgbm.mk new file +9
-1@@ -0,0 +1,9 @@ +################################################################################ +# +# libgbm +# +################################################################################ + +# This package requires to install a gbm.pc which needs +# to be provided by GBM providers. +$(eval $(virtual-package)) --2.30.2
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.
Quoted 5 lines
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot