mbox series

[meta-rockchip,RFC,0/2] add support for Panthor

Message ID 20240531-mesa-panthor-v1-0-8cfb4d17ad3a@cherry.de
Headers show
Series add support for Panthor | expand

Message

Quentin Schulz May 31, 2024, 3:30 p.m. UTC
Panthor is the open-source implementation for the Arm GPU Valhall series
both in the Linux kernel and Mesa userspace. In the latter, the panfrost
"driver" is actually handling this version of the Arm GPU. One therefore
needs to enable kmsro and panfrost in PACKAGECONFIG to be able to use
this open-source implementation.

The open-source implementation still requires a proprietary blob which
is running on the GPU: mali_csffw.bin. Note that the closed-source
implementation (libmali and vendor kernel drivers) also require this
blob.

Right now, we're still missing a linux-yocto v6.10+ to be able to test
this with everything upstream in Yocto/OE, but I was able to
successfully test this with kmscube on a downstream kernel (6.6 +
backported patches for GPU and custom patches for DSI support) on an
RK3588 Tiger.

Additionally, the following patch series is required from OE-Core:
https://lore.kernel.org/openembedded-core/20240531-panthor-v1-0-1a76fd752c1b@cherry.de/T/#t

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (2):
      mesa: enable Panfrost support for RK3588(S)
      mesa: recommend mali csffw firmware package for mesa-megadriver for RK3588s

 recipes-graphics/mesa/mesa_%.bbappend | 3 +++
 1 file changed, 3 insertions(+)
---
base-commit: 3381d6af6eabfb532da16863b785a95abba6b9e8
change-id: 20240531-mesa-panthor-9c31ca1aa31f

Best regards,

Comments

Trevor Woerner June 11, 2024, 1:43 p.m. UTC | #1
On Fri 2024-05-31 @ 05:30:24 PM, Quentin Schulz via lists.yoctoproject.org wrote:
> Panthor is the open-source implementation for the Arm GPU Valhall series
> both in the Linux kernel and Mesa userspace. In the latter, the panfrost
> "driver" is actually handling this version of the Arm GPU. One therefore
> needs to enable kmsro and panfrost in PACKAGECONFIG to be able to use
> this open-source implementation.
> 
> The open-source implementation still requires a proprietary blob which
> is running on the GPU: mali_csffw.bin. Note that the closed-source
> implementation (libmali and vendor kernel drivers) also require this
> blob.
> 
> Right now, we're still missing a linux-yocto v6.10+ to be able to test
> this with everything upstream in Yocto/OE, but I was able to
> successfully test this with kmscube on a downstream kernel (6.6 +
> backported patches for GPU and custom patches for DSI support) on an
> RK3588 Tiger.
> 
> Additionally, the following patch series is required from OE-Core:
> https://lore.kernel.org/openembedded-core/20240531-panthor-v1-0-1a76fd752c1b@cherry.de/T/#t

I would prefer to commit a working patch rather than pieces.

I.e. if you want to add the necessary patches indicated above into
meta-rockchip so that a working image can be generated without any additional
dependencies on other layers.

Would that be possible?
Quentin Schulz June 11, 2024, 1:56 p.m. UTC | #2
Hi Trevor,

On 6/11/24 3:43 PM, Trevor Woerner wrote:
> On Fri 2024-05-31 @ 05:30:24 PM, Quentin Schulz via lists.yoctoproject.org wrote:
>> Panthor is the open-source implementation for the Arm GPU Valhall series
>> both in the Linux kernel and Mesa userspace. In the latter, the panfrost
>> "driver" is actually handling this version of the Arm GPU. One therefore
>> needs to enable kmsro and panfrost in PACKAGECONFIG to be able to use
>> this open-source implementation.
>>
>> The open-source implementation still requires a proprietary blob which
>> is running on the GPU: mali_csffw.bin. Note that the closed-source
>> implementation (libmali and vendor kernel drivers) also require this
>> blob.
>>
>> Right now, we're still missing a linux-yocto v6.10+ to be able to test
>> this with everything upstream in Yocto/OE, but I was able to
>> successfully test this with kmscube on a downstream kernel (6.6 +
>> backported patches for GPU and custom patches for DSI support) on an
>> RK3588 Tiger.
>>
>> Additionally, the following patch series is required from OE-Core:
>> https://lore.kernel.org/openembedded-core/20240531-panthor-v1-0-1a76fd752c1b@cherry.de/T/#t
> 
> I would prefer to commit a working patch rather than pieces.
> 
> I.e. if you want to add the necessary patches indicated above into
> meta-rockchip so that a working image can be generated without any additional
> dependencies on other layers.
> 
> Would that be possible?

Yes, but I don't want to :)

Basically, this was just if someone wanted to tinker before it was 
merged into OE-Core.

I don't think it makes sense to add the necessary patches/bbappends in 
meta-rockchip for the master branch, it's duplicating efforts. However, 
I plan on backporting the mesa recipe to scarthgap once it's merged 
upstream, that would probably have its place in meta-rockchip (and if 
not, I'll have it in my layer anyway :) ).

The issue right now is that the mesa bump is just not something I can 
achieve without substantial effort as I know nothing about meson, mesa 
and graphical stuff and the issues I encountered were a bit too hairy 
for me :/ I hope someone can have a look at it, but for now I'll have to 
stop here. I will likely have to do this by the end of the 
year/beginning of next year when we migrate our customer base to 
upstream kernel, but I hope that we'll have this bumped by someone else 
before.

Basically, you can ignore this until I send another version :)

Cheers,
Quentin