#
…

2023-10-07

00:00tenkuu has quit [Ping timeout: 480 seconds]
00:00jannegeiln: bed time reading through you avd notes
00:01jannegdoo not read through the full itu h.264 spec
00:01jannegstart with historic versions without svc and mvc
00:06DannyB has joined #asahi-dev
00:07janneginitial standard is even less but I think the fidelity range extension doesn't make the standaard unreadable
00:32dcow has joined #asahi-dev
00:40dcow has quit [Ping timeout: 480 seconds]
00:43DannyB has quit [Ping timeout: 480 seconds]
01:00DragoonAethis has quit [Quit: hej-hej!]
01:00DragoonAethis has joined #asahi-dev
01:06dcow has joined #asahi-dev
01:12rootbeerdan1 has joined #asahi-dev
01:14rootbeerdan has quit [Ping timeout: 480 seconds]
01:14rootbeerdan1 is now known as rootbeerdan
01:14dcow has quit [Ping timeout: 480 seconds]
01:18balrog has quit [Quit: Bye]
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:21Emantor has joined #asahi-dev
01:31balrog has joined #asahi-dev
01:40dcow has joined #asahi-dev
01:45phire has quit [Quit: No Ping reply in 180 seconds.]
01:47phire has joined #asahi-dev
01:48dcow has quit [Ping timeout: 480 seconds]
01:51hex-spell has quit [Quit: WeeChat 4.0.5]
02:00gabuscus has quit []
02:00linajanneg: Mirroring is always an application thing, as far as I know no webcam mirrors the image internally
02:01lina(Some probably have toggles for it but it should never be the default and I think videocall apps always mirror internally)
02:02linaSo we don't need to worry about that
02:02linaAfter all when you send the image to other people they see the unmirrored version, mirroring is only for local preview
02:15dcow has joined #asahi-dev
02:24dcow has quit [Ping timeout: 480 seconds]
02:25chadmedeiln: since the cm3 fw is uploaded by the kernel, we can write our own and use that as the copro for stateless >:)
02:25chadmedR was already considering this iirc
02:43phire has quit [Remote host closed the connection]
02:45phire has joined #asahi-dev
02:49dcow has joined #asahi-dev
02:52jnn has joined #asahi-dev
02:55jn has quit [Ping timeout: 480 seconds]
02:57dcow has quit [Ping timeout: 480 seconds]
02:57gabuscus has joined #asahi-dev
03:23DannyB has joined #asahi-dev
03:24dcow has joined #asahi-dev
03:31cylm has quit [Ping timeout: 480 seconds]
03:33dcow has quit [Ping timeout: 480 seconds]
03:43dcow has joined #asahi-dev
03:46tristan2_ has joined #asahi-dev
03:48tristan2 has quit [Ping timeout: 480 seconds]
03:51dcow has quit [Ping timeout: 480 seconds]
03:59dcow has joined #asahi-dev
04:10dcow has quit [Ping timeout: 480 seconds]
04:51espo has quit [Remote host closed the connection]
05:09espo has joined #asahi-dev
05:27dcow has joined #asahi-dev
05:35dcow has quit [Ping timeout: 480 seconds]
06:02dcow has joined #asahi-dev
06:10dcow has quit [Ping timeout: 480 seconds]
06:11dcow has joined #asahi-dev
06:25dcow has quit [Ping timeout: 480 seconds]
06:47dcow has joined #asahi-dev
06:56dcow has quit [Ping timeout: 480 seconds]
06:59hightower2 has quit [Ping timeout: 480 seconds]
07:20dcow has joined #asahi-dev
07:31crabbedhaloablut has joined #asahi-dev
07:31dcow has quit [Ping timeout: 480 seconds]
07:37dcow has joined #asahi-dev
07:46dcow has quit [Ping timeout: 480 seconds]
08:01dcow has joined #asahi-dev
08:14dcow has quit [Ping timeout: 480 seconds]
08:15ydalton has joined #asahi-dev
08:17ydaltonchadmed: that would also mean avoiding the problem of copying a macOS blob
08:35cyrinux has quit []
08:37cyrinux has joined #asahi-dev
08:37ydalton has quit [Ping timeout: 480 seconds]
09:26hex-spell has joined #asahi-dev
09:40dcow has joined #asahi-dev
09:53dcow has quit [Ping timeout: 480 seconds]
10:20dcow has joined #asahi-dev
10:29dcow has quit [Ping timeout: 480 seconds]
10:50dcow has joined #asahi-dev
10:58dcow has quit [Ping timeout: 480 seconds]
11:23dcow has joined #asahi-dev
11:24eilnjanneg: that is much saner, thank you
11:24eilnchadmed: 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 ;)
11:24eilnI'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
11:24eilnwe'll need a userspace layer anyway; apple rolls out NEON in the kernel to untile output
11:24chadmedoh.... ew
11:25eilnI thought about using ane's chinook but it seems iboot locks down ctrr since 13.5
11:28jannegeiln: they do what (RE: neon)! neither scaler or gpu can handle the AVD tiling?
11:30jannegif svc and mvc were just annexes they could be easily ignored but unfortunately they seeep through the whoole standard and add complexity
11:30DannyB has quit [Ping timeout: 480 seconds]
11:31eilnjanneg: yes they have de/tileRows fn in the kext. codec/platform invariant
11:31eilnI 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
11:31jannegif we need an userspace part we should reconsider va-api or vulkan video as those have already userspace
11:31chadmedhow would that userspace component slot in then? i initially imagined a va-api driver but it doesnt have v4l2 as a backend
11:32eilnas a render node?
11:33chadmedoh does that mean a drm driver for avd?
11:33jannegI haven't looked at libva internals but I suppose we could / have to whatever we want as backend and driver
11:33DannyB has joined #asahi-dev
11:34chadmedthe backends are modular so we could theoretically just add one for v4l2
11:34chadmedi just think no one's bothered doing it yet :
11:34jannegvulkan video would probably mean a drm mode
11:36dcow has quit [Ping timeout: 480 seconds]
11:36jannegnot sure how happpy v4l2 is about a custom which pipes basically binary data through
11:36ChaosPrincessif they are not happy, char/misc exists
11:37ChaosPrincessor pretend the avd is totally a part of gpu.
11:38jannegthe only appeal of v4l2 m2m stateless is that it is a standardized API
11:38eilnok yeah sps+pps is part of the decode stream
11:38eilnwe are decoding smpte bars now. pow2 64 <= height,width <= 4096 works. shall look into tiling tomorrow
11:38eilnit's so ugly. just height/width looks like this ((((x.height - 1) << 1) >> 4) << 16) | (((x.width - 1) << 1) >> 4)
11:40janneg64 and 4096 are reasonable minimal/maximal dimensions
11:42jannegany idea why the dimensions are effectively just shifted right by 3?
11:42jannegI would expect ((width + 15) >> 4) - 1
11:43jannegi.e. SPS.pic_width_in_mbs_minus1
11:44eilnjanneg: that makes much more sense. I haven't even tested non-pow2
11:46dcow has joined #asahi-dev
11:46eilnthe decode stream is roughly about 10 frame info u32s (height/width), 10 shifted dart addrs, and 10*n slice commands which are 0x2a000000 masked
11:49jannegis the 10 constant? does your h264 bitstream has a single slice or multiple?
11:50eilnonly single slice but it's been constant for all of these
11:52jannegI guess the dart addresses could point to reference frames or scaling_lists
11:53jannegH.264 (03/2005) is the best spec document to look at
11:56eilnjanneg: my screen roughly looks like this https://pastebin.com/RfAL9EmT
11:59eilnactually the decode stream header seems constant @ 0x74 bytes
12:07dcow has quit [Ping timeout: 480 seconds]
12:21eilnalright looking at a multi slice one rn
12:32AnuthaDev has joined #asahi-dev
12:33dcow has joined #asahi-dev
12:34chadmedbootlin have a v4l2 vaapi driver implementing the request api
12:41dcow has quit [Ping timeout: 480 seconds]
12:42hightower2 has joined #asahi-dev
12:44hightower3 has joined #asahi-dev
12:44hightower2 has quit [Read error: Connection reset by peer]
12:46dcow has joined #asahi-dev
12:51dcow has quit [Remote host closed the connection]
12:52dcow has joined #asahi-dev
12:55DannyB has quit [Ping timeout: 480 seconds]
12:59eilnjanneg: just decoded a non-idr coded slice. structure is no longer the same, additional dart addrs pointing to the previous (presumably) reference frames
13:00dcow has quit [Ping timeout: 480 seconds]
13:02eilnthe next dma'd decode stream automatically stacks on top of the last one. interesting. that limit must be 0x100000 then
13:14AnuthaDev has quit []
13:15AnuthaDev has joined #asahi-dev
13:15jannegjust additional pointers or changes in the decoder headers as well? I would expect 2 reference frame lists. might be hard to detect if you just decode 2 frames
13:16eilnspecifically 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
13:20eilnheader changes from 0x2db032e0->0x2db012e0, 0x100000->0x300000, same otherwise
13:24AnuthaDev has quit []
13:26dcow has joined #asahi-dev
13:32PatRyk has joined #asahi-dev
13:33eiln**coded non-idr slice above, typo
13:33eilndecoded 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]
13:34eilnaha that's list0 and list1
13:34dcow has quit [Ping timeout: 480 seconds]
13:39jeisom has joined #asahi-dev
13:40roxfan2 has quit [Ping timeout: 480 seconds]
13:46hightower3 has quit [Read error: Connection reset by peer]
13:47hightower3 has joined #asahi-dev
13:47roxfan has joined #asahi-dev
14:08DannyB has joined #asahi-dev
14:09hightower3 has quit [Read error: Connection reset by peer]
14:10hightower2 has joined #asahi-dev
14:17cylm has joined #asahi-dev
14:20Yannik_Sc has joined #asahi-dev
14:23PatRyk has quit [Ping timeout: 480 seconds]
14:35tenkuu has joined #asahi-dev
14:48hightower2 has quit [Remote host closed the connection]
14:53DannyB has quit [Ping timeout: 480 seconds]
15:18Yannik_Sc has quit [Quit: Leaving]
15:21tenkuu has quit [Quit: WeeChat 4.0.4]
15:23DannyB has joined #asahi-dev
15:30hightower2 has joined #asahi-dev
15:36kettenismarcan: it seems the join_pref command fails on bcm4388
15:37kettenisdo you see the same on Linux?
15:42dcow has joined #asahi-dev
15:45espo has quit [Quit: WeeChat 4.0.4]
15:46espo has joined #asahi-dev
15:53jannegkettenis: quoting from somewhere else: "there's a join_pref error I haven't looked at yet (it looks like a variable size/tagged struct, not sure why it fails) but it's nonfatal"
15:59kettenisthanks, the openbsd driver makes it fatail, but I hacked around that
15:59dcow has quit [Ping timeout: 480 seconds]
16:00AnuthaDev has joined #asahi-dev
16:08DannyB has quit [Ping timeout: 480 seconds]
16:09jannegkettenis: any idea what could cause this allocation errors in u-boot https://paste.bingner.com/paste/rbtdx
16:09jannegChaosPrincess is seeing those with m1n1-1.4.0 and the dts from the current asahi-wip branch
16:11jannegI remember something about u-boot cosuming the whole memory due to something not being page aligned
16:12kettenisnever seen that
16:12jannegseems to be t6000 specific, I have no issues on t6001
16:13kettenisbut yes, I think the assumption is that memory regions in the device tree are page aligned
16:13kettenisI vaguely remember hitting something like that before
16:14jannegthe only thing I can think of which was added recently and hasn't a page aligned size are resources in the isp node
16:16jannegwas easier that way to support the different register layout that way but should be fixed
16:16jannegnot sure why u-boot would care about the regs of a device it has no drivers for
16:17jannegChaosPrincess: can you try to disable the isp node and remove the alias
16:18ChaosPrincesswill do in a bit
16:19jannegChaosPrincess: nvram partition size might be worth checking
16:20ChaosPrincessnot sure i understand
16:21kettenisso these are clearly the blocks we allocate in board_late_init() for loading the kernel, initrc , etc.
16:21kettenisthat initializes an lmb taking into account reserved memory regions
16:22kettenisso it seems something was added that knocks out most of the memory
16:22jannegthe nvram partition size differs between 12.x and 13.x os firmware so it is now calculated and filled by m1n1
16:24dcow has joined #asahi-dev
16:29jannegthe first entry in rsvmem has a non page-aligned size
16:32jannegthat should be the DT
16:32dcow has quit [Ping timeout: 480 seconds]
16:33kettenisI don't immediately see how a non-page-aligned region would break the lmb code
16:35ChaosPrincessremoving the alias helped
16:40ketteniscalling lmb_dump_all_force(&lmb) in arch/arm/mach-apple/board.c:board_late_init() might give us some clues about what's going wrong
16:47ChaosPrincessreserved[3] and [4] look suspicious
16:53janneghow does it look with the alias removed?
16:56RhinoRapscallion has joined #asahi-dev
16:57RhinoRapscallion has quit []
16:58dcow has joined #asahi-dev
17:03DannyB has joined #asahi-dev
17:06PatRyk has joined #asahi-dev
17:12kettenisreserved.cnt = 0x8 / max = 0x8
17:12kettenisI think that might be the problem
17:14kettenisdid we somehow lose the change to bump the number of regions to 64 on one of the branches?
17:17ChaosPrincesskettenis: 'twas the reason
17:17jannegI see it both in asahi and asahi-releng
17:17dcow has quit [Ping timeout: 480 seconds]
17:19jannegso it was a while since you ran `make apple_m1_defconfig`? distro packages have advantages sometimes
17:37SalimTerryLi has joined #asahi-dev
17:37PatRyk has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
17:41SalimTer- has quit [Ping timeout: 480 seconds]
17:51dcow has joined #asahi-dev
17:51nela has quit [Quit: bye!]
17:52nela has joined #asahi-dev
17:59dcow has quit [Ping timeout: 480 seconds]
18:25dcow has joined #asahi-dev
18:32tristan2_ has quit [Quit: WeeChat 4.0.4]
18:33dcow has quit [Ping timeout: 480 seconds]
18:36tristan2 has joined #asahi-dev
18:42dcow has joined #asahi-dev
18:50dcow has quit [Ping timeout: 480 seconds]
18:51DannyB has quit [Ping timeout: 480 seconds]
18:55jnn is now known as jn
18:59dcow has joined #asahi-dev
19:18dcow has quit [Ping timeout: 480 seconds]
19:22PatRyk has joined #asahi-dev
19:23PatRyk has quit []
19:45dcow has joined #asahi-dev
19:54dcow has quit [Ping timeout: 480 seconds]
20:10maximbaz has quit [Quit: bye]
20:11maximbaz has joined #asahi-dev
20:20AnuthaDev_ has joined #asahi-dev
20:21AnuthaDev has quit [Ping timeout: 480 seconds]
21:10DannyB has joined #asahi-dev
21:13rootbeerdan has quit [Ping timeout: 480 seconds]
21:29DannyB has quit [Ping timeout: 480 seconds]
21:35rootbeerdan has joined #asahi-dev
21:40crabbedhaloablut has quit []
23:21cuiltb^ has quit [Ping timeout: 480 seconds]
23:23roxfan2 has joined #asahi-dev
23:27roxfan has quit [Ping timeout: 480 seconds]
…