I’ll see if I can come up with a process but it’s quite convoluted - a linux system capable of cross compiling your kernel is a good starting place.
I can certainly post my meson script, xorg.conf etc and the changes needed to mesa - I’ll see if I can put together a little script that will apply the patches and build binaries but there were an awful lot of build dependencies for mesa and I didn’t keep track of what was needed - just installed on a per error basis.
really, now that lima is working on the R2? the changes should be put into MESA - I’m struggling with bandwidth atm but I’ll chase it up.
This one would be useful please. The prereq of linux system with cross-toolchain that is able to compile the kernel for the target system IMHO is pretty much a bare minimum basic thing anyone would have to setup in order to be able to do anything related to things that are discussed in this thread.
Hello I cloned Alex 4.16 lima sources & compiled but gpu dosn’t find. dmesg says:
[ 1.238101] lima 13040000.gpu: get core clk failed -517
[ 1.243393] lima 13040000.gpu: clk init fail -517
[ 1.248067] lima 13040000.gpu: Fatal error during GPU init
I tryed add two (missing?) irq lines to dtsi as Ryder suggest but that don’t help, lima dosn’t detect gpu.
@DeadMeat what modifications are needed to your sources that lima detects gpu??
You send dmesg where gpu is detected:
[ 8.492918] lima 13040000.gpu: bus rate = 500500000
[ 8.492930] lima 13040000.gpu: mod rate = 500500000
[ 8.493292] [TTM] Zone kernel: Available graphics memory: 248738 kiB
Is this clip from your 4.16 lima sources or somewhere else?
Hi, ERos, as i remember it should be in my github repo. I can try to recompile and test it, but it doesn’t work.
As i remember it was an attempt to backport driver from 4.17-lima, and it wasn’t successfull.
P.S. I didn’t tried other branches, but if lima driver is in mailine kernel i suppose we shold dig into dts and/or these patchworks Mali-450 support by lima
I’ve tried to add lima related dts notes to 5.5-merged branch, and got
bpi-r2-gentoo ~ # dmesg | grep lima
[ 5.401118] lima 13040000.gpu: IRQ pmu not found
[ 5.405833] lima 13040000.gpu: mmu gpmmu dte write test fail
[ 5.452399] lima: probe of 13040000.gpu failed with error -5
Probably i’ve missed something obvious, did someone tried 5.3-lima?
this notes
with this changes:
Result is pretty same as in 5.3-lima dts
UPD:
Found a pmu definition in dts in my 4.16-lima branch, I’ll try to merge it into 5.5 dts.
Hello I tryed add it your 4.16-hdmi-wlan branch (it was linked to your previous post so I used it). It + Ryder Lee dtsi lines helps lot:
[ 1.240235] lima 13040000.gpu: bus rate = 500500000
[ 1.245187] lima 13040000.gpu: mod rate = 500500000
[ 1.273238] lima 13040000.gpu: mmu gpmmu dte write test fail
[ 1.299309] lima 13040000.gpu: ttm finalized
[ 1.303579] lima 13040000.gpu: Fatal error during GPU init
[ 1.309151] lima: probe of 13040000.gpu failed with error -5
I’ll go your 4.16-lima branch and check it. I compile on board so it take some hours…
In your 4.16-hdimi-wlan there is severe error:
[ 2218.732011] print_req_error: I/O error, dev sda, sector 219166976
[ 2218.732013] print_req_error: I/O error, dev sda, sector 256491464
[ 2218.732019] EXT4-fs warning (device sda2): ext4_end_bio:323: I/O error 10 writing to inode 6579236 (offset 0 size 131072 starting block 27395904)
[ 2218.732335] EXT4-fs error (device sda2): ext4_find_entry:1437: inode #7484437: comm make: reading directory lblock 0
[ 2218.732664] sd 0:0:0:0: [sda] tag#8 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
[ 2218.732683] Buffer I/O error on dev sda2, logical block 0, lost sync page write
need to boot 4.19 and do fsck & continue compiling
As we are currently hang on dts you can use nodt kernel and separate dtb…then you need to compile dtb only and also only replace it.
here is my way of booting kernel+separate dtb (see bootall above):
you set “kernel” in uEnv.txt to your nodt-kernel and “fdt” to your dtb (in subfolder “dtb”). then call newboot2. if you use my uboot, newboot2 should exist. there is also an “askboot” which lists kernels and dtb’s and let you enter the one you want
Can you share it? I can’t find it in 4.16-lima or 4.16-hdmi-wlan branches. Where I should search and what?
I just noticed that I have apply only half of Ryder lines, adding only 178&179 irq’s is enough to generate some lima lines in dmesg can be also config g3dsys. When add irq-names 11pcs like Ryder suggest it dosn’t affect, same lima lines in dmesg.
It seems still need some gpmmu data:
lima 13040000.gpu: mmu gpmmu dte write test fail
btw your 4.16-lima have something issues in network. wan dosn’t work. I’ll do tests in your 4.16-hdmi-wlan branch. Both of your default branches missing Ryder patch lines & config_g3dsys. Them need to be add by hand… Maybe you can update your repo liitle??
Edit:
Hmm, Ryder 11 irq-names in 4.16-hdmi-wlan make now some effect:
[ 1.241661] lima 13040000.gpu: bus rate = 500500000
[ 1.246613] lima 13040000.gpu: mod rate = 500500000
[ 1.295041] lima 13040000.gpu: ttm finalized
[ 1.299297] lima 13040000.gpu: Fatal error during GPU init
Need some more debug parameters. It dosn’t tell what is wrong.
There is also this in 4.16-hdmi-wlan:
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@bpi-r2:~# dmesg | grep lima
[ 0.000000] Linux version 5.4.12-bpi-r2-lima (frank@frank-G5) (gcc version 80
[ 5.299692] lima 13040000.gpu: IRQ pmu not found
[ 5.304416] lima 13040000.gpu: mmu gpmmu dte write test fail
[ 5.351019] lima: probe of 13040000.gpu failed with error -5
pmu error is still there and additional gpmmu, but i don’t see the probe-error/write-test fail
only these lines:
root@bpi-r2:~# dmesg | grep lima
[ 0.000000] Linux version 5.4.12-bpi-r2-lima (frank@frank-G5) (gcc version 80
[ 5.302612] lima 13040000.gpu: IRQ pmu not found
[ 5.307253] lima 13040000.gpu: IRQ gpmmu not found
so i guess it’s probed successfully…how can i verify it is working?
I think it is not functional. It should do /dev/mali (?not sure?) and drop lines from L1 cache, memory amount etc. See 4.th post in this thread…
In my compiled Alex 4.16-hdmi-wlan it give:
[ 1.254974] lima 13040000.gpu: bus rate = 500500000
[ 1.259835] lima 13040000.gpu: mod rate = 500500000
[ 1.308294] lima 13040000.gpu: ttm finalized
[ 1.312567] lima 13040000.gpu: Fatal error during GPU init
So I need to increase lima debug or add some printk lines to get info after ttm finalization error. Now busy this evening.
These may apply easilly to 4.19 tree 5.4 things may change lot??
For your error think there are irq names changed in 5.4 so need to rename them as 5.4 lima driver like…?
Edit:
It should run 26 times and look that string end comes from lima_ip_id. Used to search correct IRQ line if I understand correct (?)
from debug dmesg:
[ 1.321755] lima 13040000.gpu: iomem stop
[ 1.325844] lima 13040000.gpu: ip_num for start 26
[ 1.330601] lima offset stop 8192 , 0
[ 1.334347] lima pdev desc pmu
[ 1.337386] lima irq_byname -6
[ 1.340420] lima 13040000.gpu: init_ip stop 0
[ 1.344759] lima offset stop 12288 , 1
[ 1.348566] lima pdev desc gpmmu
[ 1.351771] lima irq_byname -6
[ 1.354818] lima 13040000.gpu: init_ip stop -6
[ 1.379631] lima 13040000.gpu: ttm finalized
[ 1.383902] lima 13040000.gpu: Fatal error during GPU init
Dosn’t look good, it don’t find correct IRQ names so maybe back dtsi to Ryder irq names. I think they are not correct for that lima driver. Need to look platform_get_irq_byname function it may give some help how to name irq’s…
Have not yet idea, it come from “enum” whatever it is…
Edit:
It is intresting that lima is only occurence in whole kernel where:
err = platform_get_irq_byname(dev->pdev, desc->irq_name);
Common way is to ask function like this:
irq_de = platform_get_irq_byname(pdev, “DE”);
So what happens if dev->pdev is substituted to normal pdev…? Ok, it dosn’t compile…
I wipe out Ryder irq names and put your 11 irq names and now it go diffrent - to point where you were 5hrs ago… So it now got functional(?) irq but runs gpmmu test and fail it.
[ 1.326091] lima 13040000.gpu: ip_num for start 26
[ 1.330850] lima offset stop 8192 , 0
[ 1.334605] lima pdev desc pmu
[ 1.337648] lima irq_byname -6
[ 1.340687] lima 13040000.gpu: init_ip stop 0
[ 1.345031] lima offset stop 12288 , 1
[ 1.348841] lima pdev desc gpmmu
[ 1.352122] lima irq_byname 229
[ 1.355251] lima 13040000.gpu: mmu gpmmu dte write test fail
[ 1.360875] lima 13040000.gpu: init_ip stop -5
[ 1.385847] lima 13040000.gpu: ttm finalized
Asked how increase debug. Simpy put printk(“lima: hello world”); lines or something…
I think it should normally run out first return 0 and newer to go CAFEBABE branch…
if (ip->id == lima_ip_ppmmu_bcast)
return 0;
mmu_write(LIMA_MMU_DTE_ADDR, 0xCAFEBABE);
if (mmu_read(LIMA_MMU_DTE_ADDR) != 0xCAFEB000) {
dev_err(dev->dev, "mmu %s dte write test fail\n", lima_ip_name(ip));
return -EIO;
}
Maybe 0xCAFEB000 should be 0xCAFEBABE or both some save address to use?
But untested situation I think, not to wise use that codepiece?