19 mar. 2014

ARM SoC : is a revolution on the way?

ARM-s-Next-Gen-64-bit-Processor-Will-Be-Called-Atlas-and-Apollo-2.jpg Yesterday's Linux information was filled with great news for the GPU enthusiasts: NVIDIA finally decided to show some internal documentation to the nouveau developpers. A bit later NVIDIA proposed to commit some support code to existing projects. And today's Linux big information is also GPU related: Broadcom finally decided to publish the datasheet and the source code tha powers their OpenGL stack for the VideoCore IV GPU.

This thread of news is great by itself - yet it's even greater if you try to get a wider picture of the current state of the industry.

Scope

There is no shortage of GPU makers these days. For people who are accostumed to the desktop world this might sound a bit crazy since there is only a few of them in this market (AMD, NVIDIA and Intel). Yet the ARM SoC world is far more competitive - with at least 6 GPU manufacturers. Let's enumerate them:

  • ARM ships the MALI cores
  • NVIDIA ships the GeForce ULP
  • Imagination ships the PowerVR line of GPUs
  • Broadcom ships the VideoCore GPUs
  • Vivante sells a GPU with the same name
  • Qualcomm is known for the Adreno GPUs

These manufacturers represent a large share of the ARM SoC market - there might be others but they would represent a tiny percentage of the installed SoCs out there.

One year ago...

It's been nearly one year since I published an interview of the most important open source SoC GPU driver projects. While work stalled for a few of them the community must agree that at least one project changed the driver landscape : Rob Clarck managed to upstream his Freedreno driver in the latest Mesa releases - the corresponding kernel driver was upstreamed as well. Support for X has been added as well so you can easily boot a Qualcomm board into X and play a few games (of course, you can do way more).

Sadly, not all drivers got to the same point - it's worth noting that some of them saw a very low number of commits. While it's largely comprehensible[1], the videocore reverse engineering project shown little activity during 2013 (with only 33 commits).

The remaining projects (lima[2], grate[3] and etna_viv [4]) are alive and well. Tegra is certainly suffering from the quasi-departure of Thierry Reding still Eric Faye-Lund managed to continue his incredible work on this important driver. On the Lima side, Libv did a recent talk at FOSDEM 2014 yet the commit activity has visibly reduced since June 2013.

The SoC GPU driver land changed a bit. One year ago we only had a few unstable driver that were only able to render a selected number of primitives. Now we have

  • an upstreamed freedreno driver
  • a working etna_viv driver which is undergoing some important architectural changes in order to be added to Mesa
  • a not-that-ready tegra driver with a diminuished work force (more below).
  • a living lima driver with low activity
  • a blocked videocore IV driver
  • a starting Tamil driver that targets the new Mali T6xx cores (by Connor Abbot).

Someone that does not follow the development of GPU drivers might believe that the field is somewhat doomed (or stagnating) with only a few exception. Yet there are a number of things going on that might prove them wrong.

Broadcom open source GPU drivers?

This is the Big Recent News : broadcom decided to open source their Videocore IV driver. The news item has been published on both Phoronix and LWN. While the Broadcom article makes reference to the 2nd anniversary of the Rasberry Pi as a reason to open source their driver, I tend to believe this is only part of the history. Broadcom is known to be quite reluctant to open source its code yet this release proposes source code for many important bits - including some that are not purely related to their GPU. Such a sudden change in politics is hard to believe and I think that they would have hold an infinite grip on this source code unless a particular set of events forced them to release it.

The first point is already known for industry watchers: Broadcom is in a difficult situation. Historically they based most of their important, domain specific SoCs on MIPS cores with a few ARM exception (the most notable being the SoC that powers the RPi). With the demise of MIPS (and the corresponding "I buy all your patents" by a ARM-led consortium) they will have some difficulties to continue their MIPS core development. Yet their multi media related ARM SoCs are still not on par with the concurrence - so they needed to do a bold move in order to make them more relevant. An open source GPU driver is of importance for anything related to media consumption and this will be a selling point for Broadcom.

This release is also important for other reasons. I said above that Thierry Reding distanced himself from the grate driver - that's not totally true. Thierry joined NVIDIA a few month ago and it seems that we're seing a change in NVIDIA's politics right now. A lot of Linux enthusiast remembers the funny "hand gesture" directed to NVIDIA by Linus Torvalds - this "hand gesture" was directly tied to NVIDIA's lack of support on the nouveau driver. Since this episode the behavior or NVIDIA changed a bit:

  • They released some internal documentation related to a few desktop GPU
  • They (by the hand of Thierry Redding) commited some Tegra K1 related code

The NVIDIA move shortly follows the acceptance of Rob Clark patches in the Linux kernel and Mesa (these patches added the full support of Qualcomm Adreno GPU to the mainline of both projects). I speculate[5] that this acceptance is one of the reason that made NVIDIA change its politics.

If both Adreno and Tegra drivers are covered by open source licences that might make other GPU solution irrelevant for Linux-based devices (i.e. all Android devices). Engineers that work for phone manufacturers tend to prefer hardware solutions for which they can control the source code. That's point 2 : the concurrence is moving fast and this is by itself is a strong incentive to either release open source drivers or to actively help existing reverse engineering projects. Since the videocoreiv project is still in its infancy, releasing the GPU driver and OpenGL stack source code makes sense.

What's coming now

We might safely speculate[6] that we are to see a few improvement in the coming weeks and month.

  • NVIDIA will propose other Tegra K1 related patches. Since these patches are also relevant for other GeForce ULP devices it might help Erik Faye-Lund to further develop its grate driver.
  • The freedreno driver is going to support AArch64[7] and the latest line of Adreno GPU from Qualcomm (Rob Clark is already working on this).
  • The videocoreiv team will take the Broadcom source code and turn it in a working GPU driver.
  • The etna_viv driver is going to approach upstream quality

There is a few other things that I expect to see:

  • A major rework on the Mesa shader compilation code is needed to both simplify it and to open it to weirder hardware architecture. This is a preparatory work for Mali as the shader compiler is a complex beast that need to be externalized right now (Connor had to write a very specific shader compiler to make this famous "Quake 3 on Mali" demo work).
  • NVIDIA should release new GPU related documents.
  • ARM might release documents about their MALI T200 and Mali T400 GPUs. Documents about the Mali T600 will wait.

Conclusion

I'd like to personnaly thank all the GPU open source driver developpers around the world for their work and their comitment. Thanks you all, really. I still believe that what you do is of utter importance for us.

Of course, there is still some work to do in order to have a complete ARM graphic stack for all these processors. Even if bare-bone or Mesa support is on the way for most of them, we still lack the proper kernel drivers and XFree drivers for all but one GPU architecture. It just mean that we have to continue to support these efforts and to help them when we can.

Finally, while I expect the GPU vendors to be more open in the coming month the truth is that we're still lacking a lot of documentation that would help the community. This documentation will not only help the community but the GPU vendors as well - the time is coming where we'll have a few successfull fully open source GPU stacks here and basing its product on a closed one would be a risk noone but a few player will want to take. The GPU vendors have to act rapidly if they don't want to be labelled as "the one who wants us to be blind". Going beyond the reputation of a closed and opaque company takes time and requires bold political moves that can be costly in the short time (see ya Allwinner) : it's far better to be perceived as an early open source supporter and open-source friendly company.

Notes

[1] due to the architecture of the processor and the lack of documentation

[2] ARM's MALI

[3] NVIDIA Tregra reverse engineering

[4] Vivante

[5] let's say I'm fact-speculate ; the recent hire of Linux specialists - including but not limited to Thierry Reding - shows that NVIDIA wants to strengthen this area. This may not be limited to the Tegra GPU because NVIDIA has other incentive to do so including the fact that Steam wants every single GPU driver to have a valid open source alternative before they start to support them.

[6] read: the following might be plain wrong yet I'd like it to happen

[7] the 64 bit ARM architecture

Ajouter un commentaire

Les commentaires peuvent être formatés en utilisant une syntaxe wiki simplifiée.

Fil des commentaires de ce billet