#
✕ nick:sofus
#asahi-dev · 2026-06-17 08:39
sofusyeah, i have my theories, but i cant be sure
#asahi-dev · 2026-06-17 08:37
sofusif that means what i think it does, supporting m3 and up should not be hard
#asahi-dev · 2026-06-17 08:37
sofusin the device tree, the base m1 is the only one with avd-version = 3, all others have 4
#asahi-dev · 2026-06-17 08:33
sofusSobek[m]: avd - apple video decoding
#asahi-dev · 2026-06-17 08:08
sofusthe driver is not smart about resets, so if an error happens while multiple things are decoding they all fail
#asahi-dev · 2026-06-17 08:06
sofuschadmed: yes, im gonna clean it up soon
#asahi-dev · 2026-06-17 08:05
sofusmacos for reference: https://pastebin.com/bmsHbPyb
#asahi-dev · 2026-06-17 08:05
sofuschaos_princess: yes https://pastebin.com/7m7T1cF0
#asahi-dev · 2026-06-17 07:59
sofusi found https://github.com/ArcaneNibble/m1n1/blob/avd/proxyclient/m1n1/hw/avd.py which has names for most of the registers on m2
#asahi-dev · 2026-06-17 07:55
sofusim pretty sure its tunatables, i dont like it either.
#asahi-dev · 2026-06-17 07:49
sofusbut also kinda not, the linux driver only recieves from it
#asahi-dev · 2026-06-17 07:48
sofusah okay, i guess its basicly a shim
#asahi-dev · 2026-06-17 07:42
sofusdriver: https://github.com/sofus13/linux/tree/avd
#asahi-dev · 2026-06-17 07:41
sofusnot entirely sure what shim is, the fw does a few register writes and forwards irq's
#asahi-dev · 2026-06-17 07:38
sofusyou can get the firmware here https://github.com/sofus13/avd-fw.git run make (use VERSION=2 for M1) and copy to the vendor/apple firmware path
#asahi-dev · 2026-06-17 07:37
sofusanyone with an m1/m2 willing to test my avd driver? Fair warning: it might cause a system freeze
#asahi-dev · 2026-06-06 17:20
sofush264 is mostly complete, im planning to do h265 next
#asahi-dev · 2026-06-06 17:20
sofuscurrent avd progress https://github.com/sofus13/linux/tree/avd
#asahi-dev · 2026-06-02 13:51
sofuskinda, but worse, i exported the pm functions and call them
#asahi-dev · 2026-06-02 12:22
sofusThanks for the help, made an ugly hack that works for now :)
#asahi-dev · 2026-06-02 11:48
sofusOkay, i think i understand now thanks
#asahi-dev · 2026-06-02 11:45
sofusexample: (NO TTBR FOR IOVA) at 0x0
#asahi-dev · 2026-06-02 11:45
sofusIm not sure if its relevant that i can do iommu_iova_to_phys on the same addres and that works? Also its on any address i send it
#asahi-dev · 2026-06-02 11:33
sofusi dont know alot about the dart. But is it not possible to reinitialize the dart? I dont think i need the state
#asahi-dev · 2026-06-02 11:31
sofusha, i hope thats not necessary
#asahi-dev · 2026-06-02 11:30
sofuschadmed: maybe im doing something wrong idk.
#asahi-dev · 2026-06-02 11:25
sofuscan i restart the dart somehow?
#asahi-dev · 2026-06-02 11:24
sofuschadmed: yes, it works... sometimes, i asume it depends on the error
#asahi-dev · 2026-06-02 11:22
sofusjannau: i dont think i can reset if the device is suspended?
#asahi-dev · 2026-06-02 11:12
sofusi have ps_avd_sys for dart, pmp_report_avd_sys for avd and ps_avd_sys for the reset control
#asahi-dev · 2026-06-02 11:10
sofusim using reset_control_reset
#asahi-dev · 2026-06-02 11:10
sofuschadmed: im not sure theres another way to clear hw faults
#asahi-dev · 2026-06-02 11:08
sofusjannau: im not sure what you mean by videobuf address. Its the address with bitsream slice data
#asahi-dev · 2026-06-02 11:07
sofuschaos_princess: im not sure? The fault first clears after i restart my computer
#asahi-dev · 2026-06-02 11:06
sofusi reset through pmgr, the pmgr-pwrstate thing
#asahi-dev · 2026-06-02 11:04
sofuschaos_princess: an example: 0x1fffe880000, its the address i get from v4l2 so it changes each time
#asahi-dev · 2026-06-02 11:03
sofuschaos_princess: the fault is also on stream 0
#asahi-dev · 2026-06-02 11:02
sofuschadmed: no sorry, i was gonna clean up soon and publish it
#asahi-dev · 2026-06-02 11:01
sofuschaos_princess: no im always using 0.
#asahi-dev · 2026-06-02 11:00
sofuslinux driver, and yes
#asahi-dev · 2026-06-02 10:58
sofusim not sure, it works until i reset the device.
#asahi-dev · 2026-06-02 10:54
sofusafter resseting avd i get TTBR iommu translation faults, im not sure what im doing wrong. Can anybody help?
#asahi-dev · 2026-05-30 10:25
sofusdruz: i dont think so. h264 is _mostly_ complete
#asahi-dev · 2026-05-28 09:09
sofusleio: ha that actually makes sense! I have used verisilicon as reference (and copied a lot), i will look into rockchip also, thanks!
#asahi-dev · 2026-05-28 09:07
sofusI will need to look into a few more things before i have a real answer
#asahi-dev · 2026-05-28 09:04
sofusI would rather do it on the cm3, but i need to look more into the other codecs before i know if its possible
#asahi-dev · 2026-05-28 09:00
sofuschaos_princess: no, but i think at some point (when everything works), offloading work to the cm3 is a good idea. And i dont think the instruction stream generation belongs in the kernel
#asahi-dev · 2026-05-28 08:53
sofusim talking about writing our own firmware for the cm3 if it was not clear
#asahi-dev · 2026-05-28 08:49
sofuschaos_princess: thats what im doing right now
#asahi-dev · 2026-05-28 08:49
sofuschaos_princess: im not sure

plus ›