Project

General

Profile

GraphicsResearch » History » Version 16

Jeremy Rand, 11/02/2017 06:12 AM
Added link to Qiang Yu's Mali-400 driver

1 1 Wolfgang Wiedmeyer
h1. Research on free graphics-related software
2
3 12 Wolfgang Wiedmeyer
{{>toc}}
4
5 5 Wolfgang Wiedmeyer
On this page, information is collected that could help solving graphics issues in Replicant (see #1539). Besides evaluating free implementations that are relevant for currently supported devices, other implementations should also be listed if they are useful for potential future target devices.
6 1 Wolfgang Wiedmeyer
7 8 Wolfgang Wiedmeyer
external resources:
8
"Wikipedia":https://en.wikipedia.org/wiki/Free_and_open-source_graphics_device_driver
9 13 Wolfgang Wiedmeyer
"Debian Mobile":https://wiki.debian.org/Mobile#Drivers
10 8 Wolfgang Wiedmeyer
11 1 Wolfgang Wiedmeyer
h2. Software rendering
12
13 7 Wolfgang Wiedmeyer
Software rendering uses the CPU and not a dedicated graphics processor for graphics rendering. It is slower than per-GPU implementations and is usually used when it is not possible to make use of the GPU. An advantage is that the same software renderer can work across many different types of hardware, so working on improving a software renderer benefits many different devices, regardless of the SOC and graphics unit that is used. Furthermore, a software renderer doesn't require a kernel driver which makes it easier to work on mainline Linux kernel support for a device until the graphics driver is in mainline.
14 2 Wolfgang Wiedmeyer
15 1 Wolfgang Wiedmeyer
h3. Android software renderer
16 2 Wolfgang Wiedmeyer
17 14 Wolfgang Wiedmeyer
source code: https://git.replicant.us/replicant/frameworks_native/tree/opengl/libagl
18 2 Wolfgang Wiedmeyer
19
The Android software renderer is currently used on all Replicant-supported devices and it is the fastest software renderer that is available for Replicant devices. It is a software renderer that was developed specifically for Android and it is part of the AOSP source code. The renderer includes optimizations for ARM. Development ceased in 2013 and no work was done to support newer GLES versions (which causes #705).
20
21
Until ca. 2011 (Android 4.0), another library with the name @libagl2@ existed and @surfaceflinger2@ was developed based on Mesa. The source code was later removed and no further development is known. At the time, the work was done to support a newer GLES version for the software renderer, but it was abandoned later. It is questionable if it is worth it to port the old @libagl2@ library to a recent Replicant version, also given that we would be the only ones using and maintaining the code.
22 1 Wolfgang Wiedmeyer
23
h3. llvmpipe
24
25 3 Wolfgang Wiedmeyer
source code in Replicant: https://git.replicant.us/replicant/external_mesa3d
26
documentation: https://www.mesa3d.org/llvmpipe.html
27
28 4 Wolfgang Wiedmeyer
For the needs in Replicant, llvmpipe has an EGL implementation that is complete enough. But some apps don't work due to minor bugs which seem fixable or which might already be fixed in more recent upstream versions. swrast is of no interest as it is slower than llvmpipe.
29 3 Wolfgang Wiedmeyer
30
The "Android-x86  project":http://www.android-x86.org/ is using llvmpipe and quite a few of their Android-specific frameworks patches are applied in Replicant 6.0. Their Mesa source code fork is also used in Replicant 6.0. A lot of porting work of llvmpipe to Android was done by Jide while Intel is contributing as well. So there is an interest from different parties to have llvmpipe working on Android. Android patches are upstreamed to mainline Mesa.
31
32
However, llvmpipe is still not ported to ARM which makes it slow. Also for Android, it is mostly used on the x86 platform in other projects. See #705 for more information. Optimizing llvmpipe for ARM seems currently the most promising approach to fix graphics-related issues with Replicant.
33
34 1 Wolfgang Wiedmeyer
h3. SwiftShader
35 3 Wolfgang Wiedmeyer
36
source code: https://swiftshader.googlesource.com/SwiftShader
37
38 4 Wolfgang Wiedmeyer
"Google released SwiftShader as free software in mid 2016":https://blog.chromium.org/2016/06/universal-rendering-with-swiftshader.html. It seems to only target x86 and is used in the Chromium project. It is unclear how it exactly compares to lllvmipe, but considering its current use cases which are vastly different than ours, it doesn't look more promising than llvmpipe. It doesn't seem to be adapted by other projects yet, including Android-x86.
39 1 Wolfgang Wiedmeyer
40
h2. Per-GPU implementations
41
42 9 Wolfgang Wiedmeyer
In the following, free software implementations are listed that should make it possible to use the respective GPU with free software.
43 1 Wolfgang Wiedmeyer
44 7 Wolfgang Wiedmeyer
h3. ARM Mali and Lima
45
46 1 Wolfgang Wiedmeyer
supported devices that use Mali 400: Galaxy S 2, Galaxy S 3, Galaxy S 3 4G, Galaxy Note, Galaxy Note 2
47 7 Wolfgang Wiedmeyer
48
project page: https://limadriver.org/
49
50
Lima is not yet a working driver and cannot be used in Replicant. There was no significant development since 2014 and the original developers have stopped working on the project. "Luc's FOSDEM 2014 talk":https://archive.fosdem.org/2014/schedule/event/lima_driver/ provided the latest update on the project.
51 1 Wolfgang Wiedmeyer
52 16 Jeremy Rand
Phoronix "reports":https://www.phoronix.com/scan.php?page=news_item&px=Mali-400-New-Open-Source that Qiang Yu from AMD has started a new "free Mali-400 driver":https://github.com/yuq/mesa-lima.  Development seems to be active as of October 2017.
53
54 1 Wolfgang Wiedmeyer
h3. Imagination PowerVR
55
56
supported devices that use PowerVR SGX540: Nexus S, Galaxy S, Galaxy Nexus, Galaxy Tab 2 7.0, Galaxy Tab 2 10.1
57 5 Wolfgang Wiedmeyer
supported devices that use PowerVR SGX530: GTA04
58 8 Wolfgang Wiedmeyer
59
A reverse-engineering project exists:
60 10 Wolfgang Wiedmeyer
"website":http://powervr.gnu.org.ve/doku.php
61
"mailing list":http://listas.gnu.org.ve/listinfo/powervr-devel
62 8 Wolfgang Wiedmeyer
"Libreplanet group":https://libreplanet.org/wiki/Group:PowerVR_drivers
63
64 11 Wolfgang Wiedmeyer
Despite initial reverse-engineering progress until 2013, no further development updates seem to be available. The project website provides documentation.
65 1 Wolfgang Wiedmeyer
66 9 Wolfgang Wiedmeyer
h3. Qualcomm Adreno and freedreno
67 1 Wolfgang Wiedmeyer
68
not used by a supported device
69 9 Wolfgang Wiedmeyer
70
wiki: https://github.com/freedreno/freedreno/wiki
71
72
freedreno is actively developed. Linux kernel component is available in mainline since version 3.12. It needs to be investigated how well freedreno could work on potential target devices. However, even when using freedreno, non-free firmware is very likely still needed.
73
74
Generally speaking, Qualcomm devices have a lot of blobs and no modem isolation which is the reason why no Qualcomm-based device is yet supported by Replicant. See [[TargetsEvaluation]] for some analysis. We have not yet identified a Qualcomm-based device that would be a promising target for Replicant and where freedreno could be used on.
75 15 Wolfgang Wiedmeyer
76
h3. Vivante GCxxxx and Etnaviv
77
78
not used by a supported device
79
80
For some Vivante GCxxxx GPU variants, a free driver, Etnaviv, exists. See "wikipedia":https://en.wikipedia.org/wiki/Free_and_open-source_graphics_device_driver#Vivante for some details. It would be interesting to investigate devices using such a GPU if they would be good Replicant targets. It also needs to be checked if non-free firmware needs to be loaded to the GPU.