#asahi-dev · 2023-11-24 17:08
eilnI don't think VP/PP interrupts at all considering CM3 polls a status register#asahi-dev · 2023-11-24 17:05
eilnI'm not a video codec expert (jannau is) but I haven't ran into much math stuff. it's mostly RTFM and figuring out bitfields#asahi-dev · 2023-11-24 17:02
eilnArcaneNibble: good to hear from you :) I don't even plan on using the coprocessor, let alone firmware#asahi-dev · 2023-11-24 17:02
eilnnicolas17: prores is an intra-only codec so people editing video can seek fast#asahi-dev · 2023-11-24 15:44
eilnyeah I'd guess so. you can run 'log show' grep AppleAVD#asahi-dev · 2023-11-24 15:40
eilnno. m1+s were "V4" in device tree#asahi-dev · 2023-11-24 15:37
eilnwho does that?#asahi-dev · 2023-11-24 15:36
eilnthere's viola, cactus, ixora, daisy, salvia, lilyd, radish, clover, lotus, tansy, clary, catnip, dahlia. not all are supported#asahi-dev · 2023-11-24 15:36
eiln*strings*#asahi-dev · 2023-11-24 15:36
eilnnicolas17: viola is j293 AVD (V3 in device tree). the revision codenames are all some weird plantae#asahi-dev · 2023-11-24 12:13
eilnleio: all dma-capable peripherals operate in iommu/dart space (all except gpu). we could double iommu-map the underlying page to do m2m or zero copy#asahi-dev · 2023-11-24 12:10
eilnawh they couldn't have outsourced their own codec#asahi-dev · 2023-11-24 11:59
eilnis that the same avd/ave/apr? intel macs shipped with imagination's decode IP, ave sucks enough that I trust it's the same one, but apr wasn't released until m1+s#asahi-dev · 2023-11-24 11:56
eilnit's not really a parallelizable task#asahi-dev · 2023-11-24 11:46
eilnactually none of them are even good enough for avd#asahi-dev · 2023-11-24 11:45
eilnnone of them are sufficient. prores is/was on my list too but they don't even list all the exotic pixel formats prores uses, let alone an api. but I found out not long ago that I don't have prores, wtf#asahi-dev · 2023-11-24 11:36
eilnI'd like to get ffmpeg hwaccel for scaling too (if that ever comes). meaning v4l2 should obviously have a generic api for it, one gst can make use of too.#asahi-dev · 2023-11-24 11:32
eilnI sent marcan an email about it#asahi-dev · 2023-11-24 11:32
eilnthat's what I meant by "reworking v4l2"#asahi-dev · 2023-11-24 11:24
eilnwe'll need to make an api for it, yes.#asahi-dev · 2023-11-24 11:23
eilnleio: colorspace converter and scaler. does a lot of stuff ranging from colorspace conversion, scaling (I'm not being sarcastic), pixel fills, tiling, up to AV1 film grain generation. up next on my list :D we'd need to completely rework V4L2 though#asahi-dev · 2023-11-24 11:21
eilnagain you need to adjust the offsets#asahi-dev · 2023-11-24 11:17
eilnalso emu is useless without the trace dumps#asahi-dev · 2023-11-24 11:17
eilnlog show --last 5m --info --debug#asahi-dev · 2023-11-24 11:15
eilnyes, the memory layout is different. not rewritten but it needs to be adjusted. soc and avd codename (from macos)?#asahi-dev · 2023-11-24 09:46
eilnedit: if macOS says "AVD version Viola" at boot it should work. but m1n1-side register offsets might differ per soc#asahi-dev · 2023-11-24 09:22
eilnydalton: cm3 firmware I wrote about here https://eiln.net/avd-notes.html posted another one last night too#asahi-dev · 2023-11-24 09:22
eiln*can't#asahi-dev · 2023-11-24 09:21
eilnfeel free to report j293ap bugs though. 4:2:2 chroma should work but the m1n1 code doesn't display nv16#asahi-dev · 2023-11-24 09:20
eilnonly tested j293ap#asahi-dev · 2023-11-24 09:20
eilnpython3 experiments/avd.py -i bad-apple.h264#asahi-dev · 2023-11-24 09:20
eilnffmpeg -i bad-apple.mp4 -c:v copy (or reencode libx264) bad-apple.h264#asahi-dev · 2023-11-24 09:19
eilnget my avd branch at https://github.com/eiln/m1n1.git and edit the sys.insert path at the top#asahi-dev · 2023-11-24 09:19
eilngit clone https://github.com/eiln/avd.git && make#asahi-dev · 2023-11-24 09:19
eilnnicolas17: re: bad apple#asahi-dev · 2023-11-24 09:19
eilnreading logs from eons ago#asahi-dev · 2023-11-19 23:55
eilnI have to go to $work in 5 minutes, will reply later tonight#asahi-dev · 2023-11-19 23:55
eilnWe could write a TF delegate backend too, though I'm thinking this is for more simpler kernels e.g. tanh (unary), matmul (binary). Should be a lot easier if it's already there :).#asahi-dev · 2023-11-19 23:55
eilnApple already has a (somewhat) developed ecosystem, and we have no problem running those Stable Diffusion models that Apple themselves compiled and released -- and I personally don't want to waste my compilation cache -- so I'm fine with some vendor-specific logic here.#asahi-dev · 2023-11-19 23:55
eilnWhen ANE support happens, the first feature will be the ability to run any pre-compiled CoreML model imported from macOS. This is easy for us because all we need to do is do the kernel-side submission dance e.g. IOMMU-mapping. CoreML support means we're forced to write a bespoke layer for Linux, but there's no other way here.#asahi-dev · 2023-11-19 23:55
eilnvery difficult to expose ANE as a generic compute node.#asahi-dev · 2023-11-19 23:55
eilnI'll admit my mind has been in video world and it's been some time since all this, but ANE is a FP16 MAC unit, it descended from the DSP block of the camera; it's basically ISP got out of hand. It can only do one thing -- and though it can do that one thing pretty efficiently -- it's in turn extremely inflexible and opinionated. As much as I'd like to, hardware limitations make it#asahi-dev · 2023-11-19 23:55
eilneric_engestrom: I haven't seen that PR actually, thank you for the link :)#asahi-dev · 2023-10-16 16:32
eilnit doesn't seem like there's a public videotoolbox api, but I don't know why there would be two hal revisions (sitting in the kernel for a year+) for something unreleased#asahi-dev · 2023-10-16 15:52
eilnactually I think all this is glue in effort to unify the entry point#asahi-dev · 2023-10-16 15:49
eilnit's a hassle to switch to the vp9 branch rn but the firmware ran the identical interrupt handler. I poked it myself and got it working with the same register layout too. it seems to be their "unified codec" model hence the kernel handles all the syntax parsing / mgmt stuff#asahi-dev · 2023-10-16 15:44
eilnthe firmware doesn't do much codec specifc. it kinda just pipes the kext-given decode stream, albeit really overcomplicatedly#asahi-dev · 2023-10-16 15:44
eilnI don't even know which codenames are which outside of mine (j293ap "viola")#asahi-dev · 2023-10-16 15:44
eilneither way things do not work without it#asahi-dev · 2023-10-16 15:44
eilnref_pic_list_modification_flag_l0 I would guess it's to adjust pic_num. weirdly when a frame is unrefed the pic_nums in the reflist get shifted to 0, hence the i = list(fmt.ref_map.keys()).index(lst.fn)