Posts Tagged ‘lima’
Orange Pi Development Boards

Open Source Mali-200 / Mali-400 GPU Lima Driver Gets New Commits

April 3rd, 2016 6 comments

The Lima driver, a project aimed at providing an open source driver for ARM Mali-400 and Mali-200 GPUs, was introduced 4 years ago, and after some reverse engineering work, a Quake 3 demo was showcase later in 2013 with an intermediate version of the Lima drivers. However, the main developer (libv) eventually lost interest or lacked time to further work, and the latest commit was made in June 9, 2013. But another developer (oklas) committed some code to limadriver-ng just a few days ago.

Lima_Driver_Pull_RequestBut don’t get too excited, as the modifications are minor with some build fixes, some other Makefile modifications, and only one C file modified with 6 new lines of code. But maybe that’s just the beginning… We’ll see.

Mali-400 GPU is now rather old, so why would somebody work on this? One explanation could be C.H.I.P and Pine A64 boards are both based on Allwinner SoCs with a Mali-400 GPU, but a more likely explanation is that libv invited new developers on

2015-12-20: this project looking for developers, if you’d like to try, come to our IRC #lima :)

So we’ll have to see how this all turns out, and if somebody is indeed motivated on working on the port. If so, C.H.I.P and Pine A64 boards, as well as other Mali-400 based platforms, could get open source GPU drivers.

Thanks to Luka via Reddit, where you can find some more details about the timeline.

Preliminary Reverse-Engineered VPU Driver (CedarX) for AllWinner A10 Plays H.264 Videos

August 30th, 2013 15 comments

Allwinner framework for their Video Processing Unit (VPU) in their Cortex A8 processors (A10, A13, etc..) is called CedarX. It relies on a binary blob that is working just fine for Android, but not so well for Linux. So several developers started to reverse-engineer CedarX a while back, to fix issues with Linux, and provide an open source driver.

Yesterday, they upload a video to show the development progress, and show Big Buck Bunny 1080p H.264 playback using libvdpau-sunxi open source driver with mplayer, and without any binary blobs.  The video resize function are not been implemented yet, which is why we can only see the left corner of video, but nevertheless it shows an open source hardware video decoder is on the way.

That means once the Lima driver for Mali-400 GPU, and libvdpau-sunxi driver for AllWinner VPU are implemented (which may still take a while), AllWinner A10 SoC will be mostly open source, and the only SoC with open source hardware video decoding. I guess the only parts that may not be open source are things such as 2D graphics (See comments), the NAND driver (although people are working on that), and maybe a few other parts I’m missing.

Via Olimex Blog.

Open ARM GPU Drivers FOSDEM 2013 Video and Call to ARM Management

February 14th, 2013 4 comments

As I previously wrote, FOSDEM organizers are slowly uploading FOSDEM 2013 videos. One of the most interesting talk “Open ARM GPU Drivers” is now available. I’ve also uploaded it to YouTube (embedded below) to give it more exposure. Luc Verhaegen has also written a recent blog post entitled “Hey ARM!” where he announces the release of the modified source for Quake 3 Arena demo, and asks ARM to join them in making an open source driver.

Open ARM GPU Drivers @ FOSDEM2013

This session covers the following key points:

  • Problem – Binary drivers are mainly designed to run in Android, and it’s very difficult to have proper GPU drivers for Linux, and companies are not interested to release open source drivers or even just documentation, as they are not convinced it will benefit them in any way.
  • Legal – This is actually the main issue, as open sourcing existing driver is a legal nightmare, and may cost a lot of money.
  • ARM Mali Overview – Mali-200/400, 450 & T6xx
  • Lima Project Status – No big secrets left in command-stream, compiler is tough due to Mali architecture, and actual driver work will start after FOSDEM. Full GNU/linux systems available.
  • Qualcomm Adreno Overview – Adreno 2xx/3xx
  • Freedreno Project Status – WIP driver. Command-stream and Shader architecture is mostly known. WIP xf86 (exa), mesa (gallium) drivers available. No proper GNU/linux available (The developer is currently using Android)
  • Nvidia Geforce ULP (Tegra) Overview
  • Tegra-re Project Status – Early research, early shader disassembler and early command stream capture. Limited availability of GNU/linux systems (AC-100, Trimslice).
  • Vivante GCxxxx Overview
  • Etnaviv project Status – Early research: Slowly prying apart command stream, full command stream capture and replay, and shader disassembler and assembler.
  • Broadcom Videocore Overview
  • The Raspberry Pi is a closed platform – “Open source” driver release by the Raspberry Pi foundation is just a shim (message-passing interface between ARM and the GPU), and the GPU itself runs a RTOS that handles the real processing.
  • Videocore Project Status – Research stage: documentation, assembler/disassembler., compiler work started,
    scalar processor fully reverse engineered, and some some “Hello World” code is available for booting the Raspberry Pi. 9 people are currently working on this project.
  • Imagination PowerVR SGX Overview – PowerVR SGX (5xx), and Rogue (6xx) in the future
  • Open Source Project Status (from the slides):PowerVR SGX Open Source Driver
  • Lima driver demos on Mele A1000 – Cube demos and Quake 3 Arena timedemo.

You can also download the presentation slides for his sessions

Quake 3 Arena Time Demo Source Code for Lima and Limare Driver

As I just mentioned, part of the session was a demo of Quake 3 Arena running on top of Lima drivers in Mele A1000 set-top box running Linux. Luc has now made the source code available on github, and you can get it as follows:

You can them compile it natively in any AllWinner A10 device:

You’ll also need to get a full Quake 3 Arena version first as the binary data files (paks files) must be copied to   ~/ioquake3/baseq3 (NB: Those files can not be redistributed, as they belong to ID Software), and edit demofour.cfg as follows:

You can now run the game demo with (I haven’t tried, so I’m not sure of the quake binary name):

The full games is not playable yet, and Luc welcomes fixes for input support, sound, or even for the missing GLES2 shaders.

Call to ARM Management to Work with Open Source Developers

Luc Verhaegen claims “Absolutely nothing stops us now from delivering an open source driver that broadly matches the binary driver in performance! And this is exactly what we will be doing next!”, and calls upon ARM to join them:

We are not going away, we are here to stay. We cannot be silenced or stopped anymore, and we are becoming harder and harder to ignore.

It is only a matter of time before we produce an open source graphics driver stack which rivals your binary in performance. And that time is measured in weeks and months now. The requests from your own customers, for support for this open source stack, will only grow louder and louder.

So please, stop fighting us. Embrace us. Work with us. Your customers and shareholders will love you for it.

Open source developers are not the only ones to ask for this, if you’ve ever wanted to use Linux with proper 2D/3D GPU drivers on ARM, you are in the same boat, and even Linaro engineers complain about this (Linaro is an organization working on open source software for ARM SoCs, and ARM is obviously a core member), because those need to be updated for each kernel version, and it’s a nightmare as they have to go through the GPU company’s FAE which talks to the engineer and back. This wastes a lot of time (and money), as a task that could be done within a few hours/days with open source drivers, may instead take days or weeks because of binary blobs. An example is Linux Mali-400 support on Hardkernel ODROID-X/U2, they announced their intention to provide hardware GPU acceleration months ago, last month they released an Ubuntu image which can support GPU drivers (but not the driver), and they could only release the drivers yesterday (I’ll have to try that). The point is that it could have taken a much shorter time with open source drivers.

I understand there must be complicated legal issues, but there must certainly be a way to provide open source drivers, as it would just benefit everyone (from end users to engineers to SoC companies). Since Lima developers have now proven they can match the performance binary drivers for their “research” driver, and seem to be committed to deliver a proper open source driver for Mali-400, that should be a sufficient reason for ARM to cooperate with open source developers, even if it is only by releasing the GPU documentation.

Quake 3 Arena Demo Using Lima Driver is (Slightly) Faster than Mali-400 Binary Driver

February 7th, 2013 6 comments

As mentioned previously, Luc Verhaegen was to give a talk about the status of Lima driver (reverse-engineered Mali-200/400 GPU driver), as well as other GPU open source implementation, at FOSDEM 2013. This is now done, and part of the talk included a demo of Quake 3 Arena (q3a timedemo) running on tablet featuring AllWinner A10 SoC (Cortex A8 @ 1Ghz, Mali-400MP1 GPU @ 320 Mhz, and DDR3 memory @ 360MHz), and a 1024×600 LCD. The fact it works is already a great achievement in itself, but this demo runs at 47.2fps with Lima driver (limare), whereas it can be rendered at 46.2fps using the binary driver. In his blog, Luc also explains that apart from being 2% faster, it also uses 3% less cpu than the binary driver! Take that binary blobs!

There’s still more work to do however, as this Quake 3 Arena port is not playable yet for 2 reasons:

  1. There’s no input support via the touchscreen driver yet.
  2. Luc only included the shaders needed to run the timedemo, but the full game requires more shaders.

He goes on to explain that Lima is not fully open source just yet, as they are still using the binary shader compiler, but he will push Q3A demo source code soon. If you want to learn more of the steps he and others went through to reverse-engineer Mali-400 driver, and optimize it for Q3A timedemo, read “Quake 3 Arena timedemo on top of the lima driver!

Open Source Mali 200/400 Drivers (LIMA) Demo on Android Tablet

May 29th, 2012 No comments

Luc Verhaegen, the lead developer of LIMA open source project, provided an update at LinuxTag 2012 last week-end. This open-source MALI GPU driver isn’t ready for consumers yet, but the LIMA team has made some progress and showcased an OpenGL ES demos running on a Chinese tablet running Android. Luc said the tablet used for the demo is the same hardware as the Spark KDE/Vivaldi tablet, so the video demo below must be running on an AMLogic 8726-M processor with a Mali 400 GPU.

The drivers already (partially) work on both Mali-200 and Mali-400 GPUs. The fragment shader instructions set is fully known and they have disassembler and assembler fully implement, but they still need to work on the compiler. The vertex shader instruction set is 80% known, they have a simple shader disassembler and are working on the assembler.

You can also watch the 40 minute presentation at LinuxTag 2012 for more details on Mali-400 GPU,  the work required for reverse engineering GPUs, progress of the project and more. A demo (as shown above) with explanation for each part is also shown and it starts at 25:30.

If you have a device with a Mali 200 or Mali 400 GPU and feel adventurous, you can try the drivers and demo (Limare demo) yourself by using the code available at

Source: Phoronix

ARM Mali-200 and Mali-400 GPU Open Source Driver Released

February 10th, 2012 No comments

There has been a lot of controversy around GPU drivers and open source, as GPU drivers usually come with a blob (a binary file). If you have been lurking in Raspberry Pi forums you’ll know what I mean.

But this will change thanks to Lima. No, not the capital of Peru but the open source graphics driver for ARM Mali GPUs (Mali-200 and Mali-400) also called Lima whose goal is stated as follows:

The aim of this driver is to finally bring all the advantages of open source software to ARM SoC graphics drivers. Currently, the sole availability of binary drivers is increasing development and maintenance overhead, while also reducing portability, compatibility and limiting choice. Anyone who has dealt with GPU support on ARM, be it for a Linux with a GNU stack, or for an Android, knows the pain of dealing with these binaries. Lima is going to solve this for you, but some time is needed still to get there.

Yesterday, the Lima developers created a repository and pushed the current code to Lima’s gitorious project.

This is not a release in the sense of having a stable binary, but an alpha (beta?) source code release. As explained on Lima’s website:

The Lima driver currently only has some preliminary and highly experimental support. This experimental phase is necessary to gain a full and complete understanding of how the Mali GPUs work. Once more is known, an actual graphics driver (most likely based off of Mesa/Gallium) can be written.

The Lima driver is supported on the following ARM SoC:

  • AMLogic 8726-M – Single core Cortex A9 with Mali-400 found in many cheap Android Tablets.
  • Allwinner A10 – Cortex A8 with Mali-400 found in some cheap tablets and the upcoming RhombusTech low cost board.There is also a development board.
  • ST-Ericsson Novathor – Dual Core Cortex A9 with Mali 400. This processor is found in Snowball development board as well as one HTC Z710t smartphone  (Only available in China).
  • Samsung Exynos – Dual core Cortex A9 with Mali 400. It is used in high-end smartphones (E.g. Samgun Galaxy S II) and the Samsung Origen development board.
  • Telechips 8902 and 8803 – ARM11 and Cortex A8 SoC with Mali-200 found in many (older) cheap tablets.

If you are interested in conrtibution to the projects, you can reach the developers on irc on freenode in the #lima channel or by subscribing to the mailing list