All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package
@ 2021-10-07  9:51 Kamel Bouhara
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 2/7] package/mesa3d: add gbm api features Kamel Bouhara
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Bernd Kuhls, Thomas Petazzoni, Kamel Bouhara

From: Bernd Kuhls <bernd.kuhls@t-online.de>

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

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.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
[ Kamel : introduce gbm api features ]
---
Changes v1 -> v2:
 - Squashed patch 1/2
 - Added more relevant comment for each features added
Changes v2 -> v3:
 - Updated commit message

 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

diff --git a/package/opengl/Config.in b/package/opengl/Config.in
index cbc001427d..cfa51def45 100644
--- a/package/opengl/Config.in
+++ b/package/opengl/Config.in
@@ -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"
diff --git a/package/opengl/libgbm/Config.in b/package/opengl/libgbm/Config.in
new file mode 100644
index 0000000000..7aa3efb97a
--- /dev/null
+++ b/package/opengl/libgbm/Config.in
@@ -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.
diff --git a/package/opengl/libgbm/libgbm.mk b/package/opengl/libgbm/libgbm.mk
new file mode 100644
index 0000000000..ecab234720
--- /dev/null
+++ b/package/opengl/libgbm/libgbm.mk
@@ -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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 2/7] package/mesa3d: add gbm api features
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
@ 2021-10-07  9:51 ` Kamel Bouhara
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 3/7] package/sunxi-mali-mainline: bump version Kamel Bouhara
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Bernd Kuhls, Kamel Bouhara

From: Bernd Kuhls <bernd.kuhls@t-online.de>

Introduce gbm features so that each packages depending
on it can choose which implementation is required.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
 package/mesa3d/Config.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index eb7c1eef46..a181a363da 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -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
 
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 3/7] package/sunxi-mali-mainline: bump version
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 2/7] package/mesa3d: add gbm api features Kamel Bouhara
@ 2021-10-07  9:51 ` Kamel Bouhara
  2021-10-07 20:05   ` Giulio Benetti
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Kamel Bouhara, Thomas Petazzoni

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Bumps the sunxi-mali-mainline upstream version to 418f55585e76f375792dbebb3e97532f0c1c556d

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
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(-)

diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash b/package/sunxi-mali-mainline/sunxi-mali-mainline.hash
index e1c18fd4f7..96d8251f16 100644
--- a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash
+++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.hash
@@ -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
diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
index 701a1fbbb4..b46f572311 100644
--- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
+++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
@@ -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
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 2/7] package/mesa3d: add gbm api features Kamel Bouhara
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 3/7] package/sunxi-mali-mainline: bump version Kamel Bouhara
@ 2021-10-07  9:51 ` Kamel Bouhara
  2021-10-07 20:03   ` Giulio Benetti
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Kamel Bouhara, Thomas Petazzoni

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Adds support for selecting one of the four display API supported: fbdev,
wayland, x11-dmabuf, x11-ump.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
Changes v2 -> v3:
 - Moved gbm.pc install into patch 5/7

 package/sunxi-mali-mainline/Config.in         | 26 +++++++++++++++++
 .../sunxi-mali-mainline.mk                    | 28 +++++++++++++++++--
 2 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
index a2fb95bd79..31a9152407 100644
--- a/package/sunxi-mali-mainline/Config.in
+++ b/package/sunxi-mali-mainline/Config.in
@@ -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
diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
index b46f572311..e058b5c3cd 100644
--- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
+++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
@@ -21,22 +21,44 @@ 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
+	$(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
 
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
                   ` (2 preceding siblings ...)
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
@ 2021-10-07  9:51 ` Kamel Bouhara
  2021-10-07 20:23   ` Giulio Benetti
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 6/7] package/kmscube: use libgbm virtual package Kamel Bouhara
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Kamel Bouhara, Thomas Petazzoni

Registers the package as a libgbm provider.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
Changes v1 -> v2:
 - Fixed gbm features are provided only when wayland is set
Changes v1 -> v2:
 - Fixed gbm features selected only when wayland is set

 package/sunxi-mali-mainline/Config.in              |  5 +++++
 package/sunxi-mali-mainline/gbm.pc                 | 12 ++++++++++++
 package/sunxi-mali-mainline/sunxi-mali-mainline.mk |  3 +++
 3 files changed, 20 insertions(+)
 create mode 100644 package/sunxi-mali-mainline/gbm.pc

diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
index 31a9152407..10534f263b 100644
--- a/package/sunxi-mali-mainline/Config.in
+++ b/package/sunxi-mali-mainline/Config.in
@@ -14,6 +14,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 +29,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"
diff --git a/package/sunxi-mali-mainline/gbm.pc b/package/sunxi-mali-mainline/gbm.pc
new file mode 100644
index 0000000000..593cfa0aba
--- /dev/null
+++ b/package/sunxi-mali-mainline/gbm.pc
@@ -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}
diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
index e058b5c3cd..8a76b46aba 100644
--- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
+++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
@@ -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
@@ -53,6 +54,8 @@ define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS
 		$(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
 
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 6/7] package/kmscube: use libgbm virtual package
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
                   ` (3 preceding siblings ...)
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
@ 2021-10-07  9:51 ` Kamel Bouhara
  2021-10-27 19:28   ` Arnout Vandecappelle
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 7/7] package/gcnano-binaries: provides libgbm Kamel Bouhara
  2021-10-27 19:27 ` [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Arnout Vandecappelle
  6 siblings, 1 reply; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Kamel Bouhara, Thomas Petazzoni

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
[ Kamel : add dependency on recent libgbm ]
---
Changes v2 -> v3:
 - Fixed comment suggestions

 package/kmscube/Config.in  | 16 ++++++++++++----
 package/kmscube/kmscube.mk |  2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/package/kmscube/Config.in b/package/kmscube/Config.in
index b6ad305bfb..8c5fe9b7b0 100644
--- a/package/kmscube/Config.in
+++ b/package/kmscube/Config.in
@@ -1,9 +1,17 @@
 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 || !BR2_PACKAGE_HAS_LIBGBM ||
+	!BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT ||
+	!depends on BR2_PACKAGE_HAS_LIBGLES || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/kmscube/kmscube.mk b/package/kmscube/kmscube.mk
index 7b458376dc..5719f72ba3 100644
--- a/package/kmscube/kmscube.mk
+++ b/package/kmscube/kmscube.mk
@@ -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))
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 7/7] package/gcnano-binaries: provides libgbm
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
                   ` (4 preceding siblings ...)
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 6/7] package/kmscube: use libgbm virtual package Kamel Bouhara
@ 2021-10-07  9:51 ` Kamel Bouhara
  2021-10-27 19:27 ` [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Arnout Vandecappelle
  6 siblings, 0 replies; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-07  9:51 UTC (permalink / raw)
  To: buildroot; +Cc: Paul Kocialkowski, Kamel Bouhara

Add package as a libgbm provider

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
 package/gcnano-binaries/Config.in          | 6 ++++++
 package/gcnano-binaries/gcnano-binaries.mk | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/gcnano-binaries/Config.in b/package/gcnano-binaries/Config.in
index 01e1aacf1d..ade19e2121 100644
--- a/package/gcnano-binaries/Config.in
+++ b/package/gcnano-binaries/Config.in
@@ -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"
 
diff --git a/package/gcnano-binaries/gcnano-binaries.mk b/package/gcnano-binaries/gcnano-binaries.mk
index af5fdd1b7e..f6adc36dbd 100644
--- a/package/gcnano-binaries/gcnano-binaries.mk
+++ b/package/gcnano-binaries/gcnano-binaries.mk
@@ -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
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
@ 2021-10-07 20:03   ` Giulio Benetti
  2021-10-07 20:25     ` Giulio Benetti
  0 siblings, 1 reply; 14+ messages in thread
From: Giulio Benetti @ 2021-10-07 20:03 UTC (permalink / raw)
  To: Kamel Bouhara, buildroot; +Cc: Paul Kocialkowski, Thomas Petazzoni

Hi Kamel,

On 10/7/21 11:51 AM, Kamel Bouhara wrote:
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> 
> Adds support for selecting one of the four display API supported: fbdev,
> wayland, x11-dmabuf, x11-ump.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
> ---
> Changes v2 -> v3:
>   - Moved gbm.pc install into patch 5/7
> 
>   package/sunxi-mali-mainline/Config.in         | 26 +++++++++++++++++
>   .../sunxi-mali-mainline.mk                    | 28 +++++++++++++++++--
>   2 files changed, 51 insertions(+), 3 deletions(-)
> 
> diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
> index a2fb95bd79..31a9152407 100644
> --- a/package/sunxi-mali-mainline/Config.in
> +++ b/package/sunxi-mali-mainline/Config.in
> @@ -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"

as done for "wayland" here ^^^ I would add "depends on BR2_PACKAGE_XORG7"

> +
> +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_UMP
> +	bool "x11 ump"

ditto

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

This is not enough because this way, when you select r8p1, you still can 
see "x11 ump" and "x11 dma-buf". So I would invert the depends on by 
removing the above one and adding the depends on 
BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 to
BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND/X11_DMABUF/X11_UMP

Also I would invert the order of the 2 choices, first I would place the 
Version to choose and then the Output, this way is more intuitive for me.

And please, add me to Cc since I'm the maintainer on 
sunxi-mali-mainline* in DEVELOPERS. As already pointed you on previous 
e-mail, please use ./utils/get-developers script to obtain the already 
ready git send-mail command.

Thank you!

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

>   
>   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
> diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> index b46f572311..e058b5c3cd 100644
> --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> @@ -21,22 +21,44 @@ 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
> +	$(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
>   
> 


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 3/7] package/sunxi-mali-mainline: bump version
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 3/7] package/sunxi-mali-mainline: bump version Kamel Bouhara
@ 2021-10-07 20:05   ` Giulio Benetti
  0 siblings, 0 replies; 14+ messages in thread
From: Giulio Benetti @ 2021-10-07 20:05 UTC (permalink / raw)
  To: Kamel Bouhara, buildroot; +Cc: Paul Kocialkowski, Thomas Petazzoni

Hi Kamel,

On 10/7/21 11:51 AM, Kamel Bouhara wrote:
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> 
> Bumps the sunxi-mali-mainline upstream version to 418f55585e76f375792dbebb3e97532f0c1c556d
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>

Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

> ---
> 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(-)
> 
> diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash b/package/sunxi-mali-mainline/sunxi-mali-mainline.hash
> index e1c18fd4f7..96d8251f16 100644
> --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.hash
> +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.hash
> @@ -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
> diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> index 701a1fbbb4..b46f572311 100644
> --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> @@ -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
> 

-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
@ 2021-10-07 20:23   ` Giulio Benetti
  2021-10-18  7:32     ` Kamel Bouhara
  0 siblings, 1 reply; 14+ messages in thread
From: Giulio Benetti @ 2021-10-07 20:23 UTC (permalink / raw)
  To: Kamel Bouhara, buildroot; +Cc: Paul Kocialkowski, Thomas Petazzoni

Hi Kamel,

On 10/7/21 11:51 AM, Kamel Bouhara wrote:
> Registers the package as a libgbm provider.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
> ---
> Changes v1 -> v2:
>   - Fixed gbm features are provided only when wayland is set
> Changes v1 -> v2:
>   - Fixed gbm features selected only when wayland is set
> 
>   package/sunxi-mali-mainline/Config.in              |  5 +++++
>   package/sunxi-mali-mainline/gbm.pc                 | 12 ++++++++++++
>   package/sunxi-mali-mainline/sunxi-mali-mainline.mk |  3 +++
>   3 files changed, 20 insertions(+)
>   create mode 100644 package/sunxi-mali-mainline/gbm.pc
> 
> diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
> index 31a9152407..10534f263b 100644
> --- a/package/sunxi-mali-mainline/Config.in
> +++ b/package/sunxi-mali-mainline/Config.in
> @@ -14,6 +14,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 +29,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"
> diff --git a/package/sunxi-mali-mainline/gbm.pc b/package/sunxi-mali-mainline/gbm.pc
> new file mode 100644
> index 0000000000..593cfa0aba
> --- /dev/null
> +++ b/package/sunxi-mali-mainline/gbm.pc
> @@ -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}
> diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> index e058b5c3cd..8a76b46aba 100644
> --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> @@ -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
> @@ -53,6 +54,8 @@ define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS
>   		$(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

As pointed by # FIXME above you need to make the install of gbm.pc 
conditional to BR2_PACKAGE_HAS_LIBGBM, something like:

ifeq ($(BR2_PACKAGE_HAS_LIBGBM),y)
define SUNXI_MALI_MAINLINE_INSTALL_GBM_PC
	$(INSTALL) -D -m 0644 package/sunxi-mali-mainline/gbm.pc \
		$(STAGING_DIR)/usr/lib/pkgconfig/gbm.pc
endef
endif

and then call $(SUNXI_MALI_MAINLINE_INSTALL_GBM_PC) in place of the 
actual install, like $(SUNXI_MALI_MAINLINE_FIXUP_EGL_PC).

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs
  2021-10-07 20:03   ` Giulio Benetti
@ 2021-10-07 20:25     ` Giulio Benetti
  0 siblings, 0 replies; 14+ messages in thread
From: Giulio Benetti @ 2021-10-07 20:25 UTC (permalink / raw)
  To: Kamel Bouhara, buildroot; +Cc: Paul Kocialkowski, Thomas Petazzoni

Hi Kamel,

I've forgotten...

On 10/7/21 10:03 PM, Giulio Benetti wrote:
> Hi Kamel,
> 
> On 10/7/21 11:51 AM, Kamel Bouhara wrote:
>> From: Thomas Petazzoni<thomas.petazzoni@bootlin.com>
>>
>> Adds support for selecting one of the four display API supported: fbdev,
>> wayland, x11-dmabuf, x11-ump.
>>
>> Signed-off-by: Thomas Petazzoni<thomas.petazzoni@bootlin.com>
>> Signed-off-by: Kamel Bouhara<kamel.bouhara@bootlin.com>
>> ---
>> Changes v2 -> v3:
>>    - Moved gbm.pc install into patch 5/7
>>
>>    package/sunxi-mali-mainline/Config.in         | 26 +++++++++++++++++
>>    .../sunxi-mali-mainline.mk                    | 28 +++++++++++++++++--
>>    2 files changed, 51 insertions(+), 3 deletions(-)
>>
>> diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
>> index a2fb95bd79..31a9152407 100644
>> --- a/package/sunxi-mali-mainline/Config.in
>> +++ b/package/sunxi-mali-mainline/Config.in
>> @@ -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"
> as done for "wayland" here ^^^ I would add "depends on BR2_PACKAGE_XORG7"
> 
>> +
>> +config BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_X11_UMP
>> +	bool "x11 ump"
> ditto
> 
>> +
>> +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
> This is not enough because this way, when you select r8p1, you still can
> see "x11 ump" and "x11 dma-buf". So I would invert the depends on by
> removing the above one and adding the depends on
> BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 to
> BR2_PACKAGE_SUNXI_MALI_MAINLINE_OUTPUT_WAYLAND/X11_DMABUF/X11_UMP
> 
> Also I would invert the order of the 2 choices, first I would place the
> Version to choose and then the Output, this way is more intuitive for me.
> 
> And please, add me to Cc since I'm the maintainer on
> sunxi-mali-mainline* in DEVELOPERS. As already pointed you on previous
> e-mail, please use ./utils/get-developers script to obtain the already
> ready git send-mail command.
> 
> Thank you!
> 
> Best regards
> -- Giulio Benetti Benetti Engineering sas
>>    
>>    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
>> diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
>> index b46f572311..e058b5c3cd 100644
>> --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
>> +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
>> @@ -21,22 +21,44 @@ 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

...here ^^^ you need to add the same thing for x11

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

>> +# 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
>> +	$(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
>>    
>>
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm
  2021-10-07 20:23   ` Giulio Benetti
@ 2021-10-18  7:32     ` Kamel Bouhara
  0 siblings, 0 replies; 14+ messages in thread
From: Kamel Bouhara @ 2021-10-18  7:32 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Paul Kocialkowski, Thomas Petazzoni, buildroot

On Thu, Oct 07, 2021 at 10:23:24PM +0200, Giulio Benetti wrote:
> Hi Kamel,
>

Hi Giulio,

> On 10/7/21 11:51 AM, Kamel Bouhara wrote:
> > Registers the package as a libgbm provider.
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
> > ---
> > Changes v1 -> v2:
> >   - Fixed gbm features are provided only when wayland is set
> > Changes v1 -> v2:
> >   - Fixed gbm features selected only when wayland is set
> >
> >   package/sunxi-mali-mainline/Config.in              |  5 +++++
> >   package/sunxi-mali-mainline/gbm.pc                 | 12 ++++++++++++
> >   package/sunxi-mali-mainline/sunxi-mali-mainline.mk |  3 +++
> >   3 files changed, 20 insertions(+)
> >   create mode 100644 package/sunxi-mali-mainline/gbm.pc
> >
> > diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
> > index 31a9152407..10534f263b 100644
> > --- a/package/sunxi-mali-mainline/Config.in
> > +++ b/package/sunxi-mali-mainline/Config.in
> > @@ -14,6 +14,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 +29,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"
> > diff --git a/package/sunxi-mali-mainline/gbm.pc b/package/sunxi-mali-mainline/gbm.pc
> > new file mode 100644
> > index 0000000000..593cfa0aba
> > --- /dev/null
> > +++ b/package/sunxi-mali-mainline/gbm.pc
> > @@ -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}
> > diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> > index e058b5c3cd..8a76b46aba 100644
> > --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> > +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> > @@ -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
> > @@ -53,6 +54,8 @@ define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS
> >   		$(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
>
> As pointed by # FIXME above you need to make the install of gbm.pc
> conditional to BR2_PACKAGE_HAS_LIBGBM, something like:
>
> ifeq ($(BR2_PACKAGE_HAS_LIBGBM),y)
> define SUNXI_MALI_MAINLINE_INSTALL_GBM_PC
> 	$(INSTALL) -D -m 0644 package/sunxi-mali-mainline/gbm.pc \
> 		$(STAGING_DIR)/usr/lib/pkgconfig/gbm.pc
> endef
> endif
>
> and then call $(SUNXI_MALI_MAINLINE_INSTALL_GBM_PC) in place of the actual
> install, like $(SUNXI_MALI_MAINLINE_FIXUP_EGL_PC).
>

Ack, thanks !

Regards,

Kamel

> Best regards
> --
> Giulio Benetti
> Benetti Engineering sas
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package
  2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
                   ` (5 preceding siblings ...)
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 7/7] package/gcnano-binaries: provides libgbm Kamel Bouhara
@ 2021-10-27 19:27 ` Arnout Vandecappelle
  6 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2021-10-27 19:27 UTC (permalink / raw)
  To: Kamel Bouhara, buildroot; +Cc: Paul Kocialkowski, Bernd Kuhls, Thomas Petazzoni

  Hi Kamal,

On 07/10/2021 11:51, Kamel Bouhara wrote:
> From: Bernd Kuhls <bernd.kuhls@t-online.de>
> 
> 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.)
> 
> 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.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
> [ Kamel : introduce gbm api features ]

  Series applied to master, except for 4/7 and 5/7 because they received 
comments. So sunxi-mali doesn't provide gbm yet.

  Bernd, if you like to update kodi to take into account libgbm, now you can!

  Regards,
  Arnout

> ---
> Changes v1 -> v2:
>   - Squashed patch 1/2
>   - Added more relevant comment for each features added
> Changes v2 -> v3:
>   - Updated commit message
> 
>   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
> 
> diff --git a/package/opengl/Config.in b/package/opengl/Config.in
> index cbc001427d..cfa51def45 100644
> --- a/package/opengl/Config.in
> +++ b/package/opengl/Config.in
> @@ -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"
> diff --git a/package/opengl/libgbm/Config.in b/package/opengl/libgbm/Config.in
> new file mode 100644
> index 0000000000..7aa3efb97a
> --- /dev/null
> +++ b/package/opengl/libgbm/Config.in
> @@ -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.
> diff --git a/package/opengl/libgbm/libgbm.mk b/package/opengl/libgbm/libgbm.mk
> new file mode 100644
> index 0000000000..ecab234720
> --- /dev/null
> +++ b/package/opengl/libgbm/libgbm.mk
> @@ -0,0 +1,9 @@
> +################################################################################
> +#
> +# libgbm
> +#
> +################################################################################
> +
> +# This package requires to install a gbm.pc which needs
> +# to be provided by GBM providers.
> +$(eval $(virtual-package))
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 6/7] package/kmscube: use libgbm virtual package
  2021-10-07  9:51 ` [Buildroot] [PATCH v3 6/7] package/kmscube: use libgbm virtual package Kamel Bouhara
@ 2021-10-27 19:28   ` Arnout Vandecappelle
  0 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2021-10-27 19:28 UTC (permalink / raw)
  To: Kamel Bouhara, buildroot; +Cc: Paul Kocialkowski, Thomas Petazzoni

  Hi Kamal,

On 07/10/2021 11:51, Kamel Bouhara wrote:
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> 
> 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.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
> [ Kamel : add dependency on recent libgbm ]
> ---
> Changes v2 -> v3:
>   - Fixed comment suggestions
> 
>   package/kmscube/Config.in  | 16 ++++++++++++----
>   package/kmscube/kmscube.mk |  2 +-
>   2 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/package/kmscube/Config.in b/package/kmscube/Config.in
> index b6ad305bfb..8c5fe9b7b0 100644
> --- a/package/kmscube/Config.in
> +++ b/package/kmscube/Config.in
> @@ -1,9 +1,17 @@
>   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 || !BR2_PACKAGE_HAS_LIBGBM ||
> +	!BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT ||
> +	!depends on BR2_PACKAGE_HAS_LIBGLES || !BR2_TOOLCHAIN_HAS_THREADS

  This syntax is invalid, kconfig can't parse it. Please do minimal testing of 
your patches before sending :-)

> diff --git a/package/kmscube/kmscube.mk b/package/kmscube/kmscube.mk
> index 7b458376dc..5719f72ba3 100644
> --- a/package/kmscube/kmscube.mk
> +++ b/package/kmscube/kmscube.mk
> @@ -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

  Since I was anyway editing this patch, I took the opportunity to order these 
dependencies alphabetically.

  Regards,
  Arnout

>   
>   $(eval $(meson-package))
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-10-27 19:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07  9:51 [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Kamel Bouhara
2021-10-07  9:51 ` [Buildroot] [PATCH v3 2/7] package/mesa3d: add gbm api features Kamel Bouhara
2021-10-07  9:51 ` [Buildroot] [PATCH v3 3/7] package/sunxi-mali-mainline: bump version Kamel Bouhara
2021-10-07 20:05   ` Giulio Benetti
2021-10-07  9:51 ` [Buildroot] [PATCH v3 4/7] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
2021-10-07 20:03   ` Giulio Benetti
2021-10-07 20:25     ` Giulio Benetti
2021-10-07  9:51 ` [Buildroot] [PATCH v3 5/7] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
2021-10-07 20:23   ` Giulio Benetti
2021-10-18  7:32     ` Kamel Bouhara
2021-10-07  9:51 ` [Buildroot] [PATCH v3 6/7] package/kmscube: use libgbm virtual package Kamel Bouhara
2021-10-27 19:28   ` Arnout Vandecappelle
2021-10-07  9:51 ` [Buildroot] [PATCH v3 7/7] package/gcnano-binaries: provides libgbm Kamel Bouhara
2021-10-27 19:27 ` [Buildroot] [PATCH v3 1/7] package/opengl/libgbm: new virtual package Arnout Vandecappelle

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