All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
@ 2017-11-25 22:22 Giulio Benetti
  2017-11-25 22:22 ` [Buildroot] [PATCH 2/2] sunxi-mali-mainline: " Giulio Benetti
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Giulio Benetti @ 2017-11-25 22:22 UTC (permalink / raw)
  To: buildroot

Added kernel allwinner mali driver package.
Used combined with userspace Allwinner openGL libraries,
it gives possibility to use 3D openGL SoC acceleration.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 DEVELOPERS                                         |  3 ++
 package/Config.in                                  |  1 +
 package/sunxi-mali-driver-mainline/Config.in       | 38 ++++++++++++++++++++++
 .../sunxi-mali-driver-mainline.mk                  | 30 +++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 100644 package/sunxi-mali-driver-mainline/Config.in
 create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 7621f96..60a934e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -698,6 +698,9 @@ F:	package/ocrad/
 F:	package/tesseract-ocr/
 F:	package/webp/
 
+N:	Giulio Benetti <giulio.benetti@micronovasrl.com>
+F:	package/sunxi-mali-driver-mainline/
+
 N:	Gregory Dymarek <gregd72002@gmail.com>
 F:	package/ding-libs/
 F:	package/gengetopt/
diff --git a/package/Config.in b/package/Config.in
index fe5ccc4..e619992 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -497,6 +497,7 @@ endmenu
 	source "package/stm32flash/Config.in"
 	source "package/sunxi-cedarx/Config.in"
 	source "package/sunxi-mali/Config.in"
+	source "package/sunxi-mali-driver-mainline/Config.in"
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
 	source "package/ti-gfx/Config.in"
diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in
new file mode 100644
index 0000000..1f9ef59
--- /dev/null
+++ b/package/sunxi-mali-driver-mainline/Config.in
@@ -0,0 +1,38 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+	bool "sunxi-mali-driver-mainline"
+	depends on BR2_LINUX_KERNEL
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  This package builds and installs the Linux kernel driver for
+	  the Mali GPU on Allwinner platforms, compatible with recent
+	  Linux kernels (>= 4.4). Note that it should be installed
+	  together with the corresponding userspace OpenGL libraries,
+	  which are provided as binaries only at:
+	  https://github.com/free-electrons/mali-blobs
+
+	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
+	  following options enabled:
+
+	  - CONFIG_CMA
+	  - CONFIG_DMA_CMA
+	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+	  https://github.com/mripard/sunxi-mali/blob/master/README.md
+
+if BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+
+choice
+	prompt "Version"
+	default BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2
+	help
+	  Select the version of the kernel module.
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2
+	bool "r6p2"
+
+endchoice
+
+endif
diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
new file mode 100644
index 0000000..41d145d
--- /dev/null
+++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 42c7c139c14103a83bb2ad7e7a1f0ed491f96500
+SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+	KDIR=$(LINUX_DIR) \
+	CROSS_COMPILE=$(TARGET_CROSS) \
+	INSTALL_MOD_PATH=$(TARGET_DIR)
+
+ifeq ($(BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2),y)
+SUNXI_MALI_DRIVER_VER=r6p2
+endif
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r $(SUNXI_MALI_DRIVER_VER) -b
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r $(SUNXI_MALI_DRIVER_VER) -i
+endef
+
+$(eval $(generic-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 2/2] sunxi-mali-mainline: new package
  2017-11-25 22:22 [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package Giulio Benetti
@ 2017-11-25 22:22 ` Giulio Benetti
  2017-11-27 14:31   ` Maxime Ripard
  2018-02-15 20:43   ` Peter Korsgaard
  2017-11-27 14:28 ` [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: " Maxime Ripard
  2018-02-15 21:05 ` Peter Korsgaard
  2 siblings, 2 replies; 18+ messages in thread
From: Giulio Benetti @ 2017-11-25 22:22 UTC (permalink / raw)
  To: buildroot

Add Allwinner Mali openGL userspace driver r6p2.
Used combined with kernelspace Mali driver,
it gives possibility to use 3D openGL SoC acceleration.
It provides fbdev libraries and headers.
It is compatible with Linux >= 4.4 as sunxi-mali-driver-mainline.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 package/sunxi-mali-mainline/Config.in              | 36 ++++++++++++++++++++++
 package/sunxi-mali-mainline/egl.pc                 | 12 ++++++++
 package/sunxi-mali-mainline/glesv2.pc              | 12 ++++++++
 package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 33 ++++++++++++++++++++
 6 files changed, 95 insertions(+)
 create mode 100644 package/sunxi-mali-mainline/Config.in
 create mode 100644 package/sunxi-mali-mainline/egl.pc
 create mode 100644 package/sunxi-mali-mainline/glesv2.pc
 create mode 100644 package/sunxi-mali-mainline/sunxi-mali-mainline.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 60a934e..b26706b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -700,6 +700,7 @@ F:	package/webp/
 
 N:	Giulio Benetti <giulio.benetti@micronovasrl.com>
 F:	package/sunxi-mali-driver-mainline/
+F:	package/sunxi-mali-mainline/
 
 N:	Gregory Dymarek <gregd72002@gmail.com>
 F:	package/ding-libs/
diff --git a/package/Config.in b/package/Config.in
index e619992..dc0d8d1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -497,6 +497,7 @@ endmenu
 	source "package/stm32flash/Config.in"
 	source "package/sunxi-cedarx/Config.in"
 	source "package/sunxi-mali/Config.in"
+	source "package/sunxi-mali-mainline/Config.in"
 	source "package/sunxi-mali-driver-mainline/Config.in"
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
diff --git a/package/sunxi-mali-mainline/Config.in b/package/sunxi-mali-mainline/Config.in
new file mode 100644
index 0000000..3bf5a8d
--- /dev/null
+++ b/package/sunxi-mali-mainline/Config.in
@@ -0,0 +1,36 @@
+config BR2_PACKAGE_SUNXI_MALI_MAINLINE
+	bool "sunxi-mali-mainline"
+	depends on BR2_arm
+	depends on BR2_ARM_EABIHF
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_HAS_LIBEGL
+	select BR2_PACKAGE_HAS_LIBGLES
+	help
+	  Install userspace Allwinner OpenGL libraries.
+	
+	  https://github.com/free-electrons/mali-blobs
+
+if BR2_PACKAGE_SUNXI_MALI_MAINLINE
+
+config BR2_PACKAGE_PROVIDES_LIBEGL
+	default "sunxi-mali-mainline"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+	default "sunxi-mali-mainline"
+
+choice
+	prompt "Version"
+	default BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2
+	help
+	  Select the version of the userspace module.
+
+config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2
+	bool "r6p2"
+
+endchoice
+
+endif
+
+comment "sunxi-mali needs an EABIhf glibc toolchain"
+	depends on BR2_arm
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_ARM_EABIHF
diff --git a/package/sunxi-mali-mainline/egl.pc b/package/sunxi-mali-mainline/egl.pc
new file mode 100644
index 0000000..3854e5f
--- /dev/null
+++ b/package/sunxi-mali-mainline/egl.pc
@@ -0,0 +1,12 @@
+prefix=/usr/
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: egl
+Description: ARM Mali implementation of EGL
+Version: 1.4
+Requires:
+Libs: -L${libdir} -lEGL -lGLESv2
+Cflags: -I${includedir}
+
diff --git a/package/sunxi-mali-mainline/glesv2.pc b/package/sunxi-mali-mainline/glesv2.pc
new file mode 100644
index 0000000..6910b46
--- /dev/null
+++ b/package/sunxi-mali-mainline/glesv2.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: glesv2
+Description: ARM Mali implementation of OpenGL ESv2
+Version: 2.0
+Requires:
+Libs: -L${libdir} -lGLESv2 -lGLESv1_CM
+Cflags: -I${includedir}
+
diff --git a/package/sunxi-mali-mainline/sunxi-mali-mainline.mk b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
new file mode 100644
index 0000000..1f7c05c
--- /dev/null
+++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# sunxi-mali-mainline
+#
+################################################################################
+
+SUNXI_MALI_MAINLINE_VERSION = cb3e8ece9b2c3a70cbeb3204cd6f30eceaa32023
+SUNXI_MALI_MAINLINE_SITE = $(call github,free-electrons,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION))
+SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES
+SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles
+
+ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2),y)
+SUNXI_MALI_LIB_VER=r6p2
+endif
+
+define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS
+	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \
+		$(STAGING_DIR)/usr/lib/
+	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/include/* \
+		$(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
+endef
+
+define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS
+	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \
+		$(TARGET_DIR)/usr/lib/
+endef
+
+$(eval $(generic-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2017-11-25 22:22 [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package Giulio Benetti
  2017-11-25 22:22 ` [Buildroot] [PATCH 2/2] sunxi-mali-mainline: " Giulio Benetti
@ 2017-11-27 14:28 ` Maxime Ripard
  2017-11-27 15:23   ` Giulio Benetti
  2018-02-15 21:05 ` Peter Korsgaard
  2 siblings, 1 reply; 18+ messages in thread
From: Maxime Ripard @ 2017-11-27 14:28 UTC (permalink / raw)
  To: buildroot

Hi,

On Sat, Nov 25, 2017 at 11:22:48PM +0100, Giulio Benetti wrote:
> Added kernel allwinner mali driver package.
> Used combined with userspace Allwinner openGL libraries,
> it gives possibility to use 3D openGL SoC acceleration.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
>  DEVELOPERS                                         |  3 ++
>  package/Config.in                                  |  1 +
>  package/sunxi-mali-driver-mainline/Config.in       | 38 ++++++++++++++++++++++
>  .../sunxi-mali-driver-mainline.mk                  | 30 +++++++++++++++++
>  4 files changed, 72 insertions(+)
>  create mode 100644 package/sunxi-mali-driver-mainline/Config.in
>  create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 7621f96..60a934e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -698,6 +698,9 @@ F:	package/ocrad/
>  F:	package/tesseract-ocr/
>  F:	package/webp/
>  
> +N:	Giulio Benetti <giulio.benetti@micronovasrl.com>
> +F:	package/sunxi-mali-driver-mainline/
> +
>  N:	Gregory Dymarek <gregd72002@gmail.com>
>  F:	package/ding-libs/
>  F:	package/gengetopt/
> diff --git a/package/Config.in b/package/Config.in
> index fe5ccc4..e619992 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -497,6 +497,7 @@ endmenu
>  	source "package/stm32flash/Config.in"
>  	source "package/sunxi-cedarx/Config.in"
>  	source "package/sunxi-mali/Config.in"
> +	source "package/sunxi-mali-driver-mainline/Config.in"
>  	source "package/sysstat/Config.in"
>  	source "package/targetcli-fb/Config.in"
>  	source "package/ti-gfx/Config.in"
> diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in
> new file mode 100644
> index 0000000..1f9ef59
> --- /dev/null
> +++ b/package/sunxi-mali-driver-mainline/Config.in
> @@ -0,0 +1,38 @@
> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
> +	depends on !BR2_LINUX_KERNEL
> +
> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
> +	bool "sunxi-mali-driver-mainline"
> +	depends on BR2_LINUX_KERNEL
> +	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
> +	help
> +	  This package builds and installs the Linux kernel driver for
> +	  the Mali GPU on Allwinner platforms, compatible with recent
> +	  Linux kernels (>= 4.4). Note that it should be installed
> +	  together with the corresponding userspace OpenGL libraries,
> +	  which are provided as binaries only at:
> +	  https://github.com/free-electrons/mali-blobs
> +
> +	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
> +	  following options enabled:
> +
> +	  - CONFIG_CMA
> +	  - CONFIG_DMA_CMA
> +	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more

Sorry for missing that out earlier, but that one is not true. You can
achieve the same result using the drm_fbdev_overalloc kernel paremeter.

The rest looks good.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171127/fdcc9508/attachment.asc>

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

* [Buildroot] [PATCH 2/2] sunxi-mali-mainline: new package
  2017-11-25 22:22 ` [Buildroot] [PATCH 2/2] sunxi-mali-mainline: " Giulio Benetti
@ 2017-11-27 14:31   ` Maxime Ripard
  2018-02-15 20:43   ` Peter Korsgaard
  1 sibling, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2017-11-27 14:31 UTC (permalink / raw)
  To: buildroot

On Sat, Nov 25, 2017 at 11:22:49PM +0100, Giulio Benetti wrote:
> Add Allwinner Mali openGL userspace driver r6p2.
> Used combined with kernelspace Mali driver,
> it gives possibility to use 3D openGL SoC acceleration.
> It provides fbdev libraries and headers.
> It is compatible with Linux >= 4.4 as sunxi-mali-driver-mainline.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171127/72990ea7/attachment.asc>

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2017-11-27 14:28 ` [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: " Maxime Ripard
@ 2017-11-27 15:23   ` Giulio Benetti
  2017-11-27 23:34     ` Giulio Benetti
  0 siblings, 1 reply; 18+ messages in thread
From: Giulio Benetti @ 2017-11-27 15:23 UTC (permalink / raw)
  To: buildroot

Hi Maxime,

Il 27/11/2017 15:28, Maxime Ripard ha scritto:
> Hi,
> 
> On Sat, Nov 25, 2017 at 11:22:48PM +0100, Giulio Benetti wrote:
>> Added kernel allwinner mali driver package.
>> Used combined with userspace Allwinner openGL libraries,
>> it gives possibility to use 3D openGL SoC acceleration.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>>   DEVELOPERS                                         |  3 ++
>>   package/Config.in                                  |  1 +
>>   package/sunxi-mali-driver-mainline/Config.in       | 38 ++++++++++++++++++++++
>>   .../sunxi-mali-driver-mainline.mk                  | 30 +++++++++++++++++
>>   4 files changed, 72 insertions(+)
>>   create mode 100644 package/sunxi-mali-driver-mainline/Config.in
>>   create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
>>
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index 7621f96..60a934e 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -698,6 +698,9 @@ F:	package/ocrad/
>>   F:	package/tesseract-ocr/
>>   F:	package/webp/
>>   
>> +N:	Giulio Benetti <giulio.benetti@micronovasrl.com>
>> +F:	package/sunxi-mali-driver-mainline/
>> +
>>   N:	Gregory Dymarek <gregd72002@gmail.com>
>>   F:	package/ding-libs/
>>   F:	package/gengetopt/
>> diff --git a/package/Config.in b/package/Config.in
>> index fe5ccc4..e619992 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -497,6 +497,7 @@ endmenu
>>   	source "package/stm32flash/Config.in"
>>   	source "package/sunxi-cedarx/Config.in"
>>   	source "package/sunxi-mali/Config.in"
>> +	source "package/sunxi-mali-driver-mainline/Config.in"
>>   	source "package/sysstat/Config.in"
>>   	source "package/targetcli-fb/Config.in"
>>   	source "package/ti-gfx/Config.in"
>> diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in
>> new file mode 100644
>> index 0000000..1f9ef59
>> --- /dev/null
>> +++ b/package/sunxi-mali-driver-mainline/Config.in
>> @@ -0,0 +1,38 @@
>> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
>> +	depends on !BR2_LINUX_KERNEL
>> +
>> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
>> +	bool "sunxi-mali-driver-mainline"
>> +	depends on BR2_LINUX_KERNEL
>> +	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
>> +	help
>> +	  This package builds and installs the Linux kernel driver for
>> +	  the Mali GPU on Allwinner platforms, compatible with recent
>> +	  Linux kernels (>= 4.4). Note that it should be installed
>> +	  together with the corresponding userspace OpenGL libraries,
>> +	  which are provided as binaries only at:
>> +	  https://github.com/free-electrons/mali-blobs
>> +
>> +	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
>> +	  following options enabled:
>> +
>> +	  - CONFIG_CMA
>> +	  - CONFIG_DMA_CMA
>> +	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
> 
> Sorry for missing that out earlier, but that one is not true. You can
> achieve the same result using the drm_fbdev_overalloc kernel paremeter.

Ok, I add it on Help.

Thanks

> 
> The rest looks good.
> 
> Maxime
> 


-- 
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2017-11-27 15:23   ` Giulio Benetti
@ 2017-11-27 23:34     ` Giulio Benetti
  2018-01-13 12:22       ` Giulio Benetti
  0 siblings, 1 reply; 18+ messages in thread
From: Giulio Benetti @ 2017-11-27 23:34 UTC (permalink / raw)
  To: buildroot

Hello everybody,

Il 27/11/2017 16:23, Giulio Benetti ha scritto:
> Hi Maxime,
> 
> Il 27/11/2017 15:28, Maxime Ripard ha scritto:
>> Hi,
>>
>> On Sat, Nov 25, 2017 at 11:22:48PM +0100, Giulio Benetti wrote:
>>> Added kernel allwinner mali driver package.
>>> Used combined with userspace Allwinner openGL libraries,
>>> it gives possibility to use 3D openGL SoC acceleration.
>>>
>>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>>> ---
>>> ? DEVELOPERS???????????????????????????????????????? |? 3 ++
>>> ? package/Config.in????????????????????????????????? |? 1 +
>>> ? package/sunxi-mali-driver-mainline/Config.in?????? | 38 
>>> ++++++++++++++++++++++
>>> ? .../sunxi-mali-driver-mainline.mk????????????????? | 30 
>>> +++++++++++++++++
>>> ? 4 files changed, 72 insertions(+)
>>> ? create mode 100644 package/sunxi-mali-driver-mainline/Config.in
>>> ? create mode 100644 
>>> package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
>>>
>>> diff --git a/DEVELOPERS b/DEVELOPERS
>>> index 7621f96..60a934e 100644
>>> --- a/DEVELOPERS
>>> +++ b/DEVELOPERS
>>> @@ -698,6 +698,9 @@ F:??? package/ocrad/
>>> ? F:??? package/tesseract-ocr/
>>> ? F:??? package/webp/
>>> +N:??? Giulio Benetti <giulio.benetti@micronovasrl.com>
>>> +F:??? package/sunxi-mali-driver-mainline/
>>> +
>>> ? N:??? Gregory Dymarek <gregd72002@gmail.com>
>>> ? F:??? package/ding-libs/
>>> ? F:??? package/gengetopt/
>>> diff --git a/package/Config.in b/package/Config.in
>>> index fe5ccc4..e619992 100644
>>> --- a/package/Config.in
>>> +++ b/package/Config.in
>>> @@ -497,6 +497,7 @@ endmenu
>>> ????? source "package/stm32flash/Config.in"
>>> ????? source "package/sunxi-cedarx/Config.in"
>>> ????? source "package/sunxi-mali/Config.in"
>>> +??? source "package/sunxi-mali-driver-mainline/Config.in"
>>> ????? source "package/sysstat/Config.in"
>>> ????? source "package/targetcli-fb/Config.in"
>>> ????? source "package/ti-gfx/Config.in"
>>> diff --git a/package/sunxi-mali-driver-mainline/Config.in 
>>> b/package/sunxi-mali-driver-mainline/Config.in
>>> new file mode 100644
>>> index 0000000..1f9ef59
>>> --- /dev/null
>>> +++ b/package/sunxi-mali-driver-mainline/Config.in
>>> @@ -0,0 +1,38 @@
>>> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
>>> +??? depends on !BR2_LINUX_KERNEL
>>> +
>>> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
>>> +??? bool "sunxi-mali-driver-mainline"
>>> +??? depends on BR2_LINUX_KERNEL
>>> +??? select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
>>> +??? help
>>> +????? This package builds and installs the Linux kernel driver for
>>> +????? the Mali GPU on Allwinner platforms, compatible with recent
>>> +????? Linux kernels (>= 4.4). Note that it should be installed
>>> +????? together with the corresponding userspace OpenGL libraries,
>>> +????? which are provided as binaries only at:
>>> +????? https://github.com/free-electrons/mali-blobs
>>> +
>>> +????? sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with 
>>> the
>>> +????? following options enabled:
>>> +
>>> +????? - CONFIG_CMA
>>> +????? - CONFIG_DMA_CMA
>>> +????? - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
>>
>> Sorry for missing that out earlier, but that one is not true. You can
>> achieve the same result using the drm_fbdev_overalloc kernel paremeter.
> 
> Ok, I add it on Help.

y_morin on #buildroot irc told me that maybe this missing Help phrase 
can be added by the one who will commit the patch.
Is it ok, or do I have to submit a new patch?

Kind regards

> 
> Thanks
> 
>>
>> The rest looks good.
>>
>> Maxime
>>
> 
> 


-- 
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2017-11-27 23:34     ` Giulio Benetti
@ 2018-01-13 12:22       ` Giulio Benetti
  0 siblings, 0 replies; 18+ messages in thread
From: Giulio Benetti @ 2018-01-13 12:22 UTC (permalink / raw)
  To: buildroot

Hello,

when could it be ok to update git commit SHA1 to the latest
and integrate parallel build and last Help description?

Regards

-- 
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

Il 28/11/2017 00:34, Giulio Benetti ha scritto:
> Hello everybody,
> 
> Il 27/11/2017 16:23, Giulio Benetti ha scritto:
>> Hi Maxime,
>>
>> Il 27/11/2017 15:28, Maxime Ripard ha scritto:
>>> Hi,
>>>
>>> On Sat, Nov 25, 2017 at 11:22:48PM +0100, Giulio Benetti wrote:
>>>> Added kernel allwinner mali driver package.
>>>> Used combined with userspace Allwinner openGL libraries,
>>>> it gives possibility to use 3D openGL SoC acceleration.
>>>>
>>>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>>>> ---
>>>> ? DEVELOPERS???????????????????????????????????????? |? 3 ++
>>>> ? package/Config.in????????????????????????????????? |? 1 +
>>>> ? package/sunxi-mali-driver-mainline/Config.in?????? | 38 
>>>> ++++++++++++++++++++++
>>>> ? .../sunxi-mali-driver-mainline.mk????????????????? | 30 
>>>> +++++++++++++++++
>>>> ? 4 files changed, 72 insertions(+)
>>>> ? create mode 100644 package/sunxi-mali-driver-mainline/Config.in
>>>> ? create mode 100644 
>>>> package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
>>>>
>>>> diff --git a/DEVELOPERS b/DEVELOPERS
>>>> index 7621f96..60a934e 100644
>>>> --- a/DEVELOPERS
>>>> +++ b/DEVELOPERS
>>>> @@ -698,6 +698,9 @@ F:??? package/ocrad/
>>>> ? F:??? package/tesseract-ocr/
>>>> ? F:??? package/webp/
>>>> +N:??? Giulio Benetti <giulio.benetti@micronovasrl.com>
>>>> +F:??? package/sunxi-mali-driver-mainline/
>>>> +
>>>> ? N:??? Gregory Dymarek <gregd72002@gmail.com>
>>>> ? F:??? package/ding-libs/
>>>> ? F:??? package/gengetopt/
>>>> diff --git a/package/Config.in b/package/Config.in
>>>> index fe5ccc4..e619992 100644
>>>> --- a/package/Config.in
>>>> +++ b/package/Config.in
>>>> @@ -497,6 +497,7 @@ endmenu
>>>> ????? source "package/stm32flash/Config.in"
>>>> ????? source "package/sunxi-cedarx/Config.in"
>>>> ????? source "package/sunxi-mali/Config.in"
>>>> +??? source "package/sunxi-mali-driver-mainline/Config.in"
>>>> ????? source "package/sysstat/Config.in"
>>>> ????? source "package/targetcli-fb/Config.in"
>>>> ????? source "package/ti-gfx/Config.in"
>>>> diff --git a/package/sunxi-mali-driver-mainline/Config.in 
>>>> b/package/sunxi-mali-driver-mainline/Config.in
>>>> new file mode 100644
>>>> index 0000000..1f9ef59
>>>> --- /dev/null
>>>> +++ b/package/sunxi-mali-driver-mainline/Config.in
>>>> @@ -0,0 +1,38 @@
>>>> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
>>>> +??? depends on !BR2_LINUX_KERNEL
>>>> +
>>>> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
>>>> +??? bool "sunxi-mali-driver-mainline"
>>>> +??? depends on BR2_LINUX_KERNEL
>>>> +??? select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
>>>> +??? help
>>>> +????? This package builds and installs the Linux kernel driver for
>>>> +????? the Mali GPU on Allwinner platforms, compatible with recent
>>>> +????? Linux kernels (>= 4.4). Note that it should be installed
>>>> +????? together with the corresponding userspace OpenGL libraries,
>>>> +????? which are provided as binaries only at:
>>>> +????? https://github.com/free-electrons/mali-blobs
>>>> +
>>>> +????? sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 
>>>> with the
>>>> +????? following options enabled:
>>>> +
>>>> +????? - CONFIG_CMA
>>>> +????? - CONFIG_DMA_CMA
>>>> +????? - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
>>>
>>> Sorry for missing that out earlier, but that one is not true. You can
>>> achieve the same result using the drm_fbdev_overalloc kernel paremeter.
>>
>> Ok, I add it on Help.
> 
> y_morin on #buildroot irc told me that maybe this missing Help phrase 
> can be added by the one who will commit the patch.
> Is it ok, or do I have to submit a new patch?
> 
> Kind regards
> 
>>
>> Thanks
>>
>>>
>>> The rest looks good.
>>>
>>> Maxime
>>>
>>
>>
> 
> 

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

* [Buildroot] [PATCH 2/2] sunxi-mali-mainline: new package
  2017-11-25 22:22 ` [Buildroot] [PATCH 2/2] sunxi-mali-mainline: " Giulio Benetti
  2017-11-27 14:31   ` Maxime Ripard
@ 2018-02-15 20:43   ` Peter Korsgaard
  2018-02-15 20:51     ` Giulio Benetti
  1 sibling, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2018-02-15 20:43 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

 > Add Allwinner Mali openGL userspace driver r6p2.
 > Used combined with kernelspace Mali driver,
 > it gives possibility to use 3D openGL SoC acceleration.
 > It provides fbdev libraries and headers.
 > It is compatible with Linux >= 4.4 as sunxi-mali-driver-mainline.

 > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
 > ---
 >  DEVELOPERS                                         |  1 +
 >  package/Config.in                                  |  1 +
 >  package/sunxi-mali-mainline/Config.in              | 36 ++++++++++++++++++++++
 >  package/sunxi-mali-mainline/egl.pc                 | 12 ++++++++
 >  package/sunxi-mali-mainline/glesv2.pc              | 12 ++++++++
 >  package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 33 ++++++++++++++++++++
 >  6 files changed, 95 insertions(+)
 >  create mode 100644 package/sunxi-mali-mainline/Config.in
 >  create mode 100644 package/sunxi-mali-mainline/egl.pc
 >  create mode 100644 package/sunxi-mali-mainline/glesv2.pc
 >  create mode 100644 package/sunxi-mali-mainline/sunxi-mali-mainline.mk

 > diff --git a/DEVELOPERS b/DEVELOPERS
 > index 60a934e..b26706b 100644
 > --- a/DEVELOPERS
 > +++ b/DEVELOPERS
 > @@ -700,6 +700,7 @@ F:	package/webp/
 
 >  N:	Giulio Benetti <giulio.benetti@micronovasrl.com>
 >  F:	package/sunxi-mali-driver-mainline/
 > +F:	package/sunxi-mali-mainline/

In Buildroot we "always" build user space and optionally build a Linux
kernel, so I've swapped these two packages around.


 > +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
 > @@ -0,0 +1,33 @@
 > +################################################################################
 > +#
 > +# sunxi-mali-mainline
 > +#
 > +################################################################################
 > +
 > +SUNXI_MALI_MAINLINE_VERSION = cb3e8ece9b2c3a70cbeb3204cd6f30eceaa32023
 > +SUNXI_MALI_MAINLINE_SITE = $(call github,free-electrons,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION))
 > +SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES
 > +SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles
 > +
 > +ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2),y)
 > +SUNXI_MALI_LIB_VER=r6p2
 > +endif

Variables should be prefixed with the package name. You have all the
other version logic in the Config.in, so I've changed it to use a
BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION symbol in Config.in and then
assign that to SUNXI_MALI_MAINLINE_REV similar to E.G. how it is done
for linux-headers.


 > +
 > +define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS
 > +	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \
 > +		$(STAGING_DIR)/usr/lib/
 > +	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/include/* \
 > +		$(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
 > +endef
 > +
 > +define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS
 > +	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \
 > +		$(TARGET_DIR)/usr/lib/
 > +endef

You need to ensure that the destination directories already exist, so
I've added the needed mkdir -p calls before.

Committed to next with these fixes, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 2/2] sunxi-mali-mainline: new package
  2018-02-15 20:43   ` Peter Korsgaard
@ 2018-02-15 20:51     ` Giulio Benetti
  0 siblings, 0 replies; 18+ messages in thread
From: Giulio Benetti @ 2018-02-15 20:51 UTC (permalink / raw)
  To: buildroot

Il 15/02/2018 21:43, Peter Korsgaard ha scritto:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
> 
>   > Add Allwinner Mali openGL userspace driver r6p2.
>   > Used combined with kernelspace Mali driver,
>   > it gives possibility to use 3D openGL SoC acceleration.
>   > It provides fbdev libraries and headers.
>   > It is compatible with Linux >= 4.4 as sunxi-mali-driver-mainline.
> 
>   > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>   > ---
>   >  DEVELOPERS                                         |  1 +
>   >  package/Config.in                                  |  1 +
>   >  package/sunxi-mali-mainline/Config.in              | 36 ++++++++++++++++++++++
>   >  package/sunxi-mali-mainline/egl.pc                 | 12 ++++++++
>   >  package/sunxi-mali-mainline/glesv2.pc              | 12 ++++++++
>   >  package/sunxi-mali-mainline/sunxi-mali-mainline.mk | 33 ++++++++++++++++++++
>   >  6 files changed, 95 insertions(+)
>   >  create mode 100644 package/sunxi-mali-mainline/Config.in
>   >  create mode 100644 package/sunxi-mali-mainline/egl.pc
>   >  create mode 100644 package/sunxi-mali-mainline/glesv2.pc
>   >  create mode 100644 package/sunxi-mali-mainline/sunxi-mali-mainline.mk
> 
>   > diff --git a/DEVELOPERS b/DEVELOPERS
>   > index 60a934e..b26706b 100644
>   > --- a/DEVELOPERS
>   > +++ b/DEVELOPERS
>   > @@ -700,6 +700,7 @@ F:	package/webp/
>   
>   >  N:	Giulio Benetti <giulio.benetti@micronovasrl.com>
>   >  F:	package/sunxi-mali-driver-mainline/
>   > +F:	package/sunxi-mali-mainline/
> 
> In Buildroot we "always" build user space and optionally build a Linux
> kernel, so I've swapped these two packages around.

Ok, I see the point.

> 
> 
>   > +++ b/package/sunxi-mali-mainline/sunxi-mali-mainline.mk
>   > @@ -0,0 +1,33 @@
>   > +################################################################################
>   > +#
>   > +# sunxi-mali-mainline
>   > +#
>   > +################################################################################
>   > +
>   > +SUNXI_MALI_MAINLINE_VERSION = cb3e8ece9b2c3a70cbeb3204cd6f30eceaa32023
>   > +SUNXI_MALI_MAINLINE_SITE = $(call github,free-electrons,mali-blobs,$(SUNXI_MALI_MAINLINE_VERSION))
>   > +SUNXI_MALI_MAINLINE_INSTALL_STAGING = YES
>   > +SUNXI_MALI_MAINLINE_PROVIDES = libegl libgles
>   > +
>   > +ifeq ($(BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2),y)
>   > +SUNXI_MALI_LIB_VER=r6p2
>   > +endif
> 
> Variables should be prefixed with the package name. You have all the
> other version logic in the Config.in, so I've changed it to use a
> BR2_PACKAGE_SUNXI_MALI_MAINLINE_REVISION symbol in Config.in and then
> assign that to SUNXI_MALI_MAINLINE_REV similar to E.G. how it is done
> for linux-headers.

Cleaner and easier this way.

> 
> 
>   > +
>   > +define SUNXI_MALI_MAINLINE_INSTALL_STAGING_CMDS
>   > +	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \
>   > +		$(STAGING_DIR)/usr/lib/
>   > +	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/include/* \
>   > +		$(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
>   > +endef
>   > +
>   > +define SUNXI_MALI_MAINLINE_INSTALL_TARGET_CMDS
>   > +	cp -rf $(@D)/$(SUNXI_MALI_LIB_VER)/fbdev/lib/lib_fb_dev/* \
>   > +		$(TARGET_DIR)/usr/lib/
>   > +endef
> 
> You need to ensure that the destination directories already exist, so
> I've added the needed mkdir -p calls before.

Right, forgotten.

> 
> Committed to next with these fixes, thanks.

Thanks!!

-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

> 

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2017-11-25 22:22 [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package Giulio Benetti
  2017-11-25 22:22 ` [Buildroot] [PATCH 2/2] sunxi-mali-mainline: " Giulio Benetti
  2017-11-27 14:28 ` [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: " Maxime Ripard
@ 2018-02-15 21:05 ` Peter Korsgaard
  2018-02-15 21:34   ` Giulio Benetti
  2 siblings, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2018-02-15 21:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

 > Added kernel allwinner mali driver package.
 > Used combined with userspace Allwinner openGL libraries,
 > it gives possibility to use 3D openGL SoC acceleration.

 > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
 > ---
 >  DEVELOPERS                                         |  3 ++
 >  package/Config.in                                  |  1 +
 >  package/sunxi-mali-driver-mainline/Config.in       | 38 ++++++++++++++++++++++
 >  .../sunxi-mali-driver-mainline.mk                  | 30 +++++++++++++++++

I've renamed this to sunxi-mali-mainline-driver to better match
sunxi-mali-mainline and so it sorts after that package.

> +++ b/package/sunxi-mali-driver-mainline/Config.in
 > @@ -0,0 +1,38 @@
 > +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
 > +	depends on !BR2_LINUX_KERNEL
 > +
 > +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
 > +	bool "sunxi-mali-driver-mainline"
 > +	depends on BR2_LINUX_KERNEL
 > +	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra

This package doesn't make any sense without the binary user space
component, so I've changed it to also depend on
BR2_PACKAGE_SUNXI_MALI_MAINLINE. With that added, the package is only
visible if that package is enabled and the Linux kernel is getting
built, so it makes sense to enable this package by default, so I've
added 'default y'.


> +	help
 > +	  This package builds and installs the Linux kernel driver for
 > +	  the Mali GPU on Allwinner platforms, compatible with recent
 > +	  Linux kernels (>= 4.4). Note that it should be installed
 > +	  together with the corresponding userspace OpenGL libraries,
 > +	  which are provided as binaries only at:
 > +	  https://github.com/free-electrons/mali-blobs
 > +
 > +	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
 > +	  following options enabled:
 > +
 > +	  - CONFIG_CMA
 > +	  - CONFIG_DMA_CMA
 > +	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more

I've dropped this last line as suggested by Maxime.

For the CMA options it makes sense to automatically enable these kernel
options, so I've added the needed logic in linux.mk to do so.


 > +if BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
 > +
 > +choice
 > +	prompt "Version"
 > +	default BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2
 > +	help
 > +	  Select the version of the kernel module.
 > +
 > +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2
 > +	bool "r6p2"

The user space and kernel driver has to use the same version, so it
doesn't make sense to have an independent version selection here.

I've dropped this and instead changed the .mk file to use the
SUNXI_MALI_MAINLINE_REV variable from that package.

Committed to next with that fixed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-15 21:05 ` Peter Korsgaard
@ 2018-02-15 21:34   ` Giulio Benetti
  2018-02-15 22:03     ` Peter Korsgaard
  0 siblings, 1 reply; 18+ messages in thread
From: Giulio Benetti @ 2018-02-15 21:34 UTC (permalink / raw)
  To: buildroot

Il 15/02/2018 22:05, Peter Korsgaard ha scritto:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
> 
>   > Added kernel allwinner mali driver package.
>   > Used combined with userspace Allwinner openGL libraries,
>   > it gives possibility to use 3D openGL SoC acceleration.
> 
>   > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>   > ---
>   >  DEVELOPERS                                         |  3 ++
>   >  package/Config.in                                  |  1 +
>   >  package/sunxi-mali-driver-mainline/Config.in       | 38 ++++++++++++++++++++++
>   >  .../sunxi-mali-driver-mainline.mk                  | 30 +++++++++++++++++
> 
> I've renamed this to sunxi-mali-mainline-driver to better match
> sunxi-mali-mainline and so it sorts after that package.
> 
>> +++ b/package/sunxi-mali-driver-mainline/Config.in
>   > @@ -0,0 +1,38 @@
>   > +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
>   > +	depends on !BR2_LINUX_KERNEL
>   > +
>   > +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
>   > +	bool "sunxi-mali-driver-mainline"
>   > +	depends on BR2_LINUX_KERNEL
>   > +	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
> 
> This package doesn't make any sense without the binary user space
> component, so I've changed it to also depend on
> BR2_PACKAGE_SUNXI_MALI_MAINLINE. With that added, the package is only
> visible if that package is enabled and the Linux kernel is getting
> built, so it makes sense to enable this package by default, so I've
> added 'default y'.
> 
> 
>> +	help
>   > +	  This package builds and installs the Linux kernel driver for
>   > +	  the Mali GPU on Allwinner platforms, compatible with recent
>   > +	  Linux kernels (>= 4.4). Note that it should be installed
>   > +	  together with the corresponding userspace OpenGL libraries,
>   > +	  which are provided as binaries only at:
>   > +	  https://github.com/free-electrons/mali-blobs
>   > +
>   > +	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
>   > +	  following options enabled:
>   > +
>   > +	  - CONFIG_CMA
>   > +	  - CONFIG_DMA_CMA
>   > +	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
> 
> I've dropped this last line as suggested by Maxime.
> 
> For the CMA options it makes sense to automatically enable these kernel
> options, so I've added the needed logic in linux.mk to do so.

New thing learnt.

> 
> 
>   > +if BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
>   > +
>   > +choice
>   > +	prompt "Version"
>   > +	default BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2
>   > +	help
>   > +	  Select the version of the kernel module.
>   > +
>   > +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE_R6P2
>   > +	bool "r6p2"
> 
> The user space and kernel driver has to use the same version, so it
> doesn't make sense to have an independent version selection here.
> 
> I've dropped this and instead changed the .mk file to use the
> SUNXI_MALI_MAINLINE_REV variable from that package.

Right.

Thank you very much for helping me on this,
it was not so easy as first package to me.

-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

> 
> Committed to next with that fixed, thanks.
> 

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-15 21:34   ` Giulio Benetti
@ 2018-02-15 22:03     ` Peter Korsgaard
  2018-02-15 22:06       ` Giulio Benetti
  0 siblings, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2018-02-15 22:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

Hi,

 > Thank you very much for helping me on this,
 > it was not so easy as first package to me.

You are welcome, thank you for contributing!

As you perhaps noticed, I've also bumped the sunxi-mali-mainline-driver
version for 4.15 support:

https://git.busybox.net/buildroot/commit/?h=next&id=1d339809d61aeed2911291830581f643596a2e5c

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-15 22:03     ` Peter Korsgaard
@ 2018-02-15 22:06       ` Giulio Benetti
  2018-02-15 22:32         ` Peter Korsgaard
  0 siblings, 1 reply; 18+ messages in thread
From: Giulio Benetti @ 2018-02-15 22:06 UTC (permalink / raw)
  To: buildroot

Hi,

Il 15/02/2018 23:03, Peter Korsgaard ha scritto:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
> 
> Hi,
> 
>   > Thank you very much for helping me on this,
>   > it was not so easy as first package to me.
> 
> You are welcome, thank you for contributing!
> 
> As you perhaps noticed, I've also bumped the sunxi-mali-mainline-driver
> version for 4.15 support:
> 
> https://git.busybox.net/buildroot/commit/?h=next&id=1d339809d61aeed2911291830581f643596a2e5c

Yes, I've seen, I'm almost trying to rebuild.
I've seen you use quilt before calling build.sh script.
But build.sh should call it by itself.
Now I check and eventually I send you a patch.

As soon as Maxime accepts my PR on sunxi-mali we can bump again for 
4.16-rc1 building.

Ah, one question, you figure as Author because you've reworked heavily 
the patch, right? (and it seems more than right to me)
Or was it a mistake?

> 


-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-15 22:06       ` Giulio Benetti
@ 2018-02-15 22:32         ` Peter Korsgaard
  2018-02-15 22:35           ` Giulio Benetti
  2018-02-16  9:20           ` Giulio Benetti
  0 siblings, 2 replies; 18+ messages in thread
From: Peter Korsgaard @ 2018-02-15 22:32 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

 > Hi,
 > Il 15/02/2018 23:03, Peter Korsgaard ha scritto:
 >>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
 >> 
 >> Hi,
 >> 
 >> > Thank you very much for helping me on this,
 >> > it was not so easy as first package to me.
 >> 
 >> You are welcome, thank you for contributing!
 >> 
 >> As you perhaps noticed, I've also bumped the sunxi-mali-mainline-driver
 >> version for 4.15 support:
 >> 
 >> https://git.busybox.net/buildroot/commit/?h=next&id=1d339809d61aeed2911291830581f643596a2e5c

 > Yes, I've seen, I'm almost trying to rebuild.
 > I've seen you use quilt before calling build.sh script.
 > But build.sh should call it by itself.

No, I'm NOT using quilt. quilt is not a required dependency for
Buildroot (and we don't have a host-quilt package), so I'm tweaking
build.sh to use our apply-patches.sh script like we use to apply our
patches instead of quilt.

 > Ah, one question, you figure as Author because you've reworked heavily
 > the patch, right? (and it seems more than right to me)
 > Or was it a mistake?

Ups, that was mistake. I wanted to keep you authorship for the 2
patches, but me for the version bump - But apparently git ends up
changing the authorship when you squash commits which I did to apply the
various fixups - Sorry about that!

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-15 22:32         ` Peter Korsgaard
@ 2018-02-15 22:35           ` Giulio Benetti
  2018-02-16  9:20           ` Giulio Benetti
  1 sibling, 0 replies; 18+ messages in thread
From: Giulio Benetti @ 2018-02-15 22:35 UTC (permalink / raw)
  To: buildroot

Hi,

Il 15/02/2018 23:32, Peter Korsgaard ha scritto:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
> 
>   > Hi,
>   > Il 15/02/2018 23:03, Peter Korsgaard ha scritto:
>   >>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
>   >>
>   >> Hi,
>   >>
>   >> > Thank you very much for helping me on this,
>   >> > it was not so easy as first package to me.
>   >>
>   >> You are welcome, thank you for contributing!
>   >>
>   >> As you perhaps noticed, I've also bumped the sunxi-mali-mainline-driver
>   >> version for 4.15 support:
>   >>
>   >> https://git.busybox.net/buildroot/commit/?h=next&id=1d339809d61aeed2911291830581f643596a2e5c
> 
>   > Yes, I've seen, I'm almost trying to rebuild.
>   > I've seen you use quilt before calling build.sh script.
>   > But build.sh should call it by itself.
> 
> No, I'm NOT using quilt. quilt is not a required dependency for
> Buildroot (and we don't have a host-quilt package), so I'm tweaking
> build.sh to use our apply-patches.sh script like we use to apply our
> patches instead of quilt.

Ah right, not host-quilt, now I've got the point.
Of course I had quilt installed on my host :)

> 
>   > Ah, one question, you figure as Author because you've reworked heavily
>   > the patch, right? (and it seems more than right to me)
>   > Or was it a mistake?
> 
> Ups, that was mistake. I wanted to keep you authorship for the 2
> patches, but me for the version bump - But apparently git ends up
> changing the authorship when you squash commits which I did to apply the
> various fixups - Sorry about that!

No problem! It was only to understand.
Thanks again
-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

> 

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-15 22:32         ` Peter Korsgaard
  2018-02-15 22:35           ` Giulio Benetti
@ 2018-02-16  9:20           ` Giulio Benetti
  2018-02-16 12:26             ` Peter Korsgaard
  1 sibling, 1 reply; 18+ messages in thread
From: Giulio Benetti @ 2018-02-16  9:20 UTC (permalink / raw)
  To: buildroot

Hi,

Il 15/02/2018 23:32, Peter Korsgaard ha scritto:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
> 
>   > Hi,
>   > Il 15/02/2018 23:03, Peter Korsgaard ha scritto:
>   >>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
>   >>
>   >> Hi,
>   >>
>   >> > Thank you very much for helping me on this,
>   >> > it was not so easy as first package to me.
>   >>
>   >> You are welcome, thank you for contributing!
>   >>
>   >> As you perhaps noticed, I've also bumped the sunxi-mali-mainline-driver
>   >> version for 4.15 support:
>   >>
>   >> https://git.busybox.net/buildroot/commit/?h=next&id=1d339809d61aeed2911291830581f643596a2e5c
> 
>   > Yes, I've seen, I'm almost trying to rebuild.
>   > I've seen you use quilt before calling build.sh script.
>   > But build.sh should call it by itself.
> 
> No, I'm NOT using quilt. quilt is not a required dependency for
> Buildroot (and we don't have a host-quilt package), so I'm tweaking
> build.sh to use our apply-patches.sh script like we use to apply our
> patches instead of quilt.

Would it make sense to add host-quilt package?

> 
>   > Ah, one question, you figure as Author because you've reworked heavily
>   > the patch, right? (and it seems more than right to me)
>   > Or was it a mistake?
> 
> Ups, that was mistake. I wanted to keep you authorship for the 2
> patches, but me for the version bump - But apparently git ends up
> changing the authorship when you squash commits which I did to apply the
> various fixups - Sorry about that!
> 


-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-16  9:20           ` Giulio Benetti
@ 2018-02-16 12:26             ` Peter Korsgaard
  2018-02-16 12:34               ` Giulio Benetti
  0 siblings, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2018-02-16 12:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

Hi,

 >> No, I'm NOT using quilt. quilt is not a required dependency for
 >> Buildroot (and we don't have a host-quilt package), so I'm tweaking
 >> build.sh to use our apply-patches.sh script like we use to apply our
 >> patches instead of quilt.

 > Would it make sense to add host-quilt package?

Well, we could - But as it is fairly simple to patch build.sh to use
apply-patches.sh and no other packages currently needs it I decided not
to do so yet.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package
  2018-02-16 12:26             ` Peter Korsgaard
@ 2018-02-16 12:34               ` Giulio Benetti
  0 siblings, 0 replies; 18+ messages in thread
From: Giulio Benetti @ 2018-02-16 12:34 UTC (permalink / raw)
  To: buildroot

Hi,

Il 16/02/2018 13:26, Peter Korsgaard ha scritto:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:
> 
> Hi,
> 
>   >> No, I'm NOT using quilt. quilt is not a required dependency for
>   >> Buildroot (and we don't have a host-quilt package), so I'm tweaking
>   >> build.sh to use our apply-patches.sh script like we use to apply our
>   >> patches instead of quilt.
> 
>   > Would it make sense to add host-quilt package?
> 
> Well, we could - But as it is fairly simple to patch build.sh to use
> apply-patches.sh and no other packages currently needs it I decided not
> to do so yet.

Ok, thanks.

-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

> 

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

end of thread, other threads:[~2018-02-16 12:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 22:22 [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: new package Giulio Benetti
2017-11-25 22:22 ` [Buildroot] [PATCH 2/2] sunxi-mali-mainline: " Giulio Benetti
2017-11-27 14:31   ` Maxime Ripard
2018-02-15 20:43   ` Peter Korsgaard
2018-02-15 20:51     ` Giulio Benetti
2017-11-27 14:28 ` [Buildroot] [PATCH 1/2] sunxi-mali-driver-mainline: " Maxime Ripard
2017-11-27 15:23   ` Giulio Benetti
2017-11-27 23:34     ` Giulio Benetti
2018-01-13 12:22       ` Giulio Benetti
2018-02-15 21:05 ` Peter Korsgaard
2018-02-15 21:34   ` Giulio Benetti
2018-02-15 22:03     ` Peter Korsgaard
2018-02-15 22:06       ` Giulio Benetti
2018-02-15 22:32         ` Peter Korsgaard
2018-02-15 22:35           ` Giulio Benetti
2018-02-16  9:20           ` Giulio Benetti
2018-02-16 12:26             ` Peter Korsgaard
2018-02-16 12:34               ` Giulio Benetti

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.