diff mbox series

[v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20

Message ID 20211015081514.2472764-1-giulio.benetti@benettiengineering.com
State Accepted
Headers show
Series [v2] configs/olimex_a20_olinuxino: fix mali not working because Linux version >= 4.20 | expand

Commit Message

Giulio Benetti Oct. 15, 2021, 8:15 a.m. UTC
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(-)

Comments

Thomas Petazzoni Oct. 18, 2021, 7:45 p.m. UTC | #1
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
Giulio Benetti Oct. 18, 2021, 7:59 p.m. UTC | #2
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
Thomas Petazzoni Oct. 18, 2021, 9:40 p.m. UTC | #3
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
Giulio Benetti Jan. 8, 2022, 4:29 p.m. UTC | #4
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=*
diff mbox series

Patch

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}