Project

General

Profile

GraphicsReplicant11 » History » Version 14

dl lud, 09/01/2019 10:06 PM
Increased man-hours for Skia vs HWUI task to take into account the time spent finding and testing all other system props.

1 1 dl lud
h1. Graphics on Replicant 9
2 2 dl lud
3
This page documents the current progress and future plans for the graphics acceleration on Replicant 9. The original plan can be found at [[TasksFunding#Graphics-acceleration]]. Since then, through more in depth research and hands-on experience, several things have diverged.
4
5
Background information, as well as details on the software components and acronyms used on this document, can be found at [[GraphicsResearch]].
6 3 dl lud
7
h2. Graphics stack tasks
8
9
|_. status |_. origin |_. short description |_. notes |_. estimated man-hours |_. actual man-hours |
10 6 dl lud
| done | original plan | Set up the development environment. | Required: i9305 phones, LXC Trisquel container (systemd nspawn fails due to old systemd on Trisquel 8), larger SSDs, 1.8V serial-USB adapters (BS101P FT232RL) plus makeshift resistors' banks. |>. 24 |>. 24 |
11 3 dl lud
| ongoing | original plan | Read graphics related AOSP documentation. | Never-ending task that, besides actual documentation, involves scouring through source-code, bug trackers, mailing lists and IRC logs. |>. 16 |>. 40 |
12 8 dl lud
| ongoing | new | Ask for help. | Bothering free-software developers[1] that have experience with or contribute to graphics sub-systems has been the most fruitful way to clear most roadblocks. |>. 0 |>. 0 |
13 1 dl lud
| done | original plan | Use Mesa's llvmpipe backend instead of softpipe. | Merge requests on Mesa: "!1402":https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1402 and "!1403":https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1403. There was no need to update LLVM version. |>. 40 |>. 28 |
14 12 dl lud
| ongoing | new | Use Mesa's kms_swrast driver with drm/exynos. | Solved with a "simple hack":https://git.replicant.us/contrib/replicant-9/external_mesa3d/commit/?id=e0a5e6c056c8281712bf6366acfe876215992613.
15
TODO: make it more generic and send upstream.
16 8 dl lud
Perhaps have the if clause read a list of additional drivers that would be supplied at compile time. |>. 0 |>. 4 |
17 4 dl lud
| todo | original plan | Implement the missing pixel formats in drm/exynos. | |>. 72 |>. 0 |
18
| todo | new | Get entire stack to use RGB555 pixel format. | Had a huge performance boost on Replicant 6. |>. 0 |>. 0 |
19
| ongoing | original plan | Proper way to use DRM-Master and DRM-Auth with gbm_gralloc and drm_hwcomposer. | Tried:
20
1. "Auth hack":https://git.replicant.us/contrib/GNUtoo/kernel_replicant_linux/commit/?h=history/lineage-16.0_i9300&id=e0f327c553befec2d367ac9a5ebef29b4291187a (both on @/dev/dri/card0@)
21
2. "vGEM":https://git.replicant.us/contrib/replicant-9/kernel_replicant_linux/commit/?id=29fab049bea6a17e5f85ccb147df0e0046bbd487 (gbm gralloc on @/dev/dri/card1@) - Requires memory sync between vGEM and exynos. gbm gralloc cannot take advantage of exynos hardware planes.
22 1 dl lud
3. "Allow dumb buffers on render node":https://git.replicant.us/contrib/replicant-9/kernel_replicant_linux/commit/?id=805cc511ee2adc62ae40c4253fb8d378c3710a81 (gbm gralloc on @/dev/dri/renderD128@) - Dumb buffers are used for scanout. Should not be created on a render node.
23 6 dl lud
 
24 5 dl lud
Correct solution is using DRM Magic and have both on @/dev/dri/card0@. |>. 40 |>. 4 |
25 9 dl lud
| ongoing | new | Use hardware planes for better composer performance. | Enabling HW planes with drm_hwcomposer was straightforward but led to severe graphics corruption.
26
"Disabling devfreq":https://git.replicant.us/contrib/replicant-9/kernel_replicant_linux/commit/?id=90ceab148872e9515522c5150df16722822cf9d5 fixed the corruption. Tentative explanation: display controller frequency gets too low for timely DMA transfer of overlays.
27
"Reported upstream.":https://www.spinics.net/lists/linux-samsung-soc/msg66752.html TODO: lock display controller frequencies through sysfs and re-enable devfreq. |>. 0 |>. 16 |
28 10 dl lud
| ongoing | new | Use Skia instead of HWUI to render the Canvas. | Unlike Replicant 6, none of the usual system props (e.g. @ro.kernel.qemu=1@, @ro.config.avoid gfx accel=1@) would yield the expected performance.
29
Got there by forcing "@hardwareAccelerated=false@":https://git.replicant.us/contrib/replicant-9/frameworks_base/commit/?h=replicant-9&id=da9bab529acdb0bf5a0cbf3ac1962ca57fb6b5d7 on all apps.
30 14 dl lud
TODO: turn this dirty hack into a system property that can be toggled on the device tree. |>. 0 |>. 22 |
31 1 dl lud
| ongoing | original plan | Create test scenarios and check if the graphics stack works as expected. | Testing has been done manually with the default apps. TODO: use apps that specifically require GLES 2.0 (e.g. Firefox-based browsers). |>. 40 |>. 10 |
32 12 dl lud
| abandoned | original plan | Make the graphics stack work with vGEM driver besides drm/exynos. | No need. All Replicant targets have a display and, likely, a companion display controller with a fitting drm driver too. Most drm drivers expose a render node that Mesa can use. Better use that instead of vGEM. |>. 40 |>. 0 |
33 13 dl lud
| ongoing | original plan | Document the design decisions. | Done at this wiki page plus the presentation at [[ContributorsMeetingJuly2019#Presentations]]. |>. 16 |>. 58 |
34 1 dl lud
35 4 dl lud
fn1. A big thanks to Joonas Kylmälä, Paul Kocialkowski, Andrés Domínguez, Denis Carikli, Mauro Rossi, Emil Velikov, Andrzej Hajda, Marek Szyprowski and LiquidAcid.