Lima userspace drivers: Xorg/mesa/tools/etc for BPI-R2

Just in case - configuring latest git mesa in debian:

meson ./build --buildtype plain --libdir lib/arm-linux-gnueabihf --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload -Dplatforms=surfaceless,x11,drm -Dllvm=true -Dlmsensors=false -Dlibunwind=false -Dgallium-nine=false -Dgallium-va=false -Dgallium-vdpau=false -Dgallium-xa=false -Dgallium-xvmc=false -Dgallium-opencl=disabled -Dosmesa=none -Dbuild-tests=false -Dglx=dri -Dshared-glapi=enabled -Ddri3=true -Degl=true -Dgbm=true -Dgles1=disabled -Dgles2=enabled -Dglvnd=false -Dselinux=false -Dvalgrind=false -Ddri-drivers= -Dgallium-drivers=kmsro,lima,swrast

P.S. meson-0.55 has to be installed from debian sid. Patch is the same.

P.P.S. building in progress, so not yet tested.

It would be nice if we got crosscompile working so i can build on travis and pack deb-package

Btw. Hdmi-patches are on the way to get merged to mainline (5.10).

https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

I hope Matthias picks dts changes too

I’m not so familiar with travis, is it some debian related stuff? I have some gentoo-related progress on cross-compiling, but it’s still far from finishing. Now when i have 2nd R2 which is debian powered i’m open to new debian things :wink:

Great news, but we also need lima patches (dts-related are more likely to be accepted than drm-related)

Btw: some new lima “fun” ;):

Google Photos

Not very playable performance, but at least it runs, opposite to earlier versions.

travis is a CI/CD (continous integration/delivery/deployment) which builds my kernel on github automaticly on push (only main-branch selected in .travis.yml). it builds kernel with my build.sh…

so if we find a way to build mesa with crosscompile and pack into deb (maybe include into build.sh) i can integrate it to travis so it will be automaticly build

btw. i cannot see your video (wrong mime) in firefox

Same for me in firefox, works in chromium based browser.

h_t_t_p_s://photos.app.goo.gl/nx8cSm4UH9SdEvT99

gaming on router :slight_smile: my intention was more to have a more responsive x-server

Gaming on a router with a GPU and HDMI :wink:

P.S. Probably it’s possible to use dts overlay for lima init? It will let to leave the kernel’s lima driver as is?

How do you want to trigger lima power on/off by dts? Currently we have only a code-approach. And this i can add to code in my repo and it is triggered by module load

In my 5.5-lima i used the same approach as in 4.4-mali module - dts regulators. Literally ported part of dts from 4.4 to 5.5. So now i want to try use it as an overlay.

We can define it in bananapi.dts disabled so you to enable it only in your overlay

I see you have also code changes in the mentioned commit…

You can rebase needed changes on my 5.9-hdmi, then i can include it in my repo in future

All code changes are for debug only.

Ok, i can try.

to be continue in Mali-450 support by lima :slight_smile:

Seems like crosscompiling mesa is possible without additional vm

https://sunxi.org/Mali_Open_Source_Driver#Cross_Compiling

Looks like it’s for debian, so i’ll need an additional VM :slight_smile:

But the binaries created will only work on debian because they are linked to debian libs :slight_smile:

Maybe chroot variant is best way…maybe that can be used also for other versions

Create a chroot and run build-process inside

Mali-450 support by lima => 20.0.x to have no unstable depency (meson 0.49.2 from debian 10)

successfully build mesa inside chroot

buildchroot.sh (1,2 KB)

build_mesa.sh (1,3 KB) mesa.patch (1017 Bytes)

sudo cp build_mesa.sh mesa.patch debian_buster_armhf/root/
sudo chroot debian_buster_armhf /root/build_mesa.sh

built files here: https://drive.google.com/file/d/1cNdpbW7cOSbvQPLc72KsdwwFxJMuY8az/view?usp=sharing

Great! Did you tested it? (I mean stability, blinking menus/buttons etc.)

Not yet due to missing time

Recently mediatek entry point patch was accepted to mesa mainline.

So now it’s not nessesery to patch mesa for git master.

UPD: Just finished testing - everything compiles and works just great with latest sources from git.

2 Likes