AW: running etnaviv driver on i.mx6
Wagner Andre
andre.wagner at richard-wolf.com
Thu Aug 7 08:09:16 UTC 2025
Hi Chris,
I am using the linux kernel board support package of a hardware vendor based on the NXP Linux Kernel for use with a i.MX6 based board. In former versions I used framebuffer to show graphics. Since the vendor is quite slow, the most recent linux kernel version (NXP branch with extra patches and device trees from the hardware vendor) is kernel 5.15.148. As a userspace I use always Ubuntu. As a rule of thumb i don't use a Ubuntu version which was originally shipped with a kernel later then the vendors kernel from the BSP and i use only LTS versions. So at the moment Ubuntu 22.04 is the latest possible version for me.
So for getting this improved i think there are several options:
1.
Stay with the vendor BSP Kernel, just update mesa to a later version. => But i don't know if this can cause problems with other Ubuntu components, since i don't know how downwards compatible mesa is.
2.
Port everything to the Ubuntu Linux Kernel. So i could use Ubuntu 24.04 with 2 years extra of support and the needed extra kernel options for Ubuntu are already in. Just merging imx_v6_v7_defconfig with scripts/kconfig/merge_config.sh on top of it => But I don't know if there are other patches in Ubuntu's kernel which have a negative effect on i.MX6
3.
Port everything to NXP Linux Kernel, apply hardware vendor patches by myself, patch mainline etnaviv in. Since NXP kernel version is 6.12 i would use Ubuntu 24.04 which was released with kernel 6.8 => Should be easy since the hardware vendor changes are not that much, but still ugly reversing NXP patches on etnaviv and imx-drm
4.
Port everything to mainline kernel, apply hardware vendor patches by myself, patch the kernel options needed for Ubuntu on top of imx_v6_v7_defconfig. Would mean that i can always use the latest Ubuntu LTS version as userspace => But I don't know about the effects when i switch from NXP Linux kernel to Vanilla Linux Kernel in the same version. Porting of the device tree should be easy since that hardware vendor does not patch existing device tree files.
What do you think, which option is best? What problems are likely if not switching to a later mesa version than 23.2.1? Is the there a coupling between mesa versions and linux kernel (etnaviv driver) versions?
Thank you already very much for your input.
Greetings,
André
[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>
________________________________
Von: Chris Healy <cphealy at gmail.com>
Gesendet: Mittwoch, 6. August 2025 17:56
An: Wagner Andre <andre.wagner at richard-wolf.com>
Cc: Fabio Estevam <festevam at gmail.com>; etnaviv at lists.freedesktop.org <etnaviv at lists.freedesktop.org>
Betreff: Re: running etnaviv driver on i.mx6
I'm not sure what your goal is but I would recommend using a newer version of Mesa than 23.2.1. Many changes have landed in Mesa over the last 2 years related to etnaviv bringing features, performance, and bug fixes.
On Wed, Aug 6, 2025 at 8:49 AM Wagner Andre <andre.wagner at richard-wolf.com<mailto:andre.wagner at richard-wolf.com>> wrote:
Hi Fabio,
I got it working! I didn't port everything to the mainline kernel but I ensured that drivers/gpu/drm/etnaviv and drivers/gpu/drm/imx match the mainline kernel and I ported the devicetree to mainline style for the gpu node and the ldb node (LVDS device bridge). Then i realized that i need to compile mesa different:
I used:
meson setup <build dir> \
-Dplatforms=wayland \
-Degl-native-platform=drm \
-Dgallium-drivers=etnaviv,kmsro \
-Ddri3=enabled \
-Dvulkan-drivers= \
-Dllvm=disabled \
-Dshared-llvm=disabled \
-Dshared-glapi=enabled \
-Dgles1=enabled \
-Dgles2=enabled \
-Dopengl=false \
-Degl=enabled \
-Dgbm=enabled \
-Dglx=disabled \
-Dglvnd=true \
-Dbuild-tests=true \
-Dtools= \
-Db_ndebug=true \
-Ddri-drivers-path=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \
-Ddri-search-path='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri'
On my first run I didn't set egl's native platform to drm and compared to your old article (i tested the buildroot you meantioned there) i used dri3 and disabled dri2 completly.
So my running setup is now:
*
Linux 5.15.148, NXP branch with mainline /driver/gpu/drm/{etnaviv,imx} of mainline branch
*
Custom devicetree for NXP branch with adapted gpu- and lbd-node to mainline branch
*
Mesa 23.2.1 with dri3, egl on drm using gbm
*
Qt Application 5.15 with eglfs platform
Greetings,
André
[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/>
________________________________
Von: etnaviv <etnaviv-bounces at lists.freedesktop.org<mailto:etnaviv-bounces at lists.freedesktop.org>> im Auftrag von Fabio Estevam <festevam at gmail.com<mailto:festevam at gmail.com>>
Gesendet: Montag, 4. August 2025 21:50
An: Wagner Andre <andre.wagner at richard-wolf.com<mailto:andre.wagner at richard-wolf.com>>
Cc: etnaviv at lists.freedesktop.org<mailto:etnaviv at lists.freedesktop.org> <etnaviv at lists.freedesktop.org<mailto:etnaviv at lists.freedesktop.org>>
Betreff: Re: running etnaviv driver on i.mx6
Hi Andre,
On Mon, Aug 4, 2025 at 12:39 PM Wagner Andre
<andre.wagner at richard-wolf.com<mailto:andre.wagner at richard-wolf.com>> wrote:
>
> Hi Fabio,
>
> thanks for your fast answer!
> A few hours ago, i just found an old article of you where you described howto do it ;):
>
> https://imxdev.gitlab.io/tutorial/Running_kmscube_with_Etnaviv_on_mx6sabresd_board/
>
> I try to do the setup you described there, but i still got no plan how to port the devicetree i got for my board from the NXP kernel variant to the mainline, without causing a bunch of new problems.
The display subsystem representation in the devicetree is different
between the mainline kernel and the NXP kernel.
Try getting the i.MX6 display interface to work with the mainline kernel first.
There are many i.MX6-based boards are supported by the mainline
kernel, which you can use as a reference for adapting your devicetree.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/etnaviv/attachments/20250807/f3c5d872/attachment-0001.htm>
More information about the etnaviv
mailing list