* [Buildroot] [PATCH 0/8] Use gbm API features
@ 2021-09-21 13:03 Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package Kamel Bouhara
` (7 more replies)
0 siblings, 8 replies; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: Kamel Bouhara
Hello,
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.
Cheers,
Kamel
Bernd Kuhls (2):
package/opengl/libgbm: new virtual package
package/mesa3d: add gbm api features
Kamel Bouhara (3):
package/opengl/libgbm: introduce api features
package/sunxi-mali-mainline: provides libgbm
package/gcnano-binaries: provides libgbm
Thomas Petazzoni (3):
package/sunxi-mali-mainline: bump version
package/sunxi-mali-mainline: add support for different outputs
package/kmscube: use libgbm virtual package
package/gcnano-binaries/Config.in | 6 ++++
package/gcnano-binaries/gcnano-binaries.mk | 2 +-
package/kmscube/Config.in | 18 +++++++---
package/kmscube/kmscube.mk | 3 +-
package/mesa3d/Config.in | 6 ++++
package/opengl/Config.in | 1 +
package/opengl/libgbm/Config.in | 18 ++++++++++
package/opengl/libgbm/libgbm.mk | 7 ++++
package/sunxi-mali-mainline/Config.in | 32 ++++++++++++++++++
package/sunxi-mali-mainline/gbm.pc | 12 +++++++
.../sunxi-mali-mainline.mk | 33 ++++++++++++++++---
11 files changed, 128 insertions(+), 10 deletions(-)
create mode 100644 package/opengl/libgbm/Config.in
create mode 100644 package/opengl/libgbm/libgbm.mk
create mode 100644 package/sunxi-mali-mainline/gbm.pc
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 13:31 ` Thomas Petazzoni
2021-09-21 13:03 ` [Buildroot] [PATCH 2/8] package/opengl/libgbm: introduce api features Kamel Bouhara
` (6 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Thomas Petazzoni
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/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/opengl/Config.in | 1 +
package/opengl/libgbm/Config.in | 6 ++++++
package/opengl/libgbm/libgbm.mk | 7 +++++++
3 files changed, 14 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..ee18c4e6cb
--- /dev/null
+++ b/package/opengl/libgbm/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HAS_LIBGBM
+ bool
+
+config BR2_PACKAGE_PROVIDES_LIBGBM
+ string
+ depends on BR2_PACKAGE_HAS_LIBGBM
diff --git a/package/opengl/libgbm/libgbm.mk b/package/opengl/libgbm/libgbm.mk
new file mode 100644
index 0000000000..5b3d8262a5
--- /dev/null
+++ b/package/opengl/libgbm/libgbm.mk
@@ -0,0 +1,7 @@
+################################################################################
+#
+# libgbm
+#
+################################################################################
+
+$(eval $(virtual-package))
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 2/8] package/opengl/libgbm: introduce api features
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 14:10 ` Thomas Petazzoni
2021-09-21 13:03 ` [Buildroot] [PATCH 3/8] package/mesa3d: add gbm " Kamel Bouhara
` (5 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: Kamel Bouhara
We 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: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
package/opengl/libgbm/Config.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/package/opengl/libgbm/Config.in b/package/opengl/libgbm/Config.in
index ee18c4e6cb..f6d68e847a 100644
--- a/package/opengl/libgbm/Config.in
+++ b/package/opengl/libgbm/Config.in
@@ -4,3 +4,15 @@ config BR2_PACKAGE_HAS_LIBGBM
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
+
+comment "feature implemented in mesa gbm api version 17 or later"
+
+config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
+ bool
+ depends on BR2_PACKAGE_HAS_LIBGBM
+
+comment "feature implemented in mesa gbm api 10 or later"
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 3/8] package/mesa3d: add gbm api features
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 2/8] package/opengl/libgbm: introduce api features Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version Kamel Bouhara
` (4 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: 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@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
` (2 preceding siblings ...)
2021-09-21 13:03 ` [Buildroot] [PATCH 3/8] package/mesa3d: add gbm " Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 13:31 ` Thomas Petazzoni
2021-09-21 15:43 ` Giulio Benetti
2021-09-21 13:03 ` [Buildroot] [PATCH 5/8] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
` (3 subsequent siblings)
7 siblings, 2 replies; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: 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>
---
package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 5/8] package/sunxi-mali-mainline: add support for different outputs
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
` (3 preceding siblings ...)
2021-09-21 13:03 ` [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 15:39 ` Giulio Benetti
2021-09-21 13:03 ` [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
` (2 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: 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>
---
package/sunxi-mali-mainline/Config.in | 26 ++++++++++++++++
.../sunxi-mali-mainline.mk | 30 +++++++++++++++++--
2 files changed, 53 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..e9091b05a2 100644
--- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
+++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
@@ -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
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
` (4 preceding siblings ...)
2021-09-21 13:03 ` [Buildroot] [PATCH 5/8] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 14:13 ` Thomas Petazzoni
2021-09-21 13:03 ` [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 8/8] package/gcnano-binaries: provides libgbm Kamel Bouhara
7 siblings, 1 reply; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: 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>
---
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
diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
index 31a9152407..dfcca89e46 100644
--- a/package/sunxi-mali-mainline/Config.in
+++ b/package/sunxi-mali-mainline/Config.in
@@ -3,6 +3,8 @@ 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_LIBGBM_HAS_FEATURE_DMA_BUF
select BR2_PACKAGE_HAS_LIBGLES
help
Install userspace Allwinner OpenGL libraries.
@@ -14,6 +16,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 +31,7 @@ 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_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..e2f6c04a82
--- /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 e9091b05a2..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
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
` (5 preceding siblings ...)
2021-09-21 13:03 ` [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
2021-09-21 14:16 ` Thomas Petazzoni
2021-09-21 13:03 ` [Buildroot] [PATCH 8/8] package/gcnano-binaries: provides libgbm Kamel Bouhara
7 siblings, 1 reply; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: 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 ]
---
package/kmscube/Config.in | 18 ++++++++++++++----
package/kmscube/kmscube.mk | 3 ++-
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/package/kmscube/Config.in b/package/kmscube/Config.in
index b6ad305bfb..d97b0f962e 100644
--- a/package/kmscube/Config.in
+++ b/package/kmscube/Config.in
@@ -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_NAME_DESC
+ 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 a toolchain w/ threads support"
+ depends on BR2_PACKAGE_HAS_LIBEGL
+ depends on BR2_PACKAGE_HAS_LIBGBM
+ depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_NAME_DESC
+ depends on BR2_PACKAGE_HAS_LIBGLES
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/kmscube/kmscube.mk b/package/kmscube/kmscube.mk
index 7b458376dc..26c82d2688 100644
--- a/package/kmscube/kmscube.mk
+++ b/package/kmscube/kmscube.mk
@@ -8,6 +8,7 @@ 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
+KMSCUBE_AUTORECONF = YES
$(eval $(meson-package))
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH 8/8] package/gcnano-binaries: provides libgbm
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
` (6 preceding siblings ...)
2021-09-21 13:03 ` [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package Kamel Bouhara
@ 2021-09-21 13:03 ` Kamel Bouhara
7 siblings, 0 replies; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-21 13:03 UTC (permalink / raw)
To: buildroot; +Cc: 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@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version
2021-09-21 13:03 ` [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version Kamel Bouhara
@ 2021-09-21 13:31 ` Thomas Petazzoni
2021-09-21 15:43 ` Giulio Benetti
1 sibling, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2021-09-21 13:31 UTC (permalink / raw)
To: Kamel Bouhara; +Cc: buildroot
Hello Kamel,
On Tue, 21 Sep 2021 15:03:21 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> 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>
> ---
> package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
This patch is not sufficient: without an update to
sunxi-mali-mainline.hash, I doubt this can work.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package
2021-09-21 13:03 ` [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package Kamel Bouhara
@ 2021-09-21 13:31 ` Thomas Petazzoni
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2021-09-21 13:31 UTC (permalink / raw)
To: Kamel Bouhara; +Cc: Bernd Kuhls, buildroot
On Tue, 21 Sep 2021 15:03:18 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> 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/
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This will need your SoB as well.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 2/8] package/opengl/libgbm: introduce api features
2021-09-21 13:03 ` [Buildroot] [PATCH 2/8] package/opengl/libgbm: introduce api features Kamel Bouhara
@ 2021-09-21 14:10 ` Thomas Petazzoni
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2021-09-21 14:10 UTC (permalink / raw)
To: Kamel Bouhara; +Cc: buildroot
Hello Kamel,
On Tue, 21 Sep 2021 15:03:19 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> wrote:
> We 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: Kamel Bouhara <kamel.bouhara@bootlin.com>
I think this should be squashed into PATCH 1.
> diff --git a/package/opengl/libgbm/Config.in b/package/opengl/libgbm/Config.in
> index ee18c4e6cb..f6d68e847a 100644
> --- a/package/opengl/libgbm/Config.in
> +++ b/package/opengl/libgbm/Config.in
> @@ -4,3 +4,15 @@ config BR2_PACKAGE_HAS_LIBGBM
> 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
> +
> +comment "feature implemented in mesa gbm api version 17 or later"
I'm not sure this makes sense as a comment visible in menuconfig, as
the option itself is not even visible. I would rather suggest something
like this:
# 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 A, B, C.
> +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
> + bool
> + depends on BR2_PACKAGE_HAS_LIBGBM
> +
> +comment "feature implemented in mesa gbm api 10 or later"
Same here.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm
2021-09-21 13:03 ` [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
@ 2021-09-21 14:13 ` Thomas Petazzoni
2021-09-22 9:29 ` Kamel Bouhara
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2021-09-21 14:13 UTC (permalink / raw)
To: Kamel Bouhara; +Cc: buildroot
On Tue, 21 Sep 2021 15:03:23 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> wrote:
> diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
> index 31a9152407..dfcca89e46 100644
> --- a/package/sunxi-mali-mainline/Config.in
> +++ b/package/sunxi-mali-mainline/Config.in
> @@ -3,6 +3,8 @@ 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_LIBGBM_HAS_FEATURE_DMA_BUF
So here, you specify that sunxi-mali-mainline always provides libgbm.
> select BR2_PACKAGE_HAS_LIBGLES
> help
> Install userspace Allwinner OpenGL libraries.
> @@ -14,6 +16,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
But here only if the wayland output is selected.
> +
> config BR2_PACKAGE_PROVIDES_LIBGLES
> default "sunxi-mali-mainline"
>
> @@ -26,6 +31,7 @@ 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_HAS_LIBGBM
If only the wayland variant provides a gbm implementation, then only
this select should stay there, along with the select of
BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF.
> diff --git a/package/sunxi-mali-mainline/gbm.pc b/package/sunxi-mali-mainline/gbm.pc
> new file mode 100644
> index 0000000000..e2f6c04a82
> --- /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}
Is it a requirement for GBM providers to provide a gbm.pc? If so, I
think it would be great to mention it in the libgbm.mk, as a comment.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package
2021-09-21 13:03 ` [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package Kamel Bouhara
@ 2021-09-21 14:16 ` Thomas Petazzoni
2021-09-22 9:26 ` Kamel Bouhara
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2021-09-21 14:16 UTC (permalink / raw)
To: Kamel Bouhara; +Cc: buildroot
Hello Kamel,
On Tue, 21 Sep 2021 15:03:24 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> 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 ]
> ---
> package/kmscube/Config.in | 18 ++++++++++++++----
> package/kmscube/kmscube.mk | 3 ++-
> 2 files changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/package/kmscube/Config.in b/package/kmscube/Config.in
> index b6ad305bfb..d97b0f962e 100644
> --- a/package/kmscube/Config.in
> +++ b/package/kmscube/Config.in
> @@ -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_NAME_DESC
This does not exist in your PATCH 2/8:
+config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
+config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
Did you test this patch ?
> +comment "kmscube needs a toolchain w/ threads support"
> + depends on BR2_PACKAGE_HAS_LIBEGL
> + depends on BR2_PACKAGE_HAS_LIBGBM
> + depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_NAME_DESC
> + depends on BR2_PACKAGE_HAS_LIBGLES
> + depends on !BR2_TOOLCHAIN_HAS_THREADS
This should be:
comment "kmscube needs EGL, GBM and OpenGL ES, and a toolchain w/ thread support"
> diff --git a/package/kmscube/kmscube.mk b/package/kmscube/kmscube.mk
> index 7b458376dc..26c82d2688 100644
> --- a/package/kmscube/kmscube.mk
> +++ b/package/kmscube/kmscube.mk
> @@ -8,6 +8,7 @@ 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
> +KMSCUBE_AUTORECONF = YES
Why is autoreconf being added here ? On a meson-package, this doesn't
make much sense.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 5/8] package/sunxi-mali-mainline: add support for different outputs
2021-09-21 13:03 ` [Buildroot] [PATCH 5/8] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
@ 2021-09-21 15:39 ` Giulio Benetti
0 siblings, 0 replies; 18+ messages in thread
From: Giulio Benetti @ 2021-09-21 15:39 UTC (permalink / raw)
To: Kamel Bouhara, buildroot; +Cc: Thomas Petazzoni
Hi Kamel, Thomas,
On 9/21/21 3:03 PM, 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.
Only r6p2 arm supports x11_ump.
r6p2 aarch64 doesn't.
And r8p1 only supports fbdev.
So you have to add some check below.
Also, x11-ump is pretty old, do we really want to keep it?
Best regards
--
Giulio Benetti
Benetti Engineering sas
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
> ---
> package/sunxi-mali-mainline/Config.in | 26 ++++++++++++++++
> .../sunxi-mali-mainline.mk | 30 +++++++++++++++++--
> 2 files changed, 53 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..e9091b05a2 100644
> --- a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> @@ -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
>
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version
2021-09-21 13:03 ` [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version Kamel Bouhara
2021-09-21 13:31 ` Thomas Petazzoni
@ 2021-09-21 15:43 ` Giulio Benetti
1 sibling, 0 replies; 18+ messages in thread
From: Giulio Benetti @ 2021-09-21 15:43 UTC (permalink / raw)
To: Kamel Bouhara, buildroot; +Cc: Thomas Petazzoni
Hi Kamel,
have you used ./utils/get-developers script to obtain the git send-mail
command including the maintainers? I'm not in Cc but I'm a developer of
sunxi-mali-mainline. Can you please use such script next time?
Thank you very much
Best regards
--
Giulio Benetti
Benetti Engineering sas
On 9/21/21 3:03 PM, 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>
> ---
> package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package
2021-09-21 14:16 ` Thomas Petazzoni
@ 2021-09-22 9:26 ` Kamel Bouhara
0 siblings, 0 replies; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-22 9:26 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
On Tue, Sep 21, 2021 at 04:16:24PM +0200, Thomas Petazzoni wrote:
> Hello Kamel,
>
> On Tue, 21 Sep 2021 15:03:24 +0200
> Kamel Bouhara <kamel.bouhara@bootlin.com> 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 ]
> > ---
> > package/kmscube/Config.in | 18 ++++++++++++++----
> > package/kmscube/kmscube.mk | 3 ++-
> > 2 files changed, 16 insertions(+), 5 deletions(-)
> >
> > diff --git a/package/kmscube/Config.in b/package/kmscube/Config.in
> > index b6ad305bfb..d97b0f962e 100644
> > --- a/package/kmscube/Config.in
> > +++ b/package/kmscube/Config.in
> > @@ -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_NAME_DESC
>
> This does not exist in your PATCH 2/8:
>
> +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT
>
> +config BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
>
> Did you test this patch ?
>
I guess not since my last rebase, I'll do so for next version.
>
> > +comment "kmscube needs a toolchain w/ threads support"
> > + depends on BR2_PACKAGE_HAS_LIBEGL
> > + depends on BR2_PACKAGE_HAS_LIBGBM
> > + depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_NAME_DESC
> > + depends on BR2_PACKAGE_HAS_LIBGLES
> > + depends on !BR2_TOOLCHAIN_HAS_THREADS
>
> This should be:
>
> comment "kmscube needs EGL, GBM and OpenGL ES, and a toolchain w/ thread support"
OK.
>
> > diff --git a/package/kmscube/kmscube.mk b/package/kmscube/kmscube.mk
> > index 7b458376dc..26c82d2688 100644
> > --- a/package/kmscube/kmscube.mk
> > +++ b/package/kmscube/kmscube.mk
> > @@ -8,6 +8,7 @@ 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
> > +KMSCUBE_AUTORECONF = YES
>
> Why is autoreconf being added here ? On a meson-package, this doesn't
> make much sense.
Indeed, I think it's a bad merge.
>
> 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
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm
2021-09-21 14:13 ` Thomas Petazzoni
@ 2021-09-22 9:29 ` Kamel Bouhara
0 siblings, 0 replies; 18+ messages in thread
From: Kamel Bouhara @ 2021-09-22 9:29 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
On Tue, Sep 21, 2021 at 04:13:21PM +0200, Thomas Petazzoni wrote:
> On Tue, 21 Sep 2021 15:03:23 +0200
> Kamel Bouhara <kamel.bouhara@bootlin.com> wrote:
>
> > diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
> > index 31a9152407..dfcca89e46 100644
> > --- a/package/sunxi-mali-mainline/Config.in
> > +++ b/package/sunxi-mali-mainline/Config.in
> > @@ -3,6 +3,8 @@ 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_LIBGBM_HAS_FEATURE_DMA_BUF
>
> So here, you specify that sunxi-mali-mainline always provides libgbm.
>
> > select BR2_PACKAGE_HAS_LIBGLES
> > help
> > Install userspace Allwinner OpenGL libraries.
> > @@ -14,6 +16,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
>
> But here only if the wayland output is selected.
>
> > +
> > config BR2_PACKAGE_PROVIDES_LIBGLES
> > default "sunxi-mali-mainline"
> >
> > @@ -26,6 +31,7 @@ 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_HAS_LIBGBM
>
> If only the wayland variant provides a gbm implementation, then only
> this select should stay there, along with the select of
> BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF.
>
Yes that makes more sens, thanks.
> > diff --git a/package/sunxi-mali-mainline/gbm.pc b/package/sunxi-mali-mainline/gbm.pc
> > new file mode 100644
> > index 0000000000..e2f6c04a82
> > --- /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}
>
> Is it a requirement for GBM providers to provide a gbm.pc? If so, I
> think it would be great to mention it in the libgbm.mk, as a comment.
>
I need to check that unless someone know the answer.
> 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
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-09-22 9:29 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 13:03 [Buildroot] [PATCH 0/8] Use gbm API features Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 1/8] package/opengl/libgbm: new virtual package Kamel Bouhara
2021-09-21 13:31 ` Thomas Petazzoni
2021-09-21 13:03 ` [Buildroot] [PATCH 2/8] package/opengl/libgbm: introduce api features Kamel Bouhara
2021-09-21 14:10 ` Thomas Petazzoni
2021-09-21 13:03 ` [Buildroot] [PATCH 3/8] package/mesa3d: add gbm " Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 4/8] package/sunxi-mali-mainline: bump version Kamel Bouhara
2021-09-21 13:31 ` Thomas Petazzoni
2021-09-21 15:43 ` Giulio Benetti
2021-09-21 13:03 ` [Buildroot] [PATCH 5/8] package/sunxi-mali-mainline: add support for different outputs Kamel Bouhara
2021-09-21 15:39 ` Giulio Benetti
2021-09-21 13:03 ` [Buildroot] [PATCH 6/8] package/sunxi-mali-mainline: provides libgbm Kamel Bouhara
2021-09-21 14:13 ` Thomas Petazzoni
2021-09-22 9:29 ` Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 7/8] package/kmscube: use libgbm virtual package Kamel Bouhara
2021-09-21 14:16 ` Thomas Petazzoni
2021-09-22 9:26 ` Kamel Bouhara
2021-09-21 13:03 ` [Buildroot] [PATCH 8/8] package/gcnano-binaries: provides libgbm Kamel Bouhara
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.