#
…

2022-09-18

00:31chadmed[m]Depending on how hwmon folks like to keep their tree you could probably put a subdir in hwmon, generalise the core functionality in apple-soc-smc, then have separate header files for lists of keys/per-soc defines (e.g. t600x-sensors.h) which you link in to the device struct when it matches the DT compatible
00:32chadmed[m]Maybe a bit overengineered but that also allows us to deal with breaking quirks in future socs by just making per-soc personalities for the driver independent of the core functions
00:42derzahl has joined #asahi-dev
00:43marcanIMO the sensors should go in the DT. the driver is otherwise completely generic. I'd like robher's opinion on this though.
00:44marcanwe're going to keep tweaking sensor names over time, and it doesn't make much sense to have a giant hardcoded list in the driver
00:47thelounge7571340 has quit [Remote host closed the connection]
00:49chadmed[m]Yeah i was thinking of the intersection between all possible keys and the set of keys we actually want forgetting that the main smc driver already handles that and hwmon just needs to ask it for some set of keys
00:51thelounge7571340 has joined #asahi-dev
01:20robhermarcan: I'm offline the next week so will have to look at it later.
01:21marcanit's just adding iommus and power-domains props :)
01:50thelounge7571340 has quit [Remote host closed the connection]
01:50Race has joined #asahi-dev
01:54thelounge7571340 has joined #asahi-dev
02:12jlco has joined #asahi-dev
02:53thelounge7571340 has quit [Remote host closed the connection]
03:01thelounge7571340 has joined #asahi-dev
04:00duban6 has quit []
04:00thelounge7571340 has quit [Remote host closed the connection]
04:03thelounge7571340 has joined #asahi-dev
04:04duban6 has joined #asahi-dev
05:03thelounge7571340 has quit [Remote host closed the connection]
05:06thelounge7571340 has joined #asahi-dev
05:35SSJ_GZ has joined #asahi-dev
06:06thelounge7571340 has quit [Remote host closed the connection]
06:10thelounge7571340 has joined #asahi-dev
06:18jakebot602 has quit [Quit: Ping timeout (120 seconds)]
06:20jakebot602 has joined #asahi-dev
06:31kettenis has joined #asahi-dev
07:10thelounge7571340 has quit [Remote host closed the connection]
07:14thelounge7571340 has joined #asahi-dev
07:22derzahl has quit [Ping timeout: 480 seconds]
07:23chadmedpovik: figured out the digital noise
07:24chadmedthe clocks are the wrong way around in t600x-j314-j316.dts
07:30chadmedhuh nvm that was a fluke?
07:56Mary has quit [Quit: The Lounge - https://thelounge.chat]
08:00Mary has joined #asahi-dev
08:00Mary has quit []
08:04jeffmiw has joined #asahi-dev
08:05jluthra has quit [Remote host closed the connection]
08:05jluthra has joined #asahi-dev
08:07jeffmiwthe idea to have the hwmon driver as generic as possible and putting all sensors in the different DTs makes sense. I'll go in that direction for now and see how it goes.
08:08povikchadmed: hmm? not sure what you refer to, there are no audio clocks in that file other than the assignment to nco_clkref
08:09chadmedyeah i didnt realise that stuff had gone, but when i switched the speakers to the primary backend and the jack to the secondary the speakers started working
08:09chadmedbut i think it was a fluke because i rebooted and tried that again and it didnt work
08:10povikah so you were editing mclk-fs=? or what were you doing?
08:11chadmedno i havent edited the dt at all yet, i literally just changed the backends in alsamixer and it worked
08:12chadmedwhich just made me think that the wrong clock is being assigned to the "Secondary" backend/PCM
08:13thelounge7571340 has quit [Remote host closed the connection]
08:13jannaumarcan: in the worst case you could skip the patch and both "Add MCA and its support" patches. the main dt patches don't have an admac node
08:15thelounge7571340 has joined #asahi-dev
08:20povikchadmed: secondary/primary would be frontends, it's puzzling but i don't think a wrong clock explains it
08:20povikjannau: what's the issue? the admac binding change has an ack, no?
08:24jannaumarcan wanted a review from Rob
08:24Mary has joined #asahi-dev
08:25povikseems to me like marcan got confused, and Rob was replying to being mentioned in the SMC/hwmon discussion
08:27marcanoh, yeah, the latter can wait
08:27marcanI don't see a robher ack to the admac change though?
08:29povikwe have a Krzysztof ack
08:30poviki thought that has the ~same weight :p
08:32povikjannau: ah you are right
08:35jannaubut Krzysztof is also listed as dt bindings maintainer so his acked-by should be enough
09:06Race has quit [Ping timeout: 480 seconds]
09:15thelounge7571340 has quit [Remote host closed the connection]
09:18thelounge7571340 has joined #asahi-dev
09:30svendottedmag: thanks, will take a look later
09:30sveni'll probably ask you to do another trace with dcp but that'll likely take a few weeks anyway
09:30sveni'll first finish bluetooth v3
09:33svenlooks like it uses dispext0,0 and dispext0,1 though
09:33svenso maybe we can route that to the two separate ports and actually support two screens (possibly at a limited resolution)
10:18thelounge7571340 has quit [Read error: Connection reset by peer]
10:21thelounge7571340 has joined #asahi-dev
10:25mpsah, so asahi-wip boots now on m1pro. time to build it again
10:30chadmedsven: do you still need/want a trace from a dual DP output tb dock? i can have that for you by tuesday if you do
10:31svenI think I know what’ll happen but it’ll be interesting to see
10:33chadmedim curious to see if theyve build their monitor support limits into the hardware now. apple only officially support 1 monitor or two mirrored streams on a single tb3 port but on intel macs under linux you get whatever the display controller/tb controller can support in hardware
10:33chadmedthey used to enforce their official limits in the macos driver so im hoping they still do that
10:34svenI’m pretty sure I can route dispext0,{0,1} to different ports but the DCP firmware itself might not be happy with that
10:35svenwell, and right now I can’t even get a single screen to work because some DCP magic is missing ofc :D
10:44chadmed has quit [Remote host closed the connection]
10:53gabuscus_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
10:53gabuscus has joined #asahi-dev
11:07thelounge7571340 has quit [Remote host closed the connection]
11:11thelounge7571340 has joined #asahi-dev
11:25chadmed has joined #asahi-dev
11:28chadmedcouldnt help myself
11:29chadmedtrying to go to the system display settings explodes the hypervisor and the machine revs up the fans which is odd
11:30svenlooks like it enables a single stream via DPIN0
11:30sveni.e. dispext0,0 -> dpin0
11:33chadmedthats congruent with how macos lets you interact with dual monitors over a single tb3 port, they only ever show up as a single display in system settings and system information
11:34sventhat sounds pretty weird
11:34chadmedyeah it just hides the second one from you, same on intel macs
11:34jannauare the displays mirrored?
11:34sventhey should be able to use two dcpext0 and 1 and route them to dpin0/1
11:34chadmedyeah thats the only mode macos lets you use
11:35jannauI think the hub has then probably a displayport mst hub inside
11:35chadmedmaybe, though it has a separate "mirror" output, the two i have my monitors plugged into are supposed to be independent
11:36chadmedthey are totally independent under linux and i can drive them up to 165hz
11:36jannauit sounds consistant with the behaviour I see on the dell thunderbolt 4 dock
11:37jannaudoes macos support dp mst at all?
11:37chadmedcursory googling suggests mst hubs and docks just dont work with macos at all
11:37dottedmagjannau: It drives 5K (tiled) monitor for me through Thunderbolt. Is it DP MST?
11:38sventhat trace looked like it was sending two separate streams using dpin0 and dpin1
11:39jannauon a display sold by apple (before the studio display)
11:39* svenis afraid this will be even more cursed than he thought
11:42chadmedhm the feature matrix for the dock i has makes it look like it does use mst
11:43chadmedon thinkpads with the builtin display on it reckons you cant use two monitors at once
11:43chadmedbut thats a bunch of bs because i am typing right now on a 2017 macbook pro connected to it with both DP monitors running independently?
11:43chadmed(with the builtin LCD on)
11:46chadmedit supports 2x 4K60 displays at any given time, that's too much bandwidth for a single DP1.4 stream
11:49gladiac has joined #asahi-dev
12:04jannaudp 1.3/1.4 supports 2x 4k60 displays at 24 bpp. MST allows splitting the bandwidth of a displayport link for multiple displays. it doesn't increase the bandwidth of the display link itself
12:08jannauI guess dcp tunnels 2 dp 1.4 links over thunderbolt to get 40 gbps instead of 26 gbps of a single dp 1.4 links
12:11thelounge7571340 has quit [Remote host closed the connection]
12:11chadmedoh right DSC, forgot about that
12:12thelounge7571340 has joined #asahi-dev
12:13jannauno, even without dsc / 4:2:2
12:16chadmedoh so it does
12:17chadmedi should get the tb4 dock and see if it behaves any different in the trace
12:18chadmedapple enforcing no dual output over tb3 confounds this
12:19chadmedits a long shot, thered be no reason to treat them any differently from xbar's pov (i dont think) but who knows
12:43jannaudual output over thunderbolt 4 works on t600x, it routes two dispext over crossbars 2 dp inputs
13:12thelounge7571340 has quit [Remote host closed the connection]
13:14thelounge7571340 has joined #asahi-dev
13:27gladiac has quit [Quit: Ping timeout (120 seconds)]
13:27gladiac has joined #asahi-dev
13:35kov has joined #asahi-dev
13:44ChaosPrincess has quit [Quit: WeeChat 3.5]
13:44ChaosPrincess has joined #asahi-dev
14:07jeffmiw has quit [Remote host closed the connection]
14:08marcansadly the asmedia firmware upload thing doesn't seem to actually work on the imac :(
14:08marcanbut other than that, just pushed some major upgrades to asahi-scripts and related stuff
14:08marcanto asahi-dev
14:08marcanhopefully this fixes the firmware extraction race conditions
14:09tpw_ruleswhat exactly is asahi-dev? the PKGBUILDs?
14:09marcanthe pacman repo
14:11marcanoh weird
14:11marcanit does work under the hypervisor
14:12marcanbut not bare metal, or not the arch linux package, or something
14:12marcanmysterious
14:12marcanunless the firmware is just wrong?
14:13marcannope, same sha1
14:13marcaninteresting...
14:14thelounge7571340 has quit [Remote host closed the connection]
14:17thelounge7571340 has joined #asahi-dev
14:23marcanah, it was just a timing issue. looks like were right on the edge for the reset timeout, the HV time stealing was making it work.
14:23marcanalright, going to push another kernel bump
14:33povikmarcan: jannau opened it as a draft PR, but i suggest just going ahead with the asahi UCM package
14:34povikit should finally fix the 'having to go to alsamixer for jack volume' issue at the very least
14:39marcanyeah, it's on my list :)
14:39marcanpushed the new kernel for now, also includes the t8103 power domain fix
14:39marcaniMac USB works now
14:39marcanalso fixed up the power button on desktops
14:40jannauit's only draft since I wasn't sure about the meta dependency and the location to grab the source from
14:41jannauI guess you can't submit to the alsa-ucm-conf repo before the drivers and dtb changes are at least ready for review
14:42jannau6.0.0-rc5-asahi-2-1-ARCH boots on m2 mbp
14:44jannauand handled using the esp as /boot with systemd-boot fine
14:44marcanI assume asahi-4-1 does too (only differences are the xhci timeout and macsmc hid code)
14:45marcanand yes, all that stuff should now know how to deal with the ESP being in /boot
14:46marcanjannau: also, can you check if the fwextract stuff worked? you should have /lib/firmware/asmedia
14:49jannauyes, only annoyance is that asm2214a-apple.bin has EPOCH as timestamp
14:53jannaumkinitcpio doesn't seem to handle 'MODULE_FIRMWARE("apple/tpmtfw-*.bin");' it warns about "ossibly missing firmware for module: dockchannel_hid"
15:15amarioguy has joined #asahi-dev
15:16thelounge7571340 has quit [Remote host closed the connection]
15:18thelounge7571340 has joined #asahi-dev
15:20marcanyeah, none of that matters, in fact I might want to make it just ignore all apple firmware anyway somehow
16:01marcanjannau: bunch of yak shaving going on in the Fedora Asahi matrix, I have some ideas for how to redo this whole firmware mess
16:02marcantl;dr the kernel already knows how to load firmware from multiple paths. Add /lib/firmware/vendor, change vendorfw from a tar to a cpio, then for /boot=/efi systems the bootloader can just load the firmware into the initramfs directly. then /lib/firmware/vendor could be just a directory, or a tmpfs, or whatever, for systems with immutable root.
16:03marcan(I'll keep the vendorfw tar around for a while to allow other systems to transition, especially bsd; the cpio can be used the same as the tar, it just needs a different unpacker, but can also be used as an initramfs)
16:06tpw_ruleshow do you propose to add that additional path?
16:06marcankernel patch
16:06marcanthere's also a commandline argument though
16:07marcanbut I think it makes sense hardcoded in the long term
16:07marcan/lib/firmware/updates is already in the list
16:07marcanit's just adding one more entry
16:07tpw_rulesyeah that's the thing, nixos already uses the command line argument and there can only ever be one. adding a patch should be totally fine
16:15ckb has quit [Remote host closed the connection]
16:15tpw_ruleshow is the bootloader instructed to load the firmware? i feel like i'm missing something there
16:18thelounge7571340 has quit [Remote host closed the connection]
16:20ckb has joined #asahi-dev
16:21thelounge7571340 has joined #asahi-dev
16:26marcanit's just an initrd
16:26marcangrub supports multiple
17:10thelounge7571340 has quit [Ping timeout: 480 seconds]
18:09thelounge7571340 has joined #asahi-dev
19:09chipxxx has joined #asahi-dev
19:09thelounge7571340 has quit [Remote host closed the connection]
19:13jannauthere's precedent for appending a cpio with firmware in Debian's nettboot installer: https://wiki.debian.org/DebianInstaller/NetbootFirmware
19:18thelounge7571340 has joined #asahi-dev
19:26duban6 has quit []
19:30duban6 has joined #asahi-dev
19:31dingodoppelt has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
19:31dingodoppelt has joined #asahi-dev
19:53gladiac has quit [Quit: k thx bye]
20:18thelounge7571340 has quit [Remote host closed the connection]
20:21jmr2 has joined #asahi-dev
20:22jmr2jannau: unless you want to do it through m1n1, in which case a tiny bit of extra magic is needed. https://github.com/AsahiLinux/m1n1/issues/157
20:22thelounge7571340 has joined #asahi-dev
20:23c10l has quit [Quit: Ping timeout (120 seconds)]
20:27c10l has joined #asahi-dev
20:38jmr2 has quit [Remote host closed the connection]
21:22thelounge7571340 has quit [Remote host closed the connection]
21:23thelounge7571340 has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi-dev
22:04SSJ_GZ has quit [Read error: Connection reset by peer]
22:18yuyichao has quit [Remote host closed the connection]
22:18yuyichao has joined #asahi-dev
22:23thelounge7571340 has quit [Remote host closed the connection]
22:24thelounge7571340 has joined #asahi-dev
22:41quaffpotion[m] has joined #asahi-dev
23:24thelounge7571340 has quit [Remote host closed the connection]
23:25thelounge7571340 has joined #asahi-dev
…