I’ve replaced lima driver in my 4.16-lima with one from mediatek tree - works and boots (with my config and original dts).
lima-4.16 mt.txt (45.9 КБ)
Idk why, but this driver tries to init lima twice:
[ 1.218185] INFO@lima_mediatek_init 67 err = -517
[ 1.222906] lima 13040000.gpu: soc init fail -517
[ 1.227582] lima 13040000.gpu: Fatal error during GPU init
[ 1.240971] loop: module loaded
[ 1.244353] [WMT-DETECT][I]wmt_detect_driver_init:driver(major 154) installed success
[ 1.252210] [SDIO-DETECT][I]sdio_detect_init:sdio_register_driver() ret=0
............................
[ 2.730001] [drm] Initialized mediatek 1.0.0 20150513 for 14000000.dispsys on minor 0
[ 2.738229] lima 13040000.gpu: Unbalanced pm_runtime_enable!
[ 2.743989] INFO@lima_mediatek_init 67 err = 0
[ 2.748443] lima 13040000.gpu: bus rate = 500500000
[ 2.753315] lima 13040000.gpu: mod rate = 500500000
[ 2.758517] lima 13040000.gpu: found 3 PPs
[ 2.762648] lima 13040000.gpu: fail to get irq pmu
[ 2.767410] lima 13040000.gpu: no PMU present
[ 2.771761] lima 13040000.gpu: dlbu 0 0
[ 2.775600] lima 13040000.gpu: bcast 0 0
[ 2.779502] lima 13040000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus
[ 2.787745] lima 13040000.gpu: gp - mali450 version major 0 minor 0
[ 2.794218] lima 13040000.gpu: l2 cache 128K, 4-way, 64byte cache line, 128bit external bus
[ 2.802650] lima 13040000.gpu: pp0 - mali450 version major 0 minor 0
[ 2.809069] lima 13040000.gpu: pp1 - mali450 version major 0 minor 0
[ 2.815513] lima 13040000.gpu: pp2 - mali450 version major 0 minor 0
First - failed, second successfull.
bpi-r2-gentoo ~ # ls -la /dev/dri/
итого 0
drwxr-xr-x 3 root root 120 дек 31 16:00 .
drwxr-xr-x 13 root root 13520 дек 31 16:00 ..
drwxr-xr-x 2 root root 100 дек 31 16:00 by-path
crw-rw---- 1 root video 226, 0 дек 31 16:00 card0
crw-rw---- 1 root video 226, 1 дек 31 16:00 card1
crw-rw-rw- 1 root render 226, 128 дек 31 16:00 renderD128
bpi-r2-gentoo ~ #
UPD: dmesg with original lima - just in case.lima-4.16 orig.txt (45.3 КБ)
UPD2: all chandes commited to https://github.com/d3adme4t/BPI-R2-4.14/tree/4.16-lima-mt hope didn’t miss anything.
dtsi is modified, but looks like it doesn’t affect on results, and my config.txt (145.8 КБ)