Pengutronix at XDC 2018

This year the X Developer's Conference was held in A Coruña, Spain at the end of September. Pengutronix attended with three developers of the Pengutronix graphics team. This report collects the most interesting topics for graphics on Linux that were discussed at the XDC.

Wayland layer-shell protocol

As Wayland is increasingly getting hold in desktop and embedded systems and many discussions have settled, there wasn't much talk about Wayland on this year's conference.

Still Drew DeVault, maintainer of sway and the wlroots library, presented the layer shell protocol. This new Wayland protocol allows clients to specify their position and z-order in in relation to the remaining desktop and applications. Usually the compositor, e.g., Weston, Mutter or KDE, takes full care of implementing the desktop user interface by providing a specific shell. The layer shell allows users to extend and customize their desktops with additional applications without relying on the configuration means of the existing shell. Currently this protocol is used in sway to implement the wallpaper, lock screen, panel, and notification bar.

While the security of this protocol remains an open question, because it breaks the assumption that Wayland clients don't know anything about the desktop layout, wlroots is working towards adding the layer-shell protocol to the standard Wayland protocols.

The layer-shell could simplify the creation of GUIs for embedded systems in the same way it helps to write desktop application components. However, to be really interesting for embedded use cases, wlroot still needs more improvements in the drm-backend, especially proper use of hardware display overlays.

Heterogeneous memory management

On Thursday, a highlight was the talk by Jerome Glisse about the current state of heterogeneous memory management (HMM). HMM allows to synchronize the CPU page table and the device page table, and, thus, enables a shared address space between the CPU and devices and avoids relocations.

Additionally, HMM provides a unified interface to migrate memory between main memory and device memory, which allows device drivers to take advantage of separate device memory which has a higher bandwidth and lower latency than main memory. The interface still requires drivers to define the policy for the migration, because the conditions for optimal usage are highly device and use case specific.

My colleague Lucas Stach considered using HMM for implementing the reloc support for texture descriptors in etnaviv. This is still missing for support of the GC7000, which is, e.g., found on the i.MX8M. Unfortunately HMM requires that the device address space to be at least as large as the CPU address space, which is not the case for the 64 bit ARM cores on the i.MX8M, as the Vivante GPU only supports 32 bit addresses. The discussions lead to the decision to use per process address spaces to solve the reloc support on the GC7000. Stay tuned for news about GC7000 support in etnaviv.

OpenCL with Clover using SPIR-V and NIR

Friday started with a talk by Karol Herbst about OpenCL support inside Mesa through SPIR-V and NIR.

While the AMDGPU driver already supports OpenCL via its LLVM intermediate representation (IR), other drivers that don't use the LLVM IR for generating the machine code have a hard time supporting OpenCL. Adding means to use NIR as the general purpose IR within Mesa would enable all NIR-based drivers (currently Nouveau and freedreno) to benefit from Mesa OpenCL support.

Rob Clark, Pierre Moreau and Karol Herbst have been working on converting OpenCL C code into SPIR-V, which in turn can be translated into NIR. The talk covered which features are still missing in NIR and Clover for supporting OpenCL in NIR. Especially NIR is missing support for real pointers and various OpenCL specific opcodes and intrinsics and Clover lacks support for SPIR-V files and the conversion using the SPIRV-LLVM-Translator.

While there were patches for experimental NIR support in etnaviv, these haven't been merged into Mesa mainline yet. However, adding NIR support to etnaviv is essential for using this work to implement OpenCL in etnaviv.

Panfrost

Also on Friday, Lyude Paul and Alyssa Rosenzweig introduced their work on Panfrost, a reverse-engineered open source 3D driver for Mali GPUs. Mali is a GPU architecture by ARM, which is commonly found on embedded systems. The work is focused on the more recent Midgard (Txxx) and Bifrost (Gxx) series, which still leaves the older Utgard architecture something to avoid in maintainable systems.

Midgard is already supported by a prototype Mesa driver, which shows impressive results compared to the binary blob driver. Bifrost shares a kernel driver with Midgard, but the shader core has been completely changed. Although much of the ISA has been reverse-engineered, there is no Mesa support, yet.

Maybe with their work on the Mali GPUs, we might be able to start using SoCs that contain Mali GPUs for maintainable and updatable embedded systems.

Conclusion

Thanks to the X.Org Foundation and the GPUL (Galician Linux User Group) for organizing a great conference.


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.


Chemnitzer Linux-Tage 2024

Pengutronix war auch in diesem Jahr wieder auf den Chemnitzer Linux Tagen dabei. Wie jedes Jahr sind die CLT eine willkommene Gelegenheit Freunde zu treffen und sich über Linux, Open Source und den Rest der Welt auszutauschen.


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.


Embedded Linux Conference Europe 2023: Our Recommendations

Last month Pengutronix was present at the Embedded Open Source Summit (EOSS) in Prague. Thanks to all to all speakers for sharing your knowledge! In this blog post we want to shine a spotlight at a few talks that we found especially interesting. (Links to recordings will be added once the recordings are available.)


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.


Chemnitzer Linux-Tage 2023

After the Corona break, the Chemnitzer Linux-Tage will actully take place in real life again, and the Pengutronix team will have eight (!) talks there.