Running mesa on i.mx6 with etnaviv

Wagner Andre andre.wagner at richard-wolf.com
Thu Jul 31 13:50:57 UTC 2025


Hello everyone,

I try to run a run an (qt) app accelerated by the upstream etnaviv driver on an i.MX6 DL based SBC, but I just cannot get it working...

What I did so far:

 *
I patched the imx-drm back from NXP version (since its adapted to their closed source galcore driver) to vanilla version, which should work with etnaviv. Dmesg shows also "Initialized etnaviv 1.3.0 20151214 for etnaviv on minor 0" and "  Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1". So I expect both kernel drivers to work.
 *
I installed a Ubuntu 22.04 with a slightly modified NXP Linux kernel in version 5.15.148 and used from Ubuntu 22.04 mesa in version 23.2.1
 *
 I put my qt application on it based on qt 5.15.3. When i select the linuxfb backend i can see the qt application on my screen. So the hardware is ok.
 *
After adjusting the device tree from NXP galcore to etnaviv i can see the /dev/dri/card0, /dev/dri/renderD128 and /dev/dri/card1

After starting my Qt application i got following error:
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_kms")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_kms")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms"
qt.qpa.eglfs.kms: Loading KMS setup from "/etc/eglfs_hdmi.json"
qt.qpa.eglfs.kms: Requested configuration (some settings may be ignored):
      headless: false
      hwcursor: false
      pbuffers: true
      separateScreens: false
      virtualDesktopLayout: 0
      outputs: QMap(("LVDS-1", QMap(("mode", QVariant(QString, "800x600"))("name", QVariant(QString, "LVDS-1")))))
qt.qpa.eglfs.kms: New DRM/KMS via GBM integration created
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms"
qt.qpa.eglfs.kms: platformInit: Opening DRM device
qt.qpa.eglfs.kms: GBM: Using DRM device "/dev/dri/card1" specified in config file
qt.qpa.eglfs.kms: Using backend-provided DRM device /dev/dri/card1
qt.qpa.eglfs.kms: Creating GBM device for file descriptor 4 obtained from "/dev/dri/card1"
qt.qpa.eglfs.kms: Initalizing event reader for device 0x1a51248 fd 4
qt.qpa.eglfs.kms: Querying EGLDisplay
qt.qpa.eglfs.kms: Event reader thread: entering event loop
qt.qpa.eglfs.kms: No eglGetPlatformDisplay for GBM, falling back to eglGetDisplay
Could not open egl display
Aborted


What i think i understood:

 1.
the etnaviv kernel driver exposes the Vivante GPU as /dev/dri/card0 and /dev/dri/renderD128
 2.
the imx-drm kernel driver exposes the IPU as /dev/dri/card1
 3.
kms works on /dev/dri/card1 since I can see output with modetest
 4.
the LVDS output is attached to the IPU so to /dev/dri/card1, modetest shows also that
 5.
the Qt5 eglfs backend triggers the MESA-LOADER looks all /dev/dri/card* to find a device which supports modesetting
 6.
the only device which supports modesetting is  /dev/dri/card1 since /dev/dri/card0 has no screens/outputs
 7.
via libdrm the MESA-LOADER  finds that /dev/dri/card1 is a device which runs on imx-drm kernel driver
 8.
since the kernel drivers name is imx-drm the MESA-LOADER loads imx-drm_dri
 9.
Problem is not specific to qt, since kmscube ("failed to initialize EGL") and weston-simple-dmabuf-egl ("../clients/simple-dmabuf-egl.c:1375: create_display: Assertion `display->display' failed." also fail.
 10.
In /sys/kernel/debug/dma_buf/bufinfo i should see something like exp_name and imp_name + etnaviv and imx-drm. But right now it shows only "Total 0 objects, 0 bytes", so handling from etnaviv to imx-drm does not work at all.
 11.
Ubuntu's mesa build uses the mega mesa driver so all drivers are include in one shared object. Which drivers are contained i can see with strings etnaviv_dri.so | grep __driDriverGetExtensions. Since i see __driDriverGetExtensions_etnaviv and __driDriverGetExtensions_imx_drm the necessary driver / stub driver is included. The drivers filename needs to correspond <kernel driver name >_dri.so

Please correct me if one or more of these assumptions is wrong.

But now the points where i am  missing understanding:

 1.
imx-drm_dri is only a stub which should trigger etnaviv_dri via KMSRO ?
 2.
Somehow a dmabuf with GBM is shared between etnaviv_dri (/dev/dri/renderD128) and imx-drm_dri stub (/dev/dri/card1) which is called PRIME ?
 3.
Which mesa compile options i do really need for getting this setup working, am i missing some ?
 4.
What is a really useful test program, how can i debug further ?
 5.
Do i miss a kernel config option ?

Thank you already very much for your help in advance.

Greetings,
André






 1.




[https://www.richard-wolf.com/mam/data/Typo3/banner/e-mail-banner-DGU25.png]<https://www.richard-wolf.com/de/unternehmen/kongresse/messe-detail/77-kongress-der-deutschen-gesellschaft-fuer-urologie-dgu><https://www.richard-wolf.com/de/academy-prima-vista/masterclass-workshops/masterclass-workshop-minimally-invasive-upper-gi-surgery-2><https://www.richard-wolf.com/en/company/congresses/congress-detail/arab-health-2025>

Richard Wolf GmbH, Pforzheimer Strasse 32, 75438 Knittlingen
Managing Directors: Juergen Pfab, Juergen Steinbeck. Trade Register: Mannheim HRB 510031

Richard Wolf GmbH routinely monitors the content of e-mail sent and received via its network for the purposes of ensuring compliance with its policies and procedures. Richard Wolf GmbH is not responsible for any changes made to the message after it has been sent. Where opinions are expressed, they are not necessarily those of Richard Wolf GmbH. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose, or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately.

Data Protection Policy<https://www.richard-wolf.com/en/data-protection-policy>  |  Legal Information<https://www.richard-wolf.com/en/legal-information/>  |  Terms & Conditions<https://www.richard-wolf.com/en/terms-conditions/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20250731/a50a1a21/attachment-0001.htm>


More information about the mesa-users mailing list