I have been working on running Wayland with a Weston compositor on the Odroid XU4, and would like to share my experience.
The current stable odroidxu3-3.10.y kernel contains an older unsupported r5p1-00rel1 mali driver, but the currently supported Mali user mode GLES/EGL drivers require the r6p0-02rel0 driver. After patching the kernel with the later kernel driver, I can now get the ARM libmali.so working with the 3.10 kernel.
I have previously built Weston on iMX6 platforms which use the Vivante GPU. The iMX6 GPU drivers provided by freescale provide three different GLES and EGL libraries for fbdev, x11, and wayland. The libEGL-wl.so on iMX6 platforms allows wayland clients access to EGL, however I can only find support for fbdev and x11 libraries on the malideveloper.com site.
Is it currently possible to use EGL on Mali with Wayland? I suppose Tizen does this somehow, however but I cannot find any libEGL-wl.so implementation for Mali GPUs. Although I could build Mesa for ARM to provide the EGL Wayland libraries, I don't see how Mesa can use the Mali GPU since there's no Gallium driver backend for Mesa.
SInce ARM seems to be pushing Wayland as the future for Mali compositors, shouldn't they provide the libEGL-wl.so libraries for LInux?
We are planning to release user-space drivers for Weston/Wayland with DRM (GBM) back-end for the ODROID-XU3, and also support it with OpenEmbedded/Yocto recipes. This should be available in the next few weeks.
As you mentioned, our Mali drivers do not work with Mesa so this is not an option. You need to use libmali.so built for Wayland.
Out of interest, what kind of application are you targeting?
Also, since you mentioned Tizen, you need to know that there is a windowing system abstraction layer in Tizen so our drivers for Wayland won't work as-is for Tizen even though Tizen may be using Wayland internally. You would need Tizen Mali drivers for this, in the same way that you need Android Mali drivers on Android etc... However, our "plain" Wayland drivers for the ODROID-XU3 will in principle work with any Linux distribution (as long as the toolchain and Weston versions are compatible). We only test them with Debian and a basic OpenEmbedded/Yocto image.
Best wishes,
Guillaume
Hi,
I would like to share my experience as well.
First, I see the r7p0 mali wayland drivers are out. I tried them already, and happy to get weston and enlightenment21 working with them. Now, there are some major gripes with them
1. i see there are 2 drivers, one libmali for gbm for weston, and one libmali for wayland-egl for apps. working with 2 libmali libraries is cumbersome, i hope next releases can be rolled out into one libmali.
2. i see vsync is locked on. i tried running an app with glSwapInterval 0 and i still got 60fps
3. there is a bug with full-screen egl apps that have alpha > 0, the framerate is locked at 30fps. simplest test: run weston-simple-egl - you get 60fps. run weston-simple-egl fullscreen - you get 30fps. run weston-simple-egl fullscreen with the 16bpp option, you get 60fps. To confirm this, i run some other app (glmark2-es2-wayland) in 32bpp and 16bpp and saw a similar behaviour - 60fps when alpha=0, 30fps otherwise
4. glmark2-es2-wayland crashes at the terrain (i think) test - this might be because of some shader issue in r7p0 mali driver. the test passes well on the x11 libmali
5. glmark2-es2-wayland does not exit when interrupted with CTRL-C, it remains hung. this might be a threading issue in libmali? i did not investigate
6. maybe related to 5 - in enlightenment 21, windows won't close from the X button (may be an e21 issue, maybe not)
7. run Terminology (the enlightenment terminal app) - not sure what egl config is using, but occasionally there are visual glitches
8. also in Terminology - it's having the wobbly window effect, but the window background is black (instead of having an alpha channel) - this might be a Terminology issue not choosing some egl config with alpha, or it might not be. The result is having a black square where the window content is wobbling.
9. gnome under wayland (mutter) does not start - it complains about lack of gallium acceleration then fails to start. i did not look a lot where exactly it crashes tho` (might be a clutter lib issue)
10. GTK3 apps are not working (crash in some gtk3 lib)
Hope to see some of these fixed soon
Second, my experience with Tizen:
I did have a working stack with the Tizen libmali r5p0 drivers in Debian. I had to use Debian as it's the only distro there with packages for armel - the tizen drivers are armel, not armhf.
I got weston working, also enlightenment. While i could not start gnome, all gtk3 apps were properly running. weston was very solid, enlightenment 20 was crashing randomly but it was able to run gnome apps nicely.
this is weston with tizen drivers: Weston xu3 - YouTube
this is e20 running gnome gtk3 apps: E20 odroid wayland - YouTube
the path in tizen is quite complicated - there's a wrapper around libmali, which is CoreGL, they have their own gbm library, a gbm-exynos library to connect to the DRM, a separate wayland-egl-gbm module, and yet another exynos-specific thing... complicated - although more reliable than the r7p0 wayland libmali.
i was using kernel 4.0 when i did these tests, which behaved not so well on the odroid, now i see they updated to 4.1 but wayland-egl-gbm fails now (no idea why)
Thanks for the info.
We're evaluating the ODROID-XU3 in our operator fatigue and proximity detection system for large mining equipment. The system interfaces to up to 5 video cameras installed on large mining trucks.
We use a graphics stack consisting of libSDL2/wayland/weston to display video feeds and a GPS proximity map. Previously I used Xorg, but wayland/weston is a much cleaner and better performing graphics stack than X11, especially for video.
I'm looking forward to testing the Mali libEGL and libGLESv2 libraries for Wayland once they're released. This graphics stack works very well on the iMX6/Vivante system (Solidrun Hummingboard) I'm currently using, however, the ODROID-XU3 would probably be faster if I could get a Weston working on Mali.
Regards,
Jonathan Olson
just a few updates on what i said:
* i know why GTK3 apps fail - issue is now fixed
* also using an older wayland-gbm in tizen will fix the issues - they updated to some new API that doesn't work with their mali driver, but using a commit with the old API will still work
* even with alpha=0, glmark-es2-wayland full screen will get some scenes results below 60fps - i am assuming this is because the drivers are slow. Compared to the armel tizen drivers, i would say that, if they were bug-free, the armhf libmali drivers are maybe 2 times slower. hope to see some significant performance updates in a new build
guillaume.tucker - what's your take on this?
Guillaume Tucker wrote:We are planning to release user-space drivers for Weston/Wayland with DRM (GBM) back-end for the ODROID-XU3, and also support it with OpenEmbedded/Yocto recipes. This should be available in the next few weeks. ... Best wishes,Guillaume
Guillaume Tucker wrote:
...
Are you also planning this for the Firefly / rk3288? That would just be the missing key to get a fast working linux desktop for all these rk3288 devices.
If available it would empower a lot of these $35+ rk3288 devices where several communities are trying to get out of the android box.
Right now I have mainline kernel (4.7) plus graphics stack running: mali + drm drivers, libdrm, mali user space drivers and armsoc and X11 running with ubuntu. It works however performance is not good (glmark2-es is about 40). Running glmark2-es fullscreen (under X11) i get about 55 fps. So I feel armsoc is the bottleneck here.
Weston with X11 backend is working well, and also fast: resizing/moving windows and stuff inside the weston window is fast when compared with normal X11 desktop.
So my hope is on a Weston/XWayland with DRM (GBM) back-end; and that would need these dedicated user space drivers for Firefly / rk3288.
Are you planning a release?
If needed I would gladly help developing one. Especially if one is already available for ODROID-XU3 as solutions in mali and drm kernel drivers and armsoc drivers are pretty identical in code so it shouldn't be too tricky.
Cheers -- mac_l1
Hi, is there any news about future wayland driver build for mali-t62x (I use Odroid XU4)? With wayland seems to have greatest potential rather than xorg but still need fixes/improvements
thanks for any reply and sorry for my bad english