Jump to content

Vulkan Driver?


Go to solution Solved by elvis,

Recommended Posts

  • Solution
Posted

Mesa3D's PanVK / Panthor driver is half of this.  The other half is support in the Linux kernel:

 

https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md

 

Specifically the "Display Controller (VOP)" ("VOP" = Video Out Processor).  The HDMI PHY and bridge are slated for kernel 6.13-rc1.  Without those, the HMDI controller can't send a picture.  There are more portions too for 4K / 8K support, audio support, etc.  But at the very least with the PHY and bridge working, I think that enables native kernel + Mesa support to get a picture and use Vulkan. 

Kernel 6.12 was released today.  The 6.13 development cycle should begin soon, although there's often a break over Christmas and New Year, so I'm expecting something early 2025 for a full working solution. 

Posted

Collabora blogpost from Dec 20 confirms kernel 6.13 contains the necessary HDMI/VOP portions:

https://www.collabora.com/news-and-blog/news-and-events/rockchip-rk3588-upstream-support-progress-future-plans.html

Code commits as well as blog comments suggest that specific resolution/refresh support will be a bit limited to start with, but that's being worked on for future releases.  Likewise CEC and V4L2 support is being worked on and will appear later in 2025 (not necessary for just getting a picture though, but useful for people looking to put rk3588s SoCs into media center or streaming server builds). 

At time of posting, 6.13-rc5 is the current release candidate, so I suspect 6.13 will be released within a few weeks.  I'm seeing a few people building 6.13-rc kernels for various rk3588s boards with some success (Panthor+HDMI seemingly producing a picture), so that's a positive sign for the upcoming release. 

Posted

I've built 6.13-rc5 kernel and kernel-dtb using the Armbian build tools, and pushed that to my Orange Pi5 running Armbian Bookworm that itself shipped with the 6.12 kernel straight from the download page.  I installed kernel/headers/dtb packages with dpkg and rebooted, and it worked without issue.

The kernel enables the VOP, and I can get 1080p120 and up to 2160p30 resolutions working on my 4K TV via HDMI.  2160p60 doesn't show up as an option, but I'm unsure if that's a limit of the current VOP driver, or my cable.  (There's talk on the mailing list about more work needing to be done for certain resolutions to be supported).  I'm running X11 currently (default from the Armbian image).  I'll try Wayland at some point.

I've compiled in Mesa from git-main for the Panfrost drivers, and Vulkan seems to work pretty well.  I get a few odd colours randomly here and there, but I assume these early bugs will sort themselves out in time.  I initially didn't get OpenGL working, but that's because I forgot to compile in the drm-shim tools in Mesa.  With those compiled and installed, OpenGL works fine too without the need to do any LD_PRELOAD stuff in the Mesa documentation (I think that's outdated info from the 24.x tree), and is quite fast.   Simple OpenGL-display/scale things like MAME can happily achieve 400% speed output, and aren't being capped by the GPU's bandwidth like they are on some older SoCs.  The Mali G610 is a pretty nice GPU, I have to say.

Zink isn't working so well just yet, but also I haven't tried limiting the OpenGL version it's attempting yet.  I probably need to pull that right back to match the features available in the current Panfrost Vulkan implementation.  Although the Panfrost Gallium driver seems to work well enough for OpenGL, so that's nice.

I'm quite impressed with how well this works even with code that's full of "testing only" warnings.   I think across a variety of games and emulators I've had one crash so far.  Pretty exciting to see this board fully supported by mainline kernel+mesa finally.   Seeing GameCube emulation running at full speed with Vulkan on this little SoC is really cool. 

Kernel 6.13 was released officially yesterday, so hopefully we'll see this all appear in the "edge" Armbian packaging soon.

Posted

@elvis, Care to make a step-by-step on how you did all that? I've got a Orange pi 5 max and I'm struggling really hard on making it work properly -- everything feels really broken on my end.

Posted

I threw together a quick and dirty gist here:
https://gist.github.com/danmons/c00366c223ae404c23b97c51c8a1b0ee
 

Not the best documentation I'm sorry, but this is what I'm doing currently to get it working.  I'm starting with the Debian 12 Bookworm XFCE image with 6.12 kernel from here which boots without a picture, then following the steps in the gist above to add the 6.13 kernel and compile in Mesa, which on reboot give a picture and working OpenGL, OpenGLES and Vulkan:
https://www.armbian.com/orangepi-5/

I re-did the process the other day, and the Armbian build tools created packages for kernel 6.13.2. I'm compiling Mesa straight from their Gitlab main branch (currently 25.1.0-devel), and the panvk updates are coming out pretty rapidly:
https://gitlab.freedesktop.org/mesa/mesa/-/commits/main?search=pan
 

Vulkan performance is quite impressive for such a low power device, although there are still some visual issues due to the driver being early in its development phase, and I think only at Vulkan 1.1.

Posted

Looks like in the last few days there have been some updates to the panvk sections of Mesa which now require newer SPIRV-Tools than is available in Bookworm, requiring that to be built as well (which themselves has some specific LLVM requirements too).

I'll try and get the gist above updated soon to reflect those changes.

Posted (edited)
On 2/12/2025 at 5:12 PM, Igor said:


Thanks.  I think this is a bit tricky just due to the speed at which changes are hitting Mesa main.   I think once Mesa releases 25.0.0 (any day now - they tagged rc3 today) and that hits the various PPAs already in that script, that will make things a lot easier for people to just get working via an apt upgrade.

Otherwise the only requirement is kernel 6.13, which is already in Armbian 25.x / edge.

I suspect both of these requirements will hit PPAs and install images very soon?

https://www.armbian.com/newsflash/release-is-coming-3/

 

In the meantime I've updated my gist with notes on how to grab SPIRV-Tools and SPIRV-Headers if people are interested in bleeding edge Mesa main currently at 25.1.0-devel:
https://gist.github.com/danmons/c00366c223ae404c23b97c51c8a1b0ee

Edited by elvis
Posted
1 hour ago, elvis said:

Otherwise the only requirement is kernel 6.13, which is already in Armbian 25.x / edge.

I suspect both of these requirements will hit PPAs and install images very soon?

https://www.armbian.com/newsflash/release-is-coming-3/


With point releases we are targeting (CURRENT) LTS kernels, while the rest is anyway DIY or build daily. 

This is just an idea / option, perhaps better way to share the load. Keep the good work!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines