Does exist a VAAPI driver to the radxa zero 3W or in general for ARM64 or a valid / partial alternative,even bugged,that can be fixed ?

Hello to every FreeBSD brother all around.

I have implemented a full IOMMU v2 integration with DRM / RockChip / Panfrost code on the Radxa board Zero 3W. It has been a crazy 3 full days of night and day work. It's not only about to patch some file here and there. I have fixed a large numbers of bugs because in Linux it works differently. Now,this is the final situation :

1) Xorg with the glamour driver + xfce4 uses the 200% of the radxa cpus. Something is not working properly maybe I should disable the xfwm4 compositor :

Code:
xfconf-query -c xfwm4 -p /general/use_compositing -s false

  1. xfwm4 compositor — it uses XDamage + XComposite for rendering. On FreeBSD with glamor it could not match with the vblank timing.
  2. vsync not configured — xfwm4 ha an option vblank_mode that on Linux uses glx or xpresent, but on FreeBSD may fail silently or come back to a loop busy-wait.

2) I have switched from xfce4 to lxde and cpu takes much less power from cpus

Despite point 1 and 2,Firefox does not seem to be the best choice for surfing (and compiling from ports a fresh version of Chromium is a serious challenge and I'm not sure it will work as I wish)

When I go to YouTube for watching some videos I see the page has large black checks, sometimes magenta, and often it shows missing elements. Everything gets fixed after a while, but then the problems come back. I don't know what the problem is, perhaps some incompatibility between the xfce4 compositing and the panfrost driver ? Maybe there aren't bugs,but it's only Firefox that asks to the radxa board too many resources that it can't offer ?

Anyway do you know if does exists or if it's possible to port the VAAPI driver to the radxa zero 3W or in general to ARM64 for FreeBSD ? This is what I get for the moment :

Code:
# vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/local/lib/dri/panfrost_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Does exists a partial port of RKVDEC / RKVENC for FreeBSD already ? v4l2 on FreeBSD already supports something for RK35xx ?
 
Tip try first MATE, if i remember good only linux there is an application installable to tune the compositor to very different settings.
Like none,picom ,xrandr, glx , and combinations and variations. This is nice to try out which work or crash the GPU.
 
Tip try first MATE, if i remember good only linux there is an application installable to tune the compositor to very different settings.
Like none,picom ,xrandr, glx , and combinations and variations. This is nice to try out which work or crash the GPU.

At the moment my problem is not about the fact that the Mali GPU of the Radxa Zero 3W crashes. Everything works here. DRM,Panfrost,IOVA + IOMMU flow. Problem is that Firefox can't use the hardware GPU acceleration because FreeBSD misses a VAAPI driver for ARM64 and / or if it does exist,it does not work great with panfrost. Dunno. So it can't use the GPU power,but only the CPU. So it is not so fast to render pages and it creates glitches. How can Mate desktop help me ? Dunno. Maybe Wayland can. But I suspect it is not yet mature for arm64. Can Chromium be a valid alternative ? Maybe. But Chromium is not between the packages for FreeBSD for arm64. It can be compiled from ports,but here the challenge is that the compilation will be very slow on my machines. To do it on a slow arm64 board can take ages. On my PC I should use QEMU without the hypervisor acceleration. There is no acceleration for QEMU if it emulates arm code on X64. Without it can take a lot of time.
 
Porting these components from Linux to FreeBSD maybe is the solution : https://github.com/HermanChen/mpp :

Rockchip MPP (Media Process Platfrom) module directory description:

MPP : Media Process Platform
MPI : Media Process Interface
HAL : Hardware Abstract Layer
OSAL : Operation System Abstract Layer
 
Tip when compiling chromium use poudriere, i start poudriere with ,
cat /root/Scripts/poudriere_nice
nice -n 31 idprio 31 ./poudriere_run
note , nice & idprio , so it only runs when cpu is in sleep state. idprio makes the bus data transfer is not overloaded.
 
Tip when compiling chromium use poudriere, i start poudriere with ,
cat /root/Scripts/poudriere_nice
nice -n 31 idprio 31 ./poudriere_run
note , nice & idprio , so it only runs when cpu is in sleep state. idprio makes the bus data transfer is not overloaded.

How long time do you need to compile Chromium from ports with Poudriere ?
 
Maybe 12 hours on a 12-Core CPU & 16GB memory. But there good tuning of poudriere comes into place.
- If CPU 100% , desktop blocks, mouse does not move.
- Starting to many parallel build and you eat up all memory & swap , sometimes resulting in crash.
So only : Trial & Error.
 
Back
Top