Mali-450 support by lima

Could yoy please point what patch is missing? Didn’t found it.

Probably you should see these interrupts in your /proc/interrupts.

https://lwn.net/Articles/755084/

I suppose it’s address of virtual memory. My thought, @Ryder.Lee, @frank-w @LeXa2(as I know you support wifi code so you can be familiar with device drivers etc), and all others who may know: correct me if I wrong. So in my view lima driver communicates with it’s mmus thought its IRQ (GIC_SPI 171 in case of gpmmu) and so in case of Frank’s Irq renaming it was not found (by name) and initialization was skipped?

Also it uses mmus so should it use iommu? I remember larb3 in older versions. If so can dte write test fail be the result of iommu (driver, or dts) promlem?

Question about pmu, probably to @Ryder.Lee :

  1. Does lima driver tries to use arm-cpu’s pmu(which dts record was added relatively recent) or is it some mali internal ip like GP, PP, etc? Is it critical for device initialization?

  2. In a lot of other SoCs malis interrupts levels defined as HIGH, and in mt7623.dtsi it’s LOW. Why? :slight_smile:

I had tried renaming and then initialization was aborted because gpmmu (that was declared as needed) was no more found by its name…so i guess my old/current names are right. But i have no idea where the rootcause for write test is…

IRQs nums are ok, i didn’t looked into /proc/interrupts in 4.16-lima, but in 4.4-BSP kernel with arm’s mali kernel driver all irq numbers matches lima driver.4.4-interrupts.txt (9.1 КБ)

4.4 defines a additional regulator i’ve not seen in newer kernels (but maybe replaced by power domain)

I was unclear. I worked in your 4.16-lima and 4.16-hdmi-wlan. In defaultconfig is missing config_g3dsys and .dtsi missing Ryder suggested lines.

Yep, i mentioned about it Looks[quote=“eros, post:79, topic:5442”] .dtsi missing Ryder suggested lines [/quote]

That is the question. Does my latest lima branch misses Ryder suggested lines? If so what lines

Do you mean 4.4.70 bpi official kernel or what (link please if not). In 4.16 or 5.5-merged no such irqs in proc/interupts.

I thinked in proc/interupts first line is irq number but if it is 7.th then there is no conflict in 5.5-merged.

Have you idea why platform_get_irq_byname(pdev, name) returns irq numbers diffrent than .dtsi says (in 5.5-merged).

No there (in 5.5-merged) is 11 irq’s and names lima use. But platform_get_irq_byname() gives diffrent irq numbers vs mt7623.dtsi says. Any idea? (and forcing (platform_get_irq_byname()-44) in lima driver dosn’t work either.)

There is ofcourse question should there be 20 irqs because 11 uses only 1/2 of PP’s total up to eight.

what about irq-remapping (hardware-interrupts causing software interrupt)? so other id’s do not cause issue…any idea if the regulator is needed?

In official documents there is little information about mali, but some GPU power registers is opened. It may need power on before is usable. But I don’t know how to check such register value (and need to browse document, because search is not functional. It is in power section. Brr…)

search does not work if viewing in google docs

download it and open with pdf viewer :wink: but i’ve found nothing mali/lima/g3d related

Yes.

It’s because lima driver wasn’t initialized.

Only suggest: irq num in dts is a SoC hw interrupt/Soc pin/etc i.e. SoC internals, linux irq numbers is a linux internals. You can see - it may change ftom boot to boot.

Probably different init scheme, obsolete dts, i definetly didn’t added it to my lost worked lima :frowning: Did you find it’s description in dts? may be it was renamed or moved?

Found very first compiled kernel from my lima branch - doesn’t work - same gpmmu error.

BTW did anyone tried this kernel ? i’ve tried, it compiled successfully, but didn’t booted, at all

enter uImage-name: uImage-4.16-mt                                                                                                                                                                                                                   
kernelinput=uImage-4.16-mt                                                                                                                                                                                                                          
bootargs=board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200  root=/dev/sdb1 rootfstype=ext4 rootwait vmalloc=496M debug=7 initcall_debug=0 video=1920x1080 drm.debug=0x7                                                
5979198 bytes read in 295 ms (19.3 MiB/s)                                                                                                                                                                                                           
## Booting kernel from Legacy Image at 80200000 ...                                                                                                                                                                                                 
  Image Name:   Linux Kernel 4.16.0-rc5mediatek-                                                                                                                                                                                                   
  Image Type:   ARM Linux Kernel Image (uncompressed)                                                                                                                                                                                              
  Data Size:    5979134 Bytes = 5.7 MiB                                                                                                                                                                                                            
  Load Address: 80008000                                                                                                                                                                                                                           
  Entry Point:  80008000                                                                                                                                                                                                                           
  Verifying Checksum ... OK                                                                                                                                                                                                                        
  Loading Kernel Image ... OK                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                   
Starting kernel ...

Thats all… i used defconfig from my lima branch (with g3d enabled) anf Frank’s build script.

this looks like swap uart (put uart2 on top to be ttyS0) is missing. but you can try remove “console=ttyS0,115200” from your cmdline because alias to uart2 is set

Ok, i’ll try.

But a actually need it. :slight_smile: I have monitorless configuration. When monitor was connetted - it showed “No signal”

Yep now search work so it is easy to find:

bit num
5 GCPU_S        W_RST GCPU_SW_RST GCPU software reset
0: Not reset GCPU
1: Reset GCPU

0 GCPU_P        DN GCPU_PDN GCPU power down
0: keep original value
1: Power down GCPU

0 GCPU_P        DN GCPU_PDN GCPU clear power down
0: keep original value
1: clear power down GCPU

0 GCPU_P        DN GCPU_PDN GCPU power down
0: keep original value
1: Power down GCPU

Yep I did. Same result it don’t boot.

hdmi-driver will not be included in this setup, but alias (sorry choose+alias) should set uart2 as stdout

if you want to keep your cmdline, you have to move uart2 over uart0 (to be mapped as ttyS0) in mt7623.dtsi like in my kernels

you can install ssh-client on your system to have a backup-access (i guess you did it already)