Vulkan on the CM3

Hiya, I’m trying to get Vulkan (or “Vk” will do!) to work on the CM3 (Lavapipe is great, but too slow).

As I understand it, there are two options:

  1. ARM’s closed blob - libmali.so? Not to be found anywhere on the internet (except an old version for Odroid - https://developer.arm.com/downloads/-/mali-drivers/user-space) What I did find after lots of digging seemed to have GL but not VK.

  2. Panfrost/PanVK - build yourself using Mesa, but not “official” (Panfrost is, PanVK isn’t - https://github.com/Mesa3D/mesa/tree/main/src/panfrost/vulkan).

#1 requires the open source bifrost_kbase kernel module, #2 requires the panfrost one. Is that right?

Apparently the kernel support needs a 5.10+ kernel: I found this radxa image that’s got everything:

radxa-build/radxa-cm3-io/releases/tag/b23

(… which has been superceded by “b24” a couple of hours ago I see)

This has kernel modules for bifrost_kbase and panfrost. So I thought I’d start by removing bifrost and running panfrost, but when I set up the modules the way I think this should work (remove the bifrost module, comment out the blacklist entries, depmod -a) it stops the OS from booting.

Any thoughts? Anyone got Vulkan or a “Vk” going on any Rockchip board anywhere? You can ship me the ARM blob using my secret email address if you want.

Duncan

Hi, @RadxaYuntian - I see you’ve replied to a similar question recently - do you have any thoughts? :smiley:

I’m building my own image today, so I’ll see if that helps.

Cheers!
Duncan

Currently Rockchip does not support Vulkan on Linux. I think it is only supported in Android.

Running panfrost on our system is also a to-do item for me. Right now it will break the boot process.

Anything I can do to help? I find the OS crashes at init_module() on modprobe panfrost

Probably compare our kernel config with Armbian legacy kernel config. I vaguely recall they were using panfrost with Rockchip kernel.

Hi again @RadxaYuntian
I would like to reproduce the b24 build - could you tell me any of: the repos, branches, tags, commits, DTSs, .configs, etc, etc - anything you can tell me that would get me going building it myself?
Thanks so much.
Duncan

You should follow this page.

It is NOT an easy task since you will need to manually pin every packages to the same version (specified in /etc/radxa_apt_snapshot) when B24 was created. Since it is very intensive I did not follow the tutorial to make sure everything is correct.

OK, thanks very much, I’ll read that page - I hadn’t seen it before. Very useful, thanks!
Duncan