All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 0/2] Raspberry Pi 4 - mesa3d support
@ 2020-02-04 14:44 Peter Seiderer
  2020-02-04 14:44 ` [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support Peter Seiderer
  2020-02-04 14:44 ` [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text Peter Seiderer
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Seiderer @ 2020-02-04 14:44 UTC (permalink / raw)
  To: buildroot

Add Raspberry Pi 4 - mesa3d support, enables hardware supported
graphic output for RPi4 64bit using mesa3d.

Tested by adding DTB overlay 'dtoverlay=vc4-fkms-v3d' to config.txt and
running the following commands:

	$ QT_LOGGING_RULES="qt.qpa.*=true" /usr/lib/qt/examples/gui/analogclock/analogclock

	$ QT_LOGGING_RULES="qt.qpa.*=true" /usr/lib/qt/examples/quickcontrols/controls/gallery/gallery

Used defconfig:

BR2_aarch64=y
BR2_cortex_a72=y
BR2_ARM_FPU_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_DHCP="eth0"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,64d0a9870ac14d5eb5253f67d984ae348eec1393)/linux-64d0a9870ac14d5eb5253f67d984ae348eec1393.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b"
BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_KMSCUBE=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_EXAMPLES=y
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
BR2_PACKAGE_QT5BASE_EGLFS=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
BR2_PACKAGE_QT5BASE_HARFBUZZ=y
BR2_PACKAGE_QT5BASE_GIF=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5QUICKCONTROLS=y
BR2_PACKAGE_QT5QUICKCONTROLS2=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="384M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y


Peter Seiderer (2):
  package/mesa3d: add v3d driver support
  package/mesa3d: update vc4 help text

 package/mesa3d/Config.in | 18 ++++++++++++++++--
 package/mesa3d/mesa3d.mk |  3 +++
 2 files changed, 19 insertions(+), 2 deletions(-)

-- 
2.25.0

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

* [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support
  2020-02-04 14:44 [Buildroot] [PATCH v1 0/2] Raspberry Pi 4 - mesa3d support Peter Seiderer
@ 2020-02-04 14:44 ` Peter Seiderer
  2020-02-04 20:55   ` Yann E. MORIN
  2020-02-04 14:44 ` [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text Peter Seiderer
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Seiderer @ 2020-02-04 14:44 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/mesa3d/Config.in | 12 ++++++++++++
 package/mesa3d/mesa3d.mk |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 5929e15442..1351d1cd97 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -224,6 +224,18 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA
 	help
 	  Adds support for Nvidia Tegra GPUs, requires nouveau.
 
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D
+	bool "Gallium v3d driver"
+	depends on BR2_arm || BR2_aarch64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
+	select BR2_PACKAGE_LIBDRM_VC4
+	select BR2_PACKAGE_MESA3D_OPENGL_EGL
+	help
+	  Driver for Broadcom VC6 (rpi4) GPUs (needs kmsro and vc4).
+	  It requires a recent enough mainline/raspberrypi kernel with
+	  drm v3d (CONFIG_DRM_V3D, CONFIG_DRM_VC4) support enabled.
+
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
 	bool "Gallium vc4 driver"
 	depends on BR2_arm || BR2_aarch64
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index c7e5be55a0..1a18cf3c58 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -84,6 +84,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA)     += svga
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST)   += swrast
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA)    += tegra
+MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D)      += v3d
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4)      += vc4
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL)    += virgl
 # DRI Drivers
@@ -162,6 +163,8 @@ endif
 MESA3D_PLATFORMS = surfaceless
 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
 MESA3D_PLATFORMS += drm
+else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D),y)
+MESA3D_PLATFORMS += drm
 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
 MESA3D_PLATFORMS += drm
 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
-- 
2.25.0

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

* [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text
  2020-02-04 14:44 [Buildroot] [PATCH v1 0/2] Raspberry Pi 4 - mesa3d support Peter Seiderer
  2020-02-04 14:44 ` [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support Peter Seiderer
@ 2020-02-04 14:44 ` Peter Seiderer
  2020-02-04 21:03   ` Yann E. MORIN
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Seiderer @ 2020-02-04 14:44 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/mesa3d/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 1351d1cd97..9389a6132e 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -244,8 +244,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
 	select BR2_PACKAGE_LIBDRM_VC4
 	select BR2_PACKAGE_MESA3D_OPENGL_EGL
 	help
-	  Driver for Broadcom VC4 (rpi2/3) GPUs.
-	  It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
+	  Driver for Broadcom VC4 (rpi2/3/4) GPUs (needs kmsro).
+	  It requires a recent enough mainline/raspberrypi kernel with
+	  drm vc4 (CONFIG_DRM_VC4) support enabled, for rpi4 additional
+	  v3d support is required.
 
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
 	bool "Gallium virgl driver"
-- 
2.25.0

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

* [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support
  2020-02-04 14:44 ` [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support Peter Seiderer
@ 2020-02-04 20:55   ` Yann E. MORIN
       [not found]     ` <20200204224540.23f620c0@gmx.net>
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2020-02-04 20:55 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Applied to master, thanks. I did a few tweaks to the help text,though,
see below...

> ---
>  package/mesa3d/Config.in | 12 ++++++++++++
>  package/mesa3d/mesa3d.mk |  3 +++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index 5929e15442..1351d1cd97 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -224,6 +224,18 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA
>  	help
>  	  Adds support for Nvidia Tegra GPUs, requires nouveau.
>  
> +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D
> +	bool "Gallium v3d driver"
> +	depends on BR2_arm || BR2_aarch64
> +	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> +	select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
> +	select BR2_PACKAGE_LIBDRM_VC4
> +	select BR2_PACKAGE_MESA3D_OPENGL_EGL
> +	help
> +	  Driver for Broadcom VC6 (rpi4) GPUs (needs kmsro and vc4).

I don't understand why you added that '(needs kmsro and vc4)': the
corresponding config entries are properly selected above, and thus
this part of the help text is of no use for the user, and tend to in
fact be very confusing. But since this is the same mess with the other
options around, I left it. It would be nice to clean them away, though.

> +	  It requires a recent enough mainline/raspberrypi kernel with
> +	  drm v3d (CONFIG_DRM_V3D, CONFIG_DRM_VC4) support enabled.

"recent enough" is of no use to the user: some woudl consider 4.0 to be
recent, some would consider 5.0 to be old. Sol I replaced that with the
exact version v3d was merged in mainline linux, that is 4.18.

Regards,
Yann E. MORIN.

> +
>  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
>  	bool "Gallium vc4 driver"
>  	depends on BR2_arm || BR2_aarch64
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> index c7e5be55a0..1a18cf3c58 100644
> --- a/package/mesa3d/mesa3d.mk
> +++ b/package/mesa3d/mesa3d.mk
> @@ -84,6 +84,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
>  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA)     += svga
>  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST)   += swrast
>  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA)    += tegra
> +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D)      += v3d
>  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4)      += vc4
>  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL)    += virgl
>  # DRI Drivers
> @@ -162,6 +163,8 @@ endif
>  MESA3D_PLATFORMS = surfaceless
>  ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
>  MESA3D_PLATFORMS += drm
> +else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D),y)
> +MESA3D_PLATFORMS += drm
>  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
>  MESA3D_PLATFORMS += drm
>  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
> -- 
> 2.25.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text
  2020-02-04 14:44 ` [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text Peter Seiderer
@ 2020-02-04 21:03   ` Yann E. MORIN
  2020-02-04 21:55     ` Peter Seiderer
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2020-02-04 21:03 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  package/mesa3d/Config.in | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index 1351d1cd97..9389a6132e 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -244,8 +244,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
>  	select BR2_PACKAGE_LIBDRM_VC4
>  	select BR2_PACKAGE_MESA3D_OPENGL_EGL
>  	help
> -	  Driver for Broadcom VC4 (rpi2/3) GPUs.
> -	  It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
> +	  Driver for Broadcom VC4 (rpi2/3/4) GPUs (needs kmsro).
> +	  It requires a recent enough mainline/raspberrypi kernel with
> +	  drm vc4 (CONFIG_DRM_VC4) support enabled, for rpi4 additional
> +	  v3d support is required.

This is all very confusing...

First, you add rpi4 as supported by the vc4 driver, but the v3d driver
is also supposed to cover the rpi4. Are both needed? Is the v3d driver
a supperset, a subset, a complement to vc4? If so, why doesn't the v3d
driver select the vc4 driver (although it selects the vc4 drm backend)?
Or is it possible to use just the vc4 driver on rpi4?

Then, you drop the 4.5+ version with this hazy "recent enough"
categorisation. For the same reason as I explained in the previous
patch, this is not nice.

So, please explain in the commit log what is going on here...

In the meantime, I marked the patch as rejected in patchwork.

Regards,
Yann E. MORIN.

>  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
>  	bool "Gallium virgl driver"
> -- 
> 2.25.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text
  2020-02-04 21:03   ` Yann E. MORIN
@ 2020-02-04 21:55     ` Peter Seiderer
  2020-02-05  9:37       ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Seiderer @ 2020-02-04 21:55 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Tue, 4 Feb 2020 22:03:00 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
>
> On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> >  package/mesa3d/Config.in | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> > index 1351d1cd97..9389a6132e 100644
> > --- a/package/mesa3d/Config.in
> > +++ b/package/mesa3d/Config.in
> > @@ -244,8 +244,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
> >  	select BR2_PACKAGE_LIBDRM_VC4
> >  	select BR2_PACKAGE_MESA3D_OPENGL_EGL
> >  	help
> > -	  Driver for Broadcom VC4 (rpi2/3) GPUs.
> > -	  It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
> > +	  Driver for Broadcom VC4 (rpi2/3/4) GPUs (needs kmsro).
> > +	  It requires a recent enough mainline/raspberrypi kernel with
> > +	  drm vc4 (CONFIG_DRM_VC4) support enabled, for rpi4 additional
> > +	  v3d support is required.
>
> This is all very confusing...

I wanted to emphasize that no longer a vanilla/mainlain kernel is needed
as the official raspberry provided one gained the DRM VC4 support...

>
> First, you add rpi4 as supported by the vc4 driver, but the v3d driver

Not exactly supported, but needed for the rpi4 case...

> is also supposed to cover the rpi4. Are both needed? Is the v3d driver
> a supperset, a subset, a complement to vc4? If so, why doesn't the v3d
> driver select the vc4 driver (although it selects the vc4 drm backend)?

Because no one of the selecting BR2_PACKAGE_MESA3D_GALLIUM_KMSRO drivers
selects BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO...

> Or is it possible to use just the vc4 driver on rpi4?

For the RPi3 the vc4 (and kmsro) is sufficient, for the RPi4 all three
(v3d, vc4, kmsro) are needed...

Did not test if mesa3d-v3d compiles without libdrm vc4 (but checked it links
the same way against libdrm as mesa3d-vc4)...

>
> Then, you drop the 4.5+ version with this hazy "recent enough"
> categorisation. For the same reason as I explained in the previous
> patch, this is not nice.
>
> So, please explain in the commit log what is going on here...
>
> In the meantime, I marked the patch as rejected in patchwork.

Will try to come up with an better commit log...

Regards,
Peter

>
> Regards,
> Yann E. MORIN.
>
> >  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
> >  	bool "Gallium virgl driver"
> > --
> > 2.25.0
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>

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

* [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support
       [not found]     ` <20200204224540.23f620c0@gmx.net>
@ 2020-02-04 22:00       ` Peter Seiderer
  2020-02-04 22:14         ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Seiderer @ 2020-02-04 22:00 UTC (permalink / raw)
  To: buildroot

...hit the wrong button, so re-add CC: buildroot at busybox.net, Bernd Kuhls <bernd.kuhls@t-online.de>, Romain Naour <romain.naour@gmail.com>

On Tue, 4 Feb 2020 22:45:40 +0100, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Yann,
>
> On Tue, 4 Feb 2020 21:55:16 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
>
> > Peter, All,
> >
> > On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> >
> > Applied to master, thanks. I did a few tweaks to the help text,though,
> > see below...
> >
> > > ---
> > >  package/mesa3d/Config.in | 12 ++++++++++++
> > >  package/mesa3d/mesa3d.mk |  3 +++
> > >  2 files changed, 15 insertions(+)
> > >
> > > diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> > > index 5929e15442..1351d1cd97 100644
> > > --- a/package/mesa3d/Config.in
> > > +++ b/package/mesa3d/Config.in
> > > @@ -224,6 +224,18 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA
> > >  	help
> > >  	  Adds support for Nvidia Tegra GPUs, requires nouveau.
> > >
> > > +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D
> > > +	bool "Gallium v3d driver"
> > > +	depends on BR2_arm || BR2_aarch64
> > > +	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> > > +	select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
> > > +	select )
> > > +	select BR2_PACKAGE_MESA3D_OPENGL_EGL
> > > +	help
> > > +	  Driver for Broadcom VC6 (rpi4) GPUs (needs kmsro and vc4).
> >
> > I don't understand why you added that '(needs kmsro and vc4)': the
> > corresponding config entries are properly selected above, and thus
> > this part of the help text is of no use for the user, and tend to in
>
> kmsro/vc4 would mean BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO (not mixed up
> with the selected BR2_PACKAGE_MESA3D_GALLIUM_KMSRO) and
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 (not mixed up with the selected
> BR2_PACKAGE_LIBDRM_VC4)...and all three mesa3d options (v3d, vc4, kmsro)
> are needed to get a functional RPi4-64bit graphic output (see e.g. [1]:
> The VC4 interface is via /dev/drm/card1. The V3D interface is via /dev/drm/card0.
> All drawing commands go to V3D (aka card0). All screen resolution and configuration
> commands go to VC4 (aka card1))...
>
> > fact be very confusing. But since this is the same mess with the other
> > options around, I left it. It would be nice to clean them away, though.
> >
> > > +	  It requires a recent enough mainline/raspberrypi kernel with
> > > +	  drm v3d (CONFIG_DRM_V3D, CONFIG_DRM_VC4) support enabled.
> >
> > "recent enough" is of no use to the user: some woudl consider 4.0 to be
> > recent, some would consider 5.0 to be old. Sol I replaced that with the
> > exact version v3d was merged in mainline linux, that is 4.18.
>
> Thanks for looking up at which kernel version CONFIG_DRM_V3D was added...,
> wanted to emphasize that both mainline and raspberrypi linux kernel
> are supported (some years ago only the mainline kernel supported DRM_VC4
> and/or 64-bit Rpi)...
>
> Regards,
> Peter
>
> [1] https://forum.qt.io/topic/107764/drm-kms-configuration-for-raspberry-pi-4
>
> >
> > Regards,
> > Yann E. MORIN.
> >
> > > +
> > >  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
> > >  	bool "Gallium vc4 driver"
> > >  	depends on BR2_arm || BR2_aarch64
> > > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> > > index c7e5be55a0..1a18cf3c58 100644
> > > --- a/package/mesa3d/mesa3d.mk
> > > +++ b/package/mesa3d/mesa3d.mk
> > > @@ -84,6 +84,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
> > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA)     += svga
> > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST)   += swrast
> > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA)    += tegra
> > > +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D)      += v3d
> > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4)      += vc4
> > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL)    += virgl
> > >  # DRI Drivers
> > > @@ -162,6 +163,8 @@ endif
> > >  MESA3D_PLATFORMS = surfaceless
> > >  ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
> > >  MESA3D_PLATFORMS += drm
> > > +else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D),y)
> > > +MESA3D_PLATFORMS += drm
> > >  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
> > >  MESA3D_PLATFORMS += drm
> > >  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
> > > --
> > > 2.25.0
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/buildroot
> >
>

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

* [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support
  2020-02-04 22:00       ` Peter Seiderer
@ 2020-02-04 22:14         ` Yann E. MORIN
  2020-02-04 22:40           ` Peter Seiderer
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2020-02-04 22:14 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2020-02-04 23:00 +0100, Peter Seiderer spake thusly:
> On Tue, 4 Feb 2020 22:45:40 +0100, Peter Seiderer <ps.report@gmx.net> wrote:
> > On Tue, 4 Feb 2020 21:55:16 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > > On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> > > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[--SNIP--]
> > > > +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D
> > > > +	bool "Gallium v3d driver"
> > > > +	depends on BR2_arm || BR2_aarch64
> > > > +	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> > > > +	select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
> > > > +	select )
> > > > +	select BR2_PACKAGE_MESA3D_OPENGL_EGL
> > > > +	help
> > > > +	  Driver for Broadcom VC6 (rpi4) GPUs (needs kmsro and vc4).
> > >
> > > I don't understand why you added that '(needs kmsro and vc4)': the
> > > corresponding config entries are properly selected above, and thus
> > > this part of the help text is of no use for the user, and tend to in
> >
> > kmsro/vc4 would mean BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO (not mixed up
> > with the selected BR2_PACKAGE_MESA3D_GALLIUM_KMSRO) and
> > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 (not mixed up with the selected
> > BR2_PACKAGE_LIBDRM_VC4)...and all three mesa3d options (v3d, vc4, kmsro)
> > are needed to get a functional RPi4-64bit graphic output (see e.g. [1]:
> > The VC4 interface is via /dev/drm/card1. The V3D interface is via /dev/drm/card0.
> > All drawing commands go to V3D (aka card0). All screen resolution and configuration
> > commands go to VC4 (aka card1))...

Slo it means the code you provided is not complete! Why do you not
select the requried options?

    select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO
    select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4

We don't want to let the user resolve the dependencies manually. This is
what the config options are for.

Currently, with the code you provided, this means that the following
defconfig would not generate a mesa3d that provperly supports the rpi4
(if I understood things correctly):

    BR2_arm=y
    BR2_cortex_a7=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_INIT_NONE=y
    BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
    BR2_SYSTEM_BIN_SH_NONE=y
    # BR2_PACKAGE_BUSYBOX is not set
    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
    # BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
    # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
    # BR2_TARGET_ROOTFS_TAR is not set

This is definitely not nice at all... :-(

Could you please fix that up?

Regards,
Yann E. MORIN.

> > > fact be very confusing. But since this is the same mess with the other
> > > options around, I left it. It would be nice to clean them away, though.
> > >
> > > > +	  It requires a recent enough mainline/raspberrypi kernel with
> > > > +	  drm v3d (CONFIG_DRM_V3D, CONFIG_DRM_VC4) support enabled.
> > >
> > > "recent enough" is of no use to the user: some woudl consider 4.0 to be
> > > recent, some would consider 5.0 to be old. Sol I replaced that with the
> > > exact version v3d was merged in mainline linux, that is 4.18.
> >
> > Thanks for looking up at which kernel version CONFIG_DRM_V3D was added...,
> > wanted to emphasize that both mainline and raspberrypi linux kernel
> > are supported (some years ago only the mainline kernel supported DRM_VC4
> > and/or 64-bit Rpi)...
> >
> > Regards,
> > Peter
> >
> > [1] https://forum.qt.io/topic/107764/drm-kms-configuration-for-raspberry-pi-4
> >
> > >
> > > Regards,
> > > Yann E. MORIN.
> > >
> > > > +
> > > >  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
> > > >  	bool "Gallium vc4 driver"
> > > >  	depends on BR2_arm || BR2_aarch64
> > > > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> > > > index c7e5be55a0..1a18cf3c58 100644
> > > > --- a/package/mesa3d/mesa3d.mk
> > > > +++ b/package/mesa3d/mesa3d.mk
> > > > @@ -84,6 +84,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
> > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA)     += svga
> > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST)   += swrast
> > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA)    += tegra
> > > > +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D)      += v3d
> > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4)      += vc4
> > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL)    += virgl
> > > >  # DRI Drivers
> > > > @@ -162,6 +163,8 @@ endif
> > > >  MESA3D_PLATFORMS = surfaceless
> > > >  ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
> > > >  MESA3D_PLATFORMS += drm
> > > > +else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D),y)
> > > > +MESA3D_PLATFORMS += drm
> > > >  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
> > > >  MESA3D_PLATFORMS += drm
> > > >  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
> > > > --
> > > > 2.25.0
> > > >
> > > > _______________________________________________
> > > > buildroot mailing list
> > > > buildroot at busybox.net
> > > > http://lists.busybox.net/mailman/listinfo/buildroot
> > >
> >
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support
  2020-02-04 22:14         ` Yann E. MORIN
@ 2020-02-04 22:40           ` Peter Seiderer
  2020-02-05  9:30             ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Seiderer @ 2020-02-04 22:40 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Tue, 4 Feb 2020 23:14:27 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
>
> On 2020-02-04 23:00 +0100, Peter Seiderer spake thusly:
> > On Tue, 4 Feb 2020 22:45:40 +0100, Peter Seiderer <ps.report@gmx.net> wrote:
> > > On Tue, 4 Feb 2020 21:55:16 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > > > On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> > > > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> [--SNIP--]
> > > > > +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D
> > > > > +	bool "Gallium v3d driver"
> > > > > +	depends on BR2_arm || BR2_aarch64
> > > > > +	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> > > > > +	select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
> > > > > +	select )
> > > > > +	select BR2_PACKAGE_MESA3D_OPENGL_EGL
> > > > > +	help
> > > > > +	  Driver for Broadcom VC6 (rpi4) GPUs (needs kmsro and vc4).
> > > >
> > > > I don't understand why you added that '(needs kmsro and vc4)': the
> > > > corresponding config entries are properly selected above, and thus
> > > > this part of the help text is of no use for the user, and tend to in
> > >
> > > kmsro/vc4 would mean BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO (not mixed up
> > > with the selected BR2_PACKAGE_MESA3D_GALLIUM_KMSRO) and
> > > BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 (not mixed up with the selected
> > > BR2_PACKAGE_LIBDRM_VC4)...and all three mesa3d options (v3d, vc4, kmsro)
> > > are needed to get a functional RPi4-64bit graphic output (see e.g. [1]:
> > > The VC4 interface is via /dev/drm/card1. The V3D interface is via /dev/drm/card0.
> > > All drawing commands go to V3D (aka card0). All screen resolution and configuration
> > > commands go to VC4 (aka card1))...
>
> Slo it means the code you provided is not complete! Why do you not
> select the requried options?
>
>     select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO

Because none of the other drivers does so...

>     select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4

Because I do not know if all use-cases need a mesa3d-vc4 driver
(my use case definitely ;-) )...

>
> We don't want to let the user resolve the dependencies manually. This is
> what the config options are for.

All freedom for the empowered users ;-)

>
> Currently, with the code you provided, this means that the following
> defconfig would not generate a mesa3d that provperly supports the rpi4
> (if I understood things correctly):
>
>     BR2_arm=y
>     BR2_cortex_a7=y
>     BR2_TOOLCHAIN_EXTERNAL=y
>     BR2_INIT_NONE=y
>     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
>     BR2_SYSTEM_BIN_SH_NONE=y
>     # BR2_PACKAGE_BUSYBOX is not set
>     BR2_PACKAGE_MESA3D=y
>     BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
>     # BR2_PACKAGE_EUDEV_ENABLE_HWDB is not set
>     # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
>     # BR2_TARGET_ROOTFS_TAR is not set

Yes...

>
> This is definitely not nice at all... :-(

Yes, not all possible buildroot configs lead to an usable system...
My reasoning was that the help text hint should be enough...

Regards,
Peter

>
> Could you please fix that up?
>
> Regards,
> Yann E. MORIN.
>
> > > > fact be very confusing. But since this is the same mess with the other
> > > > options around, I left it. It would be nice to clean them away, though.
> > > >
> > > > > +	  It requires a recent enough mainline/raspberrypi kernel with
> > > > > +	  drm v3d (CONFIG_DRM_V3D, CONFIG_DRM_VC4) support enabled.
> > > >
> > > > "recent enough" is of no use to the user: some woudl consider 4.0 to be
> > > > recent, some would consider 5.0 to be old. Sol I replaced that with the
> > > > exact version v3d was merged in mainline linux, that is 4.18.
> > >
> > > Thanks for looking up at which kernel version CONFIG_DRM_V3D was added...,
> > > wanted to emphasize that both mainline and raspberrypi linux kernel
> > > are supported (some years ago only the mainline kernel supported DRM_VC4
> > > and/or 64-bit Rpi)...
> > >
> > > Regards,
> > > Peter
> > >
> > > [1] https://forum.qt.io/topic/107764/drm-kms-configuration-for-raspberry-pi-4
> > >
> > > >
> > > > Regards,
> > > > Yann E. MORIN.
> > > >
> > > > > +
> > > > >  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
> > > > >  	bool "Gallium vc4 driver"
> > > > >  	depends on BR2_arm || BR2_aarch64
> > > > > diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> > > > > index c7e5be55a0..1a18cf3c58 100644
> > > > > --- a/package/mesa3d/mesa3d.mk
> > > > > +++ b/package/mesa3d/mesa3d.mk
> > > > > @@ -84,6 +84,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
> > > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA)     += svga
> > > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST)   += swrast
> > > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA)    += tegra
> > > > > +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D)      += v3d
> > > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4)      += vc4
> > > > >  MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL)    += virgl
> > > > >  # DRI Drivers
> > > > > @@ -162,6 +163,8 @@ endif
> > > > >  MESA3D_PLATFORMS = surfaceless
> > > > >  ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
> > > > >  MESA3D_PLATFORMS += drm
> > > > > +else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D),y)
> > > > > +MESA3D_PLATFORMS += drm
> > > > >  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
> > > > >  MESA3D_PLATFORMS += drm
> > > > >  else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
> > > > > --
> > > > > 2.25.0
> > > > >
> > > > > _______________________________________________
> > > > > buildroot mailing list
> > > > > buildroot at busybox.net
> > > > > http://lists.busybox.net/mailman/listinfo/buildroot
> > > >
> > >
> >
>

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

* [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support
  2020-02-04 22:40           ` Peter Seiderer
@ 2020-02-05  9:30             ` Yann E. MORIN
  0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2020-02-05  9:30 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2020-02-04 23:40 +0100, Peter Seiderer spake thusly:
> On Tue, 4 Feb 2020 23:14:27 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > Slo it means the code you provided is not complete! Why do you not
> > select the requried options?
> >     select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO
> Because none of the other drivers does so...

So they too are broken? That is still not good at all.. :-(

> >     select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
> Because I do not know if all use-cases need a mesa3d-vc4 driver
> (my use case definitely ;-) )...

So, if all you could test is that situation, then just catter for it.
Users that would be interested for a more fine-grained choice and are
able to test it will send further patches.

> > We don't want to let the user resolve the dependencies manually. This is
> > what the config options are for.
> All freedom for the empowered users ;-)

But we do not even have a way to know whtehr this is a valid situation
or not. We do not want to generate broken configuration when we know
that they are broken.

And if it is indeed not needed, then there is no reason to say so in the
help text either.

Either something is needed, and we select it via config symbols, and it
is not needed to say so in the help text, or they are not needed, and
then we don;t need to say so in the help text.

The current situation is very confusing.

[--SNIP--]
> > This is definitely not nice at all... :-(
> Yes, not all possible buildroot configs lead to an usable system...
> My reasoning was that the help text hint should be enough...

I disagree.

Could you please send further patches that drop the '(need stuff)' from
the help text and replace them with 'select' to the appropriate options,
please?

Overall, we also discussed that mesa3d package during the deve-days in
Brussels, and we really find that this is a bit of a mess currently...
This package has evolved organically over the years, so the current
situation is not totally unexpected, but still, it may benefit from a
new round of refactoring... (hint, hint)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text
  2020-02-04 21:55     ` Peter Seiderer
@ 2020-02-05  9:37       ` Yann E. MORIN
  0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2020-02-05  9:37 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2020-02-04 22:55 +0100, Peter Seiderer spake thusly:
> On Tue, 4 Feb 2020 22:03:00 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> >
> > On 2020-02-04 15:44 +0100, Peter Seiderer spake thusly:
> > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > ---
> > >  package/mesa3d/Config.in | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> > > index 1351d1cd97..9389a6132e 100644
> > > --- a/package/mesa3d/Config.in
> > > +++ b/package/mesa3d/Config.in
> > > @@ -244,8 +244,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
> > >  	select BR2_PACKAGE_LIBDRM_VC4
> > >  	select BR2_PACKAGE_MESA3D_OPENGL_EGL
> > >  	help
> > > -	  Driver for Broadcom VC4 (rpi2/3) GPUs.
> > > -	  It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
> > > +	  Driver for Broadcom VC4 (rpi2/3/4) GPUs (needs kmsro).
> > > +	  It requires a recent enough mainline/raspberrypi kernel with
> > > +	  drm vc4 (CONFIG_DRM_VC4) support enabled, for rpi4 additional
> > > +	  v3d support is required.
> >
> > This is all very confusing...
> I wanted to emphasize that no longer a vanilla/mainlain kernel is needed
> as the official raspberry provided one gained the DRM VC4 support...

The problem is not about the mainline vs. fork distinction, but about
dropping the exact version for a hazy definition.

> > First, you add rpi4 as supported by the vc4 driver, but the v3d driver
> Not exactly supported, but needed for the rpi4 case...

See my other reply, this goes along the same lines.

> > is also supposed to cover the rpi4. Are both needed? Is the v3d driver
> > a supperset, a subset, a complement to vc4? If so, why doesn't the v3d
> > driver select the vc4 driver (although it selects the vc4 drm backend)?
> Because no one of the selecting BR2_PACKAGE_MESA3D_GALLIUM_KMSRO drivers
> selects BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO...

s I already said:: if you say 'need foo', then you must select foo
instead. Otherwise, it means 'foo' is not really needed.

> > Or is it possible to use just the vc4 driver on rpi4?
> For the RPi3 the vc4 (and kmsro) is sufficient, for the RPi4 all three
> (v3d, vc4, kmsro) are needed...

Then select everything that is needed.

> Did not test if mesa3d-v3d compiles without libdrm vc4 (but checked it links
> the same way against libdrm as mesa3d-vc4)...

Note that, as you said, there are two symbols about vc4: the libdrm
option (which you correctly select from the mesa3d v3d driver (yes,
v3d)), and the mesa3d v4c driver, which you say is needed, but not
selected.

> Will try to come up with an better commit log...

Thanks.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2020-02-05  9:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 14:44 [Buildroot] [PATCH v1 0/2] Raspberry Pi 4 - mesa3d support Peter Seiderer
2020-02-04 14:44 ` [Buildroot] [PATCH v1 1/2] package/mesa3d: add v3d driver support Peter Seiderer
2020-02-04 20:55   ` Yann E. MORIN
     [not found]     ` <20200204224540.23f620c0@gmx.net>
2020-02-04 22:00       ` Peter Seiderer
2020-02-04 22:14         ` Yann E. MORIN
2020-02-04 22:40           ` Peter Seiderer
2020-02-05  9:30             ` Yann E. MORIN
2020-02-04 14:44 ` [Buildroot] [PATCH v1 2/2] package/mesa3d: update vc4 help text Peter Seiderer
2020-02-04 21:03   ` Yann E. MORIN
2020-02-04 21:55     ` Peter Seiderer
2020-02-05  9:37       ` Yann E. MORIN

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.