All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
@ 2021-10-14 21:36 Giulio Benetti
  2021-10-14 22:11 ` Giulio Benetti
  2022-01-08 20:57 ` [Buildroot] [PATCH] " Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Giulio Benetti @ 2021-10-14 21:36 UTC (permalink / raw)
  To: buildroot; +Cc: Luca Ceresoli, Giulio Benetti

Since on olinuxino_lime/lime2 we have a Linux version >= 4.20 we need to
pass drm_kms_helper.drm_leak_fbdev_smem=1 to kernel command-line that
really enables DRM_FBDEV_LEAK_PHYS_SMEM. CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
only adds the code for this, but drm_leak_fbdev_smem is 0 by default, so we
need to override it. This fixes both olimex_a20_olinuxino_lime and lime2
that use extlinux.conf.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 .../a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf b/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
index f754da3623..25ee0c349c 100644
--- a/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
+++ b/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
@@ -1,4 +1,4 @@
 label Olinuxino
     kernel /boot/zImage
     fdtdir /boot
-    append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
+    append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 drm_kms_helper.drm_leak_fbdev_smem=1 ${extra}
-- 
2.25.1

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

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

* Re: [Buildroot] [PATCH] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-14 21:36 [Buildroot] [PATCH] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20 Giulio Benetti
@ 2021-10-14 22:11 ` Giulio Benetti
  2021-10-15  8:15   ` [Buildroot] [PATCH v2] " Giulio Benetti
  2022-01-08 20:57 ` [Buildroot] [PATCH] " Thomas Petazzoni
  1 sibling, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2021-10-14 22:11 UTC (permalink / raw)
  To: buildroot; +Cc: Luca Ceresoli

On 10/14/21 11:36 PM, Giulio Benetti wrote:
> Since on olinuxino_lime/lime2 we have a Linux version >= 4.20 we need to
> pass drm_kms_helper.drm_leak_fbdev_smem=1 to kernel command-line that
> really enables DRM_FBDEV_LEAK_PHYS_SMEM. CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
> only adds the code for this, but drm_leak_fbdev_smem is 0 by default, so we
> need to override it. This fixes both olimex_a20_olinuxino_lime and lime2
> that use extlinux.conf.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>   .../a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf    | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf b/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
> index f754da3623..25ee0c349c 100644
> --- a/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
> +++ b/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
> @@ -1,4 +1,4 @@
>   label Olinuxino
>       kernel /boot/zImage
>       fdtdir /boot
> -    append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
> +    append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 drm_kms_helper.drm_leak_fbdev_smem=1 ${extra}
> 

This lacks drm_kms_helper.drm_fbdev_overalloc=200 too at least. I'm 
going to send a v2 for this.

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

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

* [Buildroot] [PATCH v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-14 22:11 ` Giulio Benetti
@ 2021-10-15  8:15   ` Giulio Benetti
  2021-10-18 19:45     ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2021-10-15  8:15 UTC (permalink / raw)
  To: buildroot; +Cc: Luca Ceresoli, Giulio Benetti

Since on olinuxino_lime/lime2 we have a Linux version >= 4.20 we need to
pass drm_kms_helper.drm_leak_fbdev_smem=1 to kernel command-line that
really enables DRM_FBDEV_LEAK_PHYS_SMEM. CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
only adds the code for this, but drm_leak_fbdev_smem is 0 by default, so we
need to override it with 1. Same goes for drm_fbdev_overalloc that
must be at least 200 for having a double buffer that is required by
Mali. This fixes both olimex_a20_olinuxino_lime and lime2 that use
extlinux.conf.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
V1->V2:
* add double buffer setting too
---
 .../a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf b/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
index f754da3623..358bda056b 100644
--- a/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
+++ b/board/olimex/a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf
@@ -1,4 +1,4 @@
 label Olinuxino
     kernel /boot/zImage
     fdtdir /boot
-    append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
+    append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 drm_kms_helper.drm_leak_fbdev_smem=1 drm_kms_helper.drm_fbdev_overalloc=200 ${extra}
-- 
2.25.1

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

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

* Re: [Buildroot] [PATCH v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-15  8:15   ` [Buildroot] [PATCH v2] " Giulio Benetti
@ 2021-10-18 19:45     ` Thomas Petazzoni
  2021-10-18 19:59       ` Giulio Benetti
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2021-10-18 19:45 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Luca Ceresoli, buildroot

On Fri, 15 Oct 2021 10:15:14 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Since on olinuxino_lime/lime2 we have a Linux version >= 4.20 we need to
> pass drm_kms_helper.drm_leak_fbdev_smem=1 to kernel command-line that
> really enables DRM_FBDEV_LEAK_PHYS_SMEM. CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
> only adds the code for this, but drm_leak_fbdev_smem is 0 by default, so we
> need to override it with 1. Same goes for drm_fbdev_overalloc that
> must be at least 200 for having a double buffer that is required by
> Mali. This fixes both olimex_a20_olinuxino_lime and lime2 that use
> extlinux.conf.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

I appreciate the idea, but I'm not sure if we want this. Indeed, the
A20 Olinuxino defconfigs are meant to be minimal, and there's nothing
that forces anyone to use the proprietary Mali driver+blob, they can
also use mesa3d instead, which might have different requirements.

So I'm rather keen on enabling your patch on
sunxi-mali-mainline-driver/Config.in, but not this one I'm afraid.

Of course, if others disagree, I can change my mind :)

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-18 19:45     ` Thomas Petazzoni
@ 2021-10-18 19:59       ` Giulio Benetti
  2021-10-18 21:40         ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2021-10-18 19:59 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Luca Ceresoli, buildroot

Hi Thomas,

> Il giorno 18 ott 2021, alle ore 21:45, Thomas Petazzoni <thomas.petazzoni@bootlin.com> ha scritto:
> 
> On Fri, 15 Oct 2021 10:15:14 +0200
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> Since on olinuxino_lime/lime2 we have a Linux version >= 4.20 we need to
>> pass drm_kms_helper.drm_leak_fbdev_smem=1 to kernel command-line that
>> really enables DRM_FBDEV_LEAK_PHYS_SMEM. CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
>> only adds the code for this, but drm_leak_fbdev_smem is 0 by default, so we
>> need to override it with 1. Same goes for drm_fbdev_overalloc that
>> must be at least 200 for having a double buffer that is required by
>> Mali. This fixes both olimex_a20_olinuxino_lime and lime2 that use
>> extlinux.conf.
>> 
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> 
> I appreciate the idea, but I'm not sure if we want this. Indeed, the
> A20 Olinuxino defconfigs are meant to be minimal, and there's nothing
> that forces anyone to use the proprietary Mali driver+blob, they can
> also use mesa3d instead, which might have different requirements.

They instead enable specifically sunxi-mali-mainline* in lime and lime2 defconfigs.
So at the moment sunxi-mali-mainline is built but it can’t work and it doesn’t make sense.
Also up to Linux 4.20 this neither worked because of lack of double buffer. So basically here sunxi-mali-mainline I’m pretty sure never worked.

Lime and Lime2 both use this extlinux.conf and they are the only ones.

The other way is to remove sunxi-mali-mainline from Lime and Lime2 that is a possible idea.
Let me know what you prefer.

Kind regards
Giulio Benetti

> 
> So I'm rather keen on enabling your patch on
> sunxi-mali-mainline-driver/Config.in, but not this one I'm afraid.
> 
> Of course, if others disagree, I can change my mind :)
> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

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

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

* Re: [Buildroot] [PATCH v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-18 19:59       ` Giulio Benetti
@ 2021-10-18 21:40         ` Thomas Petazzoni
  2022-01-08 16:29           ` Giulio Benetti
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2021-10-18 21:40 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Luca Ceresoli, buildroot

On Mon, 18 Oct 2021 21:59:41 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> They instead enable specifically sunxi-mali-mainline* in lime and
> lime2 defconfigs. So at the moment sunxi-mali-mainline is built but
> it can’t work and it doesn’t make sense. Also up to Linux 4.20 this
> neither worked because of lack of double buffer. So basically here
> sunxi-mali-mainline I’m pretty sure never worked.

Aah, I hadn't realized/verified that they enabled sunxi-mali-mainline*.
In this case, obviously your patch makes sense. I've switched it back
to "New" in patchwork.

Thanks for the additional explanation!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-18 21:40         ` Thomas Petazzoni
@ 2022-01-08 16:29           ` Giulio Benetti
  0 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2022-01-08 16:29 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Luca Ceresoli, buildroot

On 18/10/21 23:40, Thomas Petazzoni wrote:
> On Mon, 18 Oct 2021 21:59:41 +0200
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> They instead enable specifically sunxi-mali-mainline* in lime and
>> lime2 defconfigs. So at the moment sunxi-mali-mainline is built but
>> it can’t work and it doesn’t make sense. Also up to Linux 4.20 this
>> neither worked because of lack of double buffer. So basically here
>> sunxi-mali-mainline I’m pretty sure never worked.
> 
> Aah, I hadn't realized/verified that they enabled sunxi-mali-mainline*.
> In this case, obviously your patch makes sense. I've switched it back
> to "New" in patchwork.
> 
> Thanks for the additional explanation!
> 
> Thomas
> 

Ping. This is still needed for having Mali working with other applied 
patches:
https://patchwork.ozlabs.org/project/buildroot/list/?series=270656&state=*

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

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

* Re: [Buildroot] [PATCH] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20
  2021-10-14 21:36 [Buildroot] [PATCH] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20 Giulio Benetti
  2021-10-14 22:11 ` Giulio Benetti
@ 2022-01-08 20:57 ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2022-01-08 20:57 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Luca Ceresoli, buildroot

On Thu, 14 Oct 2021 23:36:30 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Since on olinuxino_lime/lime2 we have a Linux version >= 4.20 we need to
> pass drm_kms_helper.drm_leak_fbdev_smem=1 to kernel command-line that
> really enables DRM_FBDEV_LEAK_PHYS_SMEM. CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM
> only adds the code for this, but drm_leak_fbdev_smem is 0 by default, so we
> need to override it. This fixes both olimex_a20_olinuxino_lime and lime2
> that use extlinux.conf.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  .../a20_olinuxino/rootfs_overlay/boot/extlinux/extlinux.conf    | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-01-08 20:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 21:36 [Buildroot] [PATCH] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20 Giulio Benetti
2021-10-14 22:11 ` Giulio Benetti
2021-10-15  8:15   ` [Buildroot] [PATCH v2] " Giulio Benetti
2021-10-18 19:45     ` Thomas Petazzoni
2021-10-18 19:59       ` Giulio Benetti
2021-10-18 21:40         ` Thomas Petazzoni
2022-01-08 16:29           ` Giulio Benetti
2022-01-08 20:57 ` [Buildroot] [PATCH] " Thomas Petazzoni

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.