Pengutronix TechWeek 2018: NIR for Etnaviv

Once in a year, mostly during springtime, no phone call is answered at Pengutronix, no customer Mail receives a reply, no BSP is built and no coffee machine gargles. But, no fear, this is not the end! It is just the time for something new! New ideas, focused development on new world domination plans and time to think outside the box. Yes, it's again the time for the Pengutronix TechWeek!

As every year, we hid in a green and isolated place with acceptable bandwidth and good catering. The perfect mixture for focused hacking, starting new projects and discussing the big picture.

Thanks to Freifunk Braunschweig, we could set up our own WiFi infrastructure. Besides that we enjoyed ourselves at a trip to Wisentgehege Springe, a local nature park, and on a pgp-keysigning party as well as on a BBQ.

But back to topic: On Friday morning, we had some short talks to share each team's results among our colleagues. In this and some following blog posts, we like to summarize these here as well.

Let's start with some news from our graphics team: During TechWeek 2017, Philipp Zabel and Michael Tretter had taken the first steps towards extending the etnaviv driver in Mesa with NIR compiler support. NIR is a compiler intermediate representation that is well suited for optimizing code transformations and is already used by many other Mesa drivers. Supporting NIR allows to share common optimizations with other drivers and facilitates better register allocation strategies.

Overall this will lead to faster shader code that runs in less instructions and uses fewer registers. Furthermore, using the shared NIR compiler layer will allow to work on common support for OpenCL and SPIR-V in the future.

Philipp and Michael were able to continue their work compiling NIR shaders from the GLSL compiler to Vivante machine code. The screenshot on the right shows one of the glmark2 programs, exposing some visual artefacts resulting from a still-incomplete NIR support; the work consisted of analyzing those artefacts, finding and finally fixing the reasons in the code.

While the code is far from feature complete, the current state looked promising enough that a first patch series was cleaned up and sent to the Mesa-developer ML. Hopefully people out in the community will start experimenting with the new possibilities, finding further bugs, adding features and extending the NIR support in Etnaviv.

For a TechWeek project, the challenge and fun of it was enough motivation. Thinking of future use, Etnaviv has meanwhile reached a maturity status that already enabled its use in many of our industrial customer projects, even in critical markets such as medical, automotive and aerospace. OpenCL on a full blown open source graphics stack will hopefully add interesting additional possibilities in the near future.


Further Readings

Pengutronix at Embedded World 2024

Meet Pengutronix at the Embedded World 2024 in Nurnberg! You find us, as always, in hall 4, booth 4-261. As usual, we will be showing demonstrators on current topics at our exhibition stand.


FrOSCon 2023

In a few hours, the 18th FrOSCon will begin at the Bonn-Rhein-Sieg University of Applied Sciences. Pengutronix will be there again with a small team. At one of the partner booths we will show some of our activities in the open source community. We will bring our labgrid demonstrator and the FPGA demo.


DjangoCon Europe 2023

Django is Pengutronix' framework of choice for internal applications that handle our business processes. These internal tools are also a great opportunity to try out current developments in the Django universe.


Showcase: Graphics on i.MX8MP

Enabling the graphics output pipeline on the i.MX8M Plus (i.MX8MP for short), is the most recent example on how open-source and upstream driver support for GPU and display engines can reduce effort and risk in a new project.


Pengutronix at Embedded World 2020

Yesterday, Embedded World started, in normal times one of the largest trade shows for embedded development in Europe. While many exhibitors (and thus maybe also lots of visitors) have canceled their presence due to the coronavirus, we present our booth and our demo show cases as usual.


Pengutronix at FrOSCon 2018

This year, a team from Pengutronix attended FrOSCon in St. Augustin for the first time. We took the opportunity to shake hands, talk about our latest developments and meet hackers interested in working with embedded Linux.