2022-10-23
00:43thelounge7571340 has joined #asahi-dev
00:43thelounge7571340 has quit [Remote host closed the connection]
00:59whistlingoat has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
00:59whistlingoat has joined #asahi-dev
01:07whistlingoat has quit [Ping timeout: 480 seconds]
01:10Etrien__ has joined #asahi-dev
01:15Etrien_ has quit [Ping timeout: 480 seconds]
01:15Etrien__ has quit [Read error: Connection reset by peer]
01:15Etrien_ has joined #asahi-dev
01:25chadmed has joined #asahi-dev
01:45thelounge7571340 has joined #asahi-dev
01:46thelounge7571340 has quit [Remote host closed the connection]
02:48thelounge7571340 has joined #asahi-dev
02:48thelounge7571340 has quit [Remote host closed the connection]
02:51chadmed has quit [Quit: Konversation terminated!]
02:52chadmed has joined #asahi-dev
02:56chadmed has quit []
02:57chadmed has joined #asahi-dev
03:23chadmed has quit [Quit: Konversation terminated!]
03:25chadmed has joined #asahi-dev
03:33Etrien has joined #asahi-dev
03:33Etrien_ has quit [Read error: Connection reset by peer]
03:42chadmed has quit [Quit: Konversation terminated!]
03:44chadmed has joined #asahi-dev
03:48thelounge7571340 has joined #asahi-dev
03:48thelounge7571340 has quit [Remote host closed the connection]
03:57argonaut has joined #asahi-dev
04:02chadmed has quit [Quit: Konversation terminated!]
04:04chadmed has joined #asahi-dev
04:08chadmedpovik, marcan: thoughts on deactivating the * Mux kctls on the laptops? i dont see any need for a user to change them, and having them statically set in the driver eliminates one more avenue for misconfiguration
04:10chadmedalso fwiw the amp gain kctls dont have Volume in their name, so those gain caps in the fixup methods werent applying
04:12chadmed has quit [Quit: Konversation terminated!]
04:14chadmed has joined #asahi-dev
04:14chadmed has quit []
04:15chip_x has joined #asahi-dev
04:16chadmed has joined #asahi-dev
04:22chipxxx has quit [Ping timeout: 480 seconds]
04:54thelounge7571340 has joined #asahi-dev
04:54thelounge7571340 has quit [Remote host closed the connection]
05:06thelounge7571340 has joined #asahi-dev
05:07thelounge7571340 has quit [Remote host closed the connection]
05:42gaudem has joined #asahi-dev
06:12thelounge7571340 has joined #asahi-dev
06:12thelounge7571340 has quit [Remote host closed the connection]
06:29Etrien_ has joined #asahi-dev
06:33Etrien has quit [Ping timeout: 480 seconds]
06:39Etrien has joined #asahi-dev
06:46Etrien_ has quit [Ping timeout: 480 seconds]
07:00duban6 has quit []
07:05duban6 has joined #asahi-dev
07:23thelounge7571340 has joined #asahi-dev
07:23thelounge7571340 has quit [Remote host closed the connection]
07:51gaudem has quit [Quit: Connection closed for inactivity]
07:55Etrien_ has joined #asahi-dev
07:57Etrien has quit [Ping timeout: 480 seconds]
08:10Etrien_ has quit [Read error: Connection reset by peer]
08:11Etrien has joined #asahi-dev
08:29thelounge7571340 has joined #asahi-dev
08:29thelounge7571340 has quit [Remote host closed the connection]
09:06jeffmiw has joined #asahi-dev
09:07povikchadmed: well, there's one weak case for when they could be useful: user not employing speaker EQ, feeding speakers directly, having both speakers and headphones on primary, switching between one and the other using 'pin' controls (which enable the endpoints) instead of restarting playback on different device
09:08povikarguably it's more useful on mac mini/studio than on the laptops, but i would rather not introduce additional differences into macaudio across models
09:08povik06:10 < chadmed> also fwiw the amp gain kctls dont have Volume in their name, so those gain caps in the fixup methods werent applying
09:08chadmed^ yeah that was the message to ignore, i realised what it was doing immediately after i sent that
09:09poviki guess you figured out some tools don't show the control name in full. if the caps weren't being applied, the driver would refuse probe. really, you should be giving more credit to the driver ;)
09:11chadmedheh yeah, i think i have a better idea of whats going on now that ive spent all day staring at macaudio.c
09:13chadmedlooking at other drivers though, it seems like everyone else hard codes TDM slots based on the hardware. obviously we cant do that since we have lots of different devices to support, but theres also the dai-tdm-slot-num DT property that we may be able to take advantage of
09:13chadmedbut since the problem is on the frontends and not the backend DAIs, i cant really see how we would enforce the number of TDM slots unless we could make the safe assumption that the secondary frontend is always the internal speakers, which is why i asked about it
09:16jeffmiw has quit [Remote host closed the connection]
09:23povikre dai-tdm-slot-num. i know it's there. i moved away from the approach of describing the DAI links in full in the DT since there's just too many details and they are tied to internal ASoC representation instead of being inherent to the hardware, so compatible="apple,j313-macaudio" must be where all those details are hidden in
09:23povikincluding, as you point out, not having a DT representation for the frontend links, since those are an ASoC vehicle
09:24povik11:13 < chadmed> but since the problem is on the frontends and not the backend DAIs, i cant really see how we would enforce the number of TDM slots unless we could make the safe assumption that the secondary frontend is always the internal speakers, which is why i asked about it
09:24povikwe shouldn't enforce the slots (which would constrain the number of channels in mca.c), we should constrain the number of channels from macaudio.c directly
09:25povikand that we can do to the maximum number of channels on a backend link, so to the number of speaker channels
09:27chadmedso basically look at the backends, get the max number of channels on any one backend, then set a constraint to that number on secondary?
09:35thelounge7571340 has joined #asahi-dev
09:35thelounge7571340 has quit [Remote host closed the connection]
09:36povikchadmed: if you want to give implementing it a go, i think you should apply the constrain in .startup of macaudio_fe_ops
09:37povikthen call the alsa constraint function like in the recent channels-according-to-slots MCA patch
09:58jannausven: does apple-dart miss a check to prevent .domain_alloc or at least .attach_dev if there's already a device attached to a specific dart sid?
10:01jannauI started looking into switching piodma to an unmanaged domain. I've currently just create the domain and attach piodma to it. everything still works since the dart is locked but if it wasn't it would be completely broken
10:02svenDoesnt the iommu api look up the piodma group and then just switches the domain on attack for that group?
10:06jannauthe group in sysfs still says DMA as type but I end up apple_dart_attach_dev() with domain->type IOMMU_DOMAIN_UNMANAGED
10:11svenit knows which device belongs to which group and shouldn’t allow a group to be attached to two domains
10:12jannauI think I spotted in the path in iommu.c just a check if there's just a single device in the group
10:16svenvfio more or less does the same thing: create a domain and then attach a device to it that probably still had the default dma domain
10:26sven(the iommu api is a bit confusing because dart has to hack around it quite a bit. this will all get better once robin's cleanup series is done)
10:29jannauthere is a check in iommu.c __iommu_attach_group(), the default and blocking domains can be replaced this way
10:38thelounge7571340 has joined #asahi-dev
10:38thelounge7571340 has quit [Read error: Connection reset by peer]
10:45jannauI think everything is working more or less as expected, the default_domain handling is a little surprising and that dma_map_sgtable() still works with the unmanaged domain
10:49r0ni has joined #asahi-dev
10:55jannauit ends up in the dart pagetable, not sure how it gets there but the default domain and the unmanaged can write both there
10:59svenbut that’s also related to the part where the dart driver has to hack around the iommu so it’s quite possible I messed that up
11:00jannauI don't see how we can enforce that if we map the L1 table for locked darts and the devices is not detached from the default domain
11:03svendma_map_sgtable will just create a mapping in the default domain that's not attached anymore
11:04svenone way around this for locked darts is to have a shadow copy of the L0 pagetable that's used by iopgtbl the entire time and not memmap anything. then whenever there's a map/unmap you just memcpy(locked-l0, shadow-l0)
11:05svenyou can even optimize that with the flush/invalidate callbacks to only memcpy the required entries
11:05sventhen device attach is just "memcpy(locked-l0, domain-l0)" and each domain has its own domain-l0
11:06sven(maybe s/L0/L1/, i don't remember the terminology. in the above line L0 = "first level pagetable that sits in memory and is configured in the locked TTBR register")
11:09svenyou could probably stash the currently active domain into the group data and only do the l0 sync in flush/invalidate if domain == get_group(dev)->domain
11:15jannau"New drivers should support default domains and so the detach_dev() op will never be called"
11:17svenso essentially stuffing the currently active domain into the group data on attach and then only syncing to the locked table in attach/flush/inval should work for locked darts
11:22svenmarcan: ^-- so I can reliably overflow the mailbox queue with just lots of dcp debug spam. kinda surprised lina hasn't run into this with the gpu yet
11:41thelounge7571340 has joined #asahi-dev
11:42thelounge7571340 has quit [Remote host closed the connection]
11:49Adelphos has joined #asahi-dev
11:49Adelphos was kicked from #asahi-dev by ChanServ [You are not permitted on this channel]
11:49Adelphos was banned on #asahi-dev by ChanServ [*!*@169.150.196.*]
12:02svenhrm, when tracing I can see the dcp->ap call that sets all modes but for some reason they aren't propagated to drm correctly I think
12:28pg12 has quit [Quit: pg12]
12:29marcansven: lina's GPU stuff is synchronous right now, so you can't run into it unless you have MBOX_TX_QUEUE_LEN/2 apps actively rendering simultaneously I guess
12:30svenand apparently the three(?) context switches in the tx path are enough to overflow that queue
12:31marcanif you come up with something to migrate RTKit to an internal implementation in soc/apple I will merge it and push for it upstream
12:33marcanalso for lina, I think she can make the hardware tx queue unable to ever block, since she has 12 pipes I think? and 12 < 16
12:34marcanthe shared mailbox code can keep a ring log of the last 16 submissions, and then a special TX function could poll the pending ones (reading the rptr from the hardware) and elide the send if there is already an identical message queued
12:36svenfor DCP syslog the rx path seems to be much faster than the tx one which results in that overflow
12:36pg12 has joined #asahi-dev
12:51jannauhow does the parsing fails? I hope it's not the color mode check I added for lina's capture card / glmark2-drm
13:05thelounge7571340 has joined #asahi-dev
13:06thelounge7571340 has quit [Remote host closed the connection]
13:26jannauI think we're just parsing id and score for the color modes and skip other fields. the python parsing code does more
13:42svenhttps://f.svpe.de/8b427ff54cc0acf56d3d1a93f70eebc1ae1c807c045e7463685d63e0f0a16ded_modes.txt
13:51svenhttps://f.svpe.de/94d44bd9344a281e7c5cd73c726a292f590999d85f854473c74db961ff73dc70_dcp.log.txt
13:54sven(also, lol, I just realized I reimplemented dcp's parse.c in much dumber because I didn't realize it's the same format)
13:56jannaudo you have a macos with the same "monitor"? please look at the parameters for set_digital_out_mode
13:58svenset_digital_out_mode(arg0=82, arg1=38) <-- that's what happened when I used this capture card with dcpext.py
14:05svenokay, macos uses Message: A412 (IOMobileFramebufferAP::set_digital_out_mode(unsigned int, unsigned int)): (in 0x8, out 0x4)
14:06thelounge7571340 has joined #asahi-dev
14:07thelounge7571340 has quit [Read error: Connection reset by peer]
14:12jannauif you uncomment "#pprint.pprint(self.dcpav_prop[key])" dcpext.py will print the parsed Color/Timing Elements
14:22mpskettenis: any hint or doc how would multiple esp work? create two or or more esp on same disk?
14:24kettenisI don't want to be rude, but this probably should be tested by somebody who understands how multiple ESPs work
14:48henry has joined #asahi-dev
15:07jannauthat didn't work for me, it was still the m1n1 set one although I booted a different partition
15:09kettenisjannau: oh you mean if you deliberately boot from a different disk, u-boot should change "/chosen/asahi,efi-system-partition"?
15:09thelounge7571340 has joined #asahi-dev
15:10thelounge7571340 has quit [Remote host closed the connection]
15:20amarioguy has joined #asahi-dev
15:22jannauI have no problem with the allowed but I don't think it will be an supported config and the boot menu makes it far to easy
15:57kettenis_ has joined #asahi-dev
15:59kettenis_ has quit [Remote host closed the connection]
15:59kettenis has quit [Ping timeout: 480 seconds]
16:08kettenis has joined #asahi-dev
16:11thelounge7571340 has joined #asahi-dev
16:11thelounge7571340 has quit [Remote host closed the connection]
16:53marcansingle ESP with multiple OSes installed is "supported" in the "you get to keep the pieces when it breaks" sense
16:53marcanthere's a single set of DTs, a single firmware bundle, and I bet a world of pain once SEP support is in
16:53marcanbooting via USB is a special case where the USB OS should not be mucking around with the system ESP in principle
16:54marcanhaving several co-habitating OSes with a single ESP probably won't be a supported config ever if you want to have everything work as expected with automation
16:55marcanand given the DT mismatch, I don't think we should allow booting from other nvme ESPs, yeah
17:10henry has quit [Read error: No route to host]
17:17jakebot6022 has quit [Ping timeout: 480 seconds]
17:23thelounge7571340 has joined #asahi-dev
17:23thelounge7571340 has quit [Remote host closed the connection]
17:39pthariensflame has joined #asahi-dev
17:39pthariensflame has quit []
17:43thelounge7571340 has joined #asahi-dev
17:44thelounge7571340 has quit [Remote host closed the connection]
17:44amarioguy has quit [Remote host closed the connection]
17:47ChaosPrincesswhat does the aop do that would be useful in linux? Do you have to enable to enable it to even get the built-in mic signals?
17:56jannaupovik: any idea what could cause "apple-admac 238200000.dma-controller: missing or invalid apple,internal-irq-destination property" on j457
18:02___nick___ has joined #asahi-dev
18:02___nick___ has quit []
18:05___nick___ has joined #asahi-dev
18:17povikthere's been a breaking change in the binding some time ago, dropping that irq-destination property
18:18povikit's easy to do other than we should write our own LEAP firmware in that case, instead of needing the one that's embedded in AOP firmware
18:19povikLEAP does signal processing we probably don't want to skip over, and apple's firmware for it clocks at ~500 instructions
18:20povik(i have been thinking the past few days about how we could crowdsource the description of the custom ISA it seems to have. we can single-step on the processor)
18:20amarioguy has joined #asahi-dev
18:53thelounge7571340 has joined #asahi-dev
18:54thelounge7571340 has quit [Remote host closed the connection]
19:17jluthra_ has quit [Remote host closed the connection]
19:17jluthra_ has joined #asahi-dev
19:59thelounge7571340 has joined #asahi-dev
19:59thelounge7571340 has quit [Remote host closed the connection]
19:59ljs has joined #asahi-dev
20:08___nick___ has quit [Ping timeout: 480 seconds]
21:00thelounge7571340 has joined #asahi-dev
21:01thelounge7571340 has quit [Remote host closed the connection]
21:03ljs has quit [Remote host closed the connection]
21:14Etrien_ has joined #asahi-dev
21:18Etrien has quit [Ping timeout: 480 seconds]
21:33Etrien has joined #asahi-dev
21:37Etrien_ has quit [Ping timeout: 480 seconds]
21:47SSJ_GZ has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi-dev
22:13thelounge7571340 has joined #asahi-dev
22:14thelounge7571340 has quit [Remote host closed the connection]
22:20SSJ_GZ has quit [Ping timeout: 480 seconds]
23:30thelounge7571340 has joined #asahi-dev
23:30thelounge7571340 has quit [Read error: Connection reset by peer]
23:31zkrx has quit [Read error: Connection reset by peer]
23:31zkrx has joined #asahi-dev
23:33zkrx has quit [Read error: Connection reset by peer]
23:49zkrx has joined #asahi-dev