marcan changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | Non-development talk: #asahi | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
<chadmed[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
<chadmed[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
derzahl has joined #asahi-dev
<marcan> IMO the sensors should go in the DT. the driver is otherwise completely generic. I'd like robher's opinion on this though.
<marcan> we'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
thelounge7571340 has quit [Remote host closed the connection]
<chadmed[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
thelounge7571340 has joined #asahi-dev
<robher> marcan: I'm offline the next week so will have to look at it later.
<marcan> it's just adding iommus and power-domains props :)
thelounge7571340 has quit [Remote host closed the connection]
Race has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
jlco has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
duban6 has quit []
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
duban6 has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
SSJ_GZ has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
jakebot602 has quit [Quit: Ping timeout (120 seconds)]
jakebot602 has joined #asahi-dev
kettenis has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
derzahl has quit [Ping timeout: 480 seconds]
<chadmed> povik: figured out the digital noise
<chadmed> the clocks are the wrong way around in t600x-j314-j316.dts
<chadmed> huh nvm that was a fluke?
Mary has quit [Quit: The Lounge - https://thelounge.chat]
Mary has joined #asahi-dev
Mary has quit []
jeffmiw has joined #asahi-dev
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
<jeffmiw> the 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.
<povik> chadmed: hmm? not sure what you refer to, there are no audio clocks in that file other than the assignment to nco_clkref
<chadmed> yeah 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
<chadmed> but i think it was a fluke because i rebooted and tried that again and it didnt work
<povik> ah so you were editing mclk-fs=? or what were you doing?
<chadmed> no i havent edited the dt at all yet, i literally just changed the backends in alsamixer and it worked
<chadmed> which just made me think that the wrong clock is being assigned to the "Secondary" backend/PCM
thelounge7571340 has quit [Remote host closed the connection]
<jannau> marcan: 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
thelounge7571340 has joined #asahi-dev
<povik> chadmed: secondary/primary would be frontends, it's puzzling but i don't think a wrong clock explains it
<povik> jannau: what's the issue? the admac binding change has an ack, no?
<jannau> marcan wanted a review from Rob
Mary has joined #asahi-dev
<povik> seems to me like marcan got confused, and Rob was replying to being mentioned in the SMC/hwmon discussion
<marcan> oh, yeah, the latter can wait
<marcan> I don't see a robher ack to the admac change though?
<povik> we have a Krzysztof ack
<povik> i thought that has the ~same weight :p
<povik> jannau: ah you are right
<jannau> but Krzysztof is also listed as dt bindings maintainer so his acked-by should be enough
Race has quit [Ping timeout: 480 seconds]
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
<sven> dottedmag: thanks, will take a look later
<sven> i'll probably ask you to do another trace with dcp but that'll likely take a few weeks anyway
<sven> i'll first finish bluetooth v3
<sven> looks like it uses dispext0,0 and dispext0,1 though
<sven> so maybe we can route that to the two separate ports and actually support two screens (possibly at a limited resolution)
thelounge7571340 has quit [Read error: Connection reset by peer]
thelounge7571340 has joined #asahi-dev
<mps> ah, so asahi-wip boots now on m1pro. time to build it again
<chadmed> sven: 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
<sven> sure!
<sven> I think I know what’ll happen but it’ll be interesting to see
<chadmed> im 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
<chadmed> they used to enforce their official limits in the macos driver so im hoping they still do that
<sven> I’m pretty sure I can route dispext0,{0,1} to different ports but the DCP firmware itself might not be happy with that
<sven> well, and right now I can’t even get a single screen to work because some DCP magic is missing ofc :D
chadmed has quit [Remote host closed the connection]
gabuscus_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
gabuscus has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
chadmed has joined #asahi-dev
<chadmed> couldnt help myself
<chadmed> trying to go to the system display settings explodes the hypervisor and the machine revs up the fans which is odd
<sven> lol
<sven> looks like it enables a single stream via DPIN0
<sven> i.e. dispext0,0 -> dpin0
<chadmed> thats 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
<sven> huh
<sven> that sounds pretty weird
<chadmed> yeah it just hides the second one from you, same on intel macs
<jannau> are the displays mirrored?
<sven> they should be able to use two dcpext0 and 1 and route them to dpin0/1
<chadmed> yeah thats the only mode macos lets you use
<sven> weird
<jannau> I think the hub has then probably a displayport mst hub inside
<chadmed> maybe, though it has a separate "mirror" output, the two i have my monitors plugged into are supposed to be independent
<chadmed> they are totally independent under linux and i can drive them up to 165hz
<jannau> it sounds consistant with the behaviour I see on the dell thunderbolt 4 dock
<jannau> does macos support dp mst at all?
<chadmed> cursory googling suggests mst hubs and docks just dont work with macos at all
<dottedmag> jannau: It drives 5K (tiled) monitor for me through Thunderbolt. Is it DP MST?
<sven> that trace looked like it was sending two separate streams using dpin0 and dpin1
<jannau> on a display sold by apple (before the studio display)
* sven is afraid this will be even more cursed than he thought
<chadmed> hm the feature matrix for the dock i has makes it look like it does use mst
<chadmed> on thinkpads with the builtin display on it reckons you cant use two monitors at once
<chadmed> but 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?
<chadmed> (with the builtin LCD on)
<chadmed> it supports 2x 4K60 displays at any given time, that's too much bandwidth for a single DP1.4 stream
gladiac has joined #asahi-dev
<jannau> dp 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
<jannau> I 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
thelounge7571340 has quit [Remote host closed the connection]
<chadmed> oh right DSC, forgot about that
thelounge7571340 has joined #asahi-dev
<jannau> no, even without dsc / 4:2:2
<chadmed> oh so it does
<chadmed> i should get the tb4 dock and see if it behaves any different in the trace
<chadmed> apple enforcing no dual output over tb3 confounds this
<chadmed> its a long shot, thered be no reason to treat them any differently from xbar's pov (i dont think) but who knows
<jannau> dual output over thunderbolt 4 works on t600x, it routes two dispext over crossbars 2 dp inputs
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
gladiac has quit [Quit: Ping timeout (120 seconds)]
gladiac has joined #asahi-dev
kov has joined #asahi-dev
ChaosPrincess has quit [Quit: WeeChat 3.5]
ChaosPrincess has joined #asahi-dev
jeffmiw has quit [Remote host closed the connection]
<marcan> sadly the asmedia firmware upload thing doesn't seem to actually work on the imac :(
<marcan> but other than that, just pushed some major upgrades to asahi-scripts and related stuff
<marcan> to asahi-dev
<marcan> hopefully this fixes the firmware extraction race conditions
<tpw_rules> what exactly is asahi-dev? the PKGBUILDs?
<marcan> the pacman repo
<marcan> oh weird
<marcan> it does work under the hypervisor
<marcan> but not bare metal, or not the arch linux package, or something
<marcan> mysterious
<marcan> unless the firmware is just wrong?
<marcan> nope, same sha1
<marcan> interesting...
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
<marcan> ah, 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.
<marcan> alright, going to push another kernel bump
<povik> marcan: jannau opened it as a draft PR, but i suggest just going ahead with the asahi UCM package
<povik> it should finally fix the 'having to go to alsamixer for jack volume' issue at the very least
<marcan> yeah, it's on my list :)
<marcan> pushed the new kernel for now, also includes the t8103 power domain fix
<marcan> iMac USB works now
<marcan> also fixed up the power button on desktops
<jannau> it's only draft since I wasn't sure about the meta dependency and the location to grab the source from
<jannau> I guess you can't submit to the alsa-ucm-conf repo before the drivers and dtb changes are at least ready for review
<jannau> 6.0.0-rc5-asahi-2-1-ARCH boots on m2 mbp
<jannau> and handled using the esp as /boot with systemd-boot fine
<marcan> I assume asahi-4-1 does too (only differences are the xhci timeout and macsmc hid code)
<marcan> and yes, all that stuff should now know how to deal with the ESP being in /boot
<marcan> jannau: also, can you check if the fwextract stuff worked? you should have /lib/firmware/asmedia
<jannau> yes, only annoyance is that asm2214a-apple.bin has EPOCH as timestamp
<jannau> mkinitcpio doesn't seem to handle 'MODULE_FIRMWARE("apple/tpmtfw-*.bin");' it warns about "ossibly missing firmware for module: dockchannel_hid"
amarioguy has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
<marcan> yeah, none of that matters, in fact I might want to make it just ignore all apple firmware anyway somehow
<marcan> jannau: bunch of yak shaving going on in the Fedora Asahi matrix, I have some ideas for how to redo this whole firmware mess
<marcan> tl;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.
<marcan> (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)
<tpw_rules> how do you propose to add that additional path?
<marcan> kernel patch
<tpw_rules> ok
<marcan> there's also a commandline argument though
<marcan> but I think it makes sense hardcoded in the long term
<marcan> /lib/firmware/updates is already in the list
<marcan> it's just adding one more entry
<tpw_rules> yeah 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
ckb has quit [Remote host closed the connection]
<tpw_rules> how is the bootloader instructed to load the firmware? i feel like i'm missing something there
thelounge7571340 has quit [Remote host closed the connection]
ckb has joined #asahi-dev
thelounge7571340 has joined #asahi-dev
<marcan> it's just an initrd
<marcan> grub supports multiple
thelounge7571340 has quit [Ping timeout: 480 seconds]
thelounge7571340 has joined #asahi-dev
chipxxx has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
<jannau> there's precedent for appending a cpio with firmware in Debian's nettboot installer: https://wiki.debian.org/DebianInstaller/NetbootFirmware
thelounge7571340 has joined #asahi-dev
duban6 has quit []
duban6 has joined #asahi-dev
dingodoppelt has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
dingodoppelt has joined #asahi-dev
gladiac has quit [Quit: k thx bye]
thelounge7571340 has quit [Remote host closed the connection]
jmr2 has joined #asahi-dev
<jmr2> jannau: 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
thelounge7571340 has joined #asahi-dev
c10l has quit [Quit: Ping timeout (120 seconds)]
c10l has joined #asahi-dev
jmr2 has quit [Remote host closed the connection]
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-dev
SSJ_GZ has quit [Read error: Connection reset by peer]
yuyichao has quit [Remote host closed the connection]
yuyichao has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev
quaffpotion[m] has joined #asahi-dev
thelounge7571340 has quit [Remote host closed the connection]
thelounge7571340 has joined #asahi-dev