#
✕ nick:eiln
#asahi-dev · 2023-10-16 15:44
eilnmmco L0 ST unref signal is [0x2de04201, 0x2df0ffff]. it's not managing the lists itself, it's to signal that *we* did
#asahi-dev · 2023-10-16 15:43
eilnjanneg: I worded that terribly, pushed a fix. 2/6 revisions support AV1, mine is not one of them. 12.5 has them, so those two have been there for a while.
#asahi-dev · 2023-10-16 10:08
eilnjanneg: it sends a lot more than I thought. but we still need a couple more e.g. ref_pic_list_modification_flag_l0 and some not in spec e.g. counter from last I slice. I don't know if I trust myself to do all this in the kernel though, iova allocations and all
#asahi-dev · 2023-10-16 08:59
eilncurrently writing python bindings around ffmpeg/h264bitstream because my current attempted backend is showing its limits
#asahi-dev · 2023-10-16 08:59
eilnhow should we go about this in v4l2
#asahi-dev · 2023-10-16 08:59
eilnwe basically hand it off at the macroblocks. it's not just parsing headers, we have actively manage state, including reference lists which it is particularly picky about
#asahi-dev · 2023-10-16 08:59
eilnjanneg: decode stream skeleton https://pastebin.com/ZxRyPRPm. this generates a decode stream for a trivial 30sec test video, though output is bit-identical to macos
#asahi-dev · 2023-10-13 12:09
eilnsystem sleep works
#asahi-dev · 2023-10-13 11:44
eilnsurprise, isp depends on ps_ispsens0, ps_ispsens1, ps_ispsens2, ps_ispsens3. that gives us 1 + 4 + 13 = 18 power domains
#asahi-dev · 2023-10-13 11:31
eilnhow am I breaking mca power hierarchy??!
#asahi-dev · 2023-10-13 10:02
eilnwait I'm not sure if I should be messing with userspace state
#asahi-dev · 2023-10-13 09:56
eilnmarcan: seems like we need to track streaming state and restore it under rpm? https://github.com/AsahiLinux/linux/issues/211
#asahi-dev · 2023-10-08 10:43
eilncy8aer: they are in https://github.com/AsahiLinux/linux/blob/asahi-wip/arch/arm64/boot/dts/apple/isp-imx558-cfg0.dtsi
#asahi-dev · 2023-10-08 09:18
eilntooo ez
#asahi-dev · 2023-10-08 09:06
eilnyour pixel 5a has a 363, mildly interesting
#asahi-dev · 2023-10-08 09:01
eilnwonderful
#asahi-dev · 2023-10-07 13:34
eilnaha that's list0 and list1
#asahi-dev · 2023-10-07 13:33
eilndecoded the next next non-idr slice, it's [height/width, dmaconfig, dst_y, dst_uv, dmaconfig, dmaconfig, dmaconfig, dmaconfig, unk_0, ref_tile0_0, ref_tile0_1, ref_tile0_2, ref_tile0_3, unk_1, ref_tile1_0, ref_tile1_1, ref_tile1_2, ref_tile1_3]
#asahi-dev · 2023-10-07 13:33
eiln**coded non-idr slice above, typo
#asahi-dev · 2023-10-07 13:20
eilnheader changes from 0x2db032e0->0x2db012e0, 0x100000->0x300000, same otherwise
#asahi-dev · 2023-10-07 13:16
eilnspecifically non-coded idr slice inserts [height/width, dmaconfig, dst_y, dst_uv, dmaconfig, dmaconfig, dmaconfig, dmaconfig, unk, ref_tile0, ref_tile1, ref_tile2, ref_tile3] before the dma commands
#asahi-dev · 2023-10-07 13:02
eilnthe next dma'd decode stream automatically stacks on top of the last one. interesting. that limit must be 0x100000 then
#asahi-dev · 2023-10-07 12:59
eilnjanneg: just decoded a non-idr coded slice. structure is no longer the same, additional dart addrs pointing to the previous (presumably) reference frames
#asahi-dev · 2023-10-07 12:21
eilnalright looking at a multi slice one rn
#asahi-dev · 2023-10-07 11:59
eilnactually the decode stream header seems constant @ 0x74 bytes
#asahi-dev · 2023-10-07 11:56
eilnjanneg: my screen roughly looks like this https://pastebin.com/RfAL9EmT
#asahi-dev · 2023-10-07 11:50
eilnonly single slice but it's been constant for all of these
#asahi-dev · 2023-10-07 11:46
eilnthe decode stream is roughly about 10 frame info u32s (height/width), 10 shifted dart addrs, and 10*n slice commands which are 0x2a000000 masked
#asahi-dev · 2023-10-07 11:44
eilnjanneg: that makes much more sense. I haven't even tested non-pow2
#asahi-dev · 2023-10-07 11:38
eilnit's so ugly. just height/width looks like this ((((x.height - 1) << 1) >> 4) << 16) | (((x.width - 1) << 1) >> 4)
#asahi-dev · 2023-10-07 11:38
eilnwe are decoding smpte bars now. pow2 64 <= height,width <= 4096 works. shall look into tiling tomorrow
#asahi-dev · 2023-10-07 11:38
eilnok yeah sps+pps is part of the decode stream
#asahi-dev · 2023-10-07 11:32
eilnas a render node?
#asahi-dev · 2023-10-07 11:31
eilnI know avc is scaled because my output can't fit in that tile size. there's a hardcoded scaling list. I have yet to seen anything about scaler
#asahi-dev · 2023-10-07 11:31
eilnjanneg: yes they have de/tileRows fn in the kext. codec/platform invariant
#asahi-dev · 2023-10-07 11:25
eilnI thought about using ane's chinook but it seems iboot locks down ctrr since 13.5
#asahi-dev · 2023-10-07 11:24
eilnwe'll need a userspace layer anyway; apple rolls out NEON in the kernel to untile output
#asahi-dev · 2023-10-07 11:24
eilnI'm tempted to generate the decode stream entirely in userspace and attach it as VIDIOC_S_EXT_CTRLS() V4L2_CTRL_FLAG_HAS_PAYLOAD void* ptr. header/reference frame info is all encoded in there. that would make our driver about 500 LOC
#asahi-dev · 2023-10-07 11:24
eilnchadmed: I meant that as in "I don't want to deal with the CM3 at all" e.g. non-aic interrupts, writing cortex code, etc. I did load my own code at the end ;)
#asahi-dev · 2023-10-07 11:24
eilnjanneg: that is much saner, thank you
#asahi-dev · 2023-10-06 23:17
eilnavd notes for those interested https://eiln.net/avd-notes.html
#asahi-dev · 2023-10-06 23:17
eilnok I think my certificate has worked out
#asahi-dev · 2023-10-06 22:46
eilnohh it uses scaler for mirroring + window resizing. that makes sense why only the preview is mirrored
#asahi-dev · 2023-10-06 22:44
eilnjanneg: looks like a memory copy with scaler. we could probably do m2m by making up our own DART endpoint
#asahi-dev · 2023-10-06 22:36
eilnI don't recall ever seeing logs about scaler/gpu in Core Media. let me quickly check scaler
#asahi-dev · 2023-10-06 22:34
eilnv4l2 loopback with -vflip is always a solution but
#asahi-dev · 2023-10-06 22:26
eilnjanneg: my other machines aren't mirrored either. on macos the preview is mirrored by software but the actual capture isn't (which is weird)
#asahi-dev · 2023-10-06 11:12
eilndidn't the imac have some weirdo audio codec? on second thought it might be a different sensor
#asahi-dev · 2023-10-06 10:29
eilnjanneg: I'd be really surprised if it wasn't. do any of us have an imac to test? I've never even seen one in the wild
#asahi-dev · 2023-10-06 09:07
eilncheese uses gst backend why doesn't it work? https://github.com/GNOME/cheese/blob/master/libcheese/cheese-camera.c

plus ›