ChanServ 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
hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
chadmed has joined #asahi-dev
seeeath has quit []
<chadmed> jeffmiw: can i suggest making the dt binding an array of elements which contain a key and label? that should be a little nicer to read too
<chadmed> also the smc core driver has its own float conversion function now with scaling support so its probably best to use that instead of duplicating that functionality in the hwmon driver
seeeath has joined #asahi-dev
seeeath has quit []
qyliss has quit [Remote host closed the connection]
qyliss has joined #asahi-dev
bisko has joined #asahi-dev
seeeath has joined #asahi-dev
seeeath has quit []
seeeath has joined #asahi-dev
seeeath has quit []
bisko has quit [Ping timeout: 480 seconds]
amarioguy has quit [Remote host closed the connection]
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
salimterryli has quit [Ping timeout: 480 seconds]
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi-dev
hertz has joined #asahi-dev
bluetail has quit [Quit: The Lounge - https://thelounge.chat]
eiln has joined #asahi-dev
<eiln> what's the preferred way to send a mini patch? would like to send the power/dpe tunables
eiln has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
<Keyaedisa> hello, i have experience with arch linux and have jus got a 2023 M2 Mac Macbook Pro. i'd like to know if i could be of any help as id like to get arch running on this macbook
bluetail has joined #asahi-dev
mini0n has quit [Remote host closed the connection]
Keyaedisa has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
bisko has joined #asahi-dev
Keyaedisa has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
<marcan> chadmed, povik: what's the status for the visense/speaker safety stuff? I'm thinking I want to work on that myself soon
bisko has quit [Ping timeout: 480 seconds]
<marcan> not sure if this should be part of the production daemon or a separate research thing in Python, but we need a way to play test tones and do temperature measurements to validate the models
Keyaedisa has quit [Ping timeout: 480 seconds]
<marcan> (temperature can be estimated from VI data if the signal is a well-behaved test tone)
<marcan> and then I want to use that to derive models for the M1 laptops that don't have them
bisko has joined #asahi-dev
cylm_ has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
<marcan> povik: I think you asked and I'm not sure if I ever answered, but I just checked and at least j313 does have feedback from the speaker amps wired up back to the SoC
bisko has quit [Ping timeout: 480 seconds]
maor26 has joined #asahi-dev
<chadmed> im waiting for povik to wire up the kernel driver so i can fix the daemon and then validate things
eiln has joined #asahi-dev
<chadmed> the rust bindings for alsa-lib's PCM interface are far more complete than CTL was and getting samples seems pretty simple to do so once the kernel side is done it shouldnt take much to rejig the daemon and then we can get testing
Keyaedisa has quit [Remote host closed the connection]
bisko has joined #asahi-dev
<chadmed> i dont think we landed on a way to gate full output unless the daemon is running so it might be time to have that discussion in earnest too
<marcan> I'm happy to come up with something while I hack on it, it shouldn't be too difficult
bisko has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
<eiln> marcan: an engine failure can only be recovered via power domain reset, how would i go about this?
<eiln> takes only a single bit off in the convolution param descriptor (i guess microcode equivalent?)
<eiln> ive seen it from apple's own compiler
<eiln> the SYS pd shared with dart isn't needed for recovery, so no ctx/parents involved
<marcan> eiln: what do you mean? how to actually trigger the reset?
<marcan> if this is a pmgr power domain, it's hooked up as a reset provider so you can use the reset API
<marcan> see nvme/ANS which uses that feature
<marcan> you need to declare resets = <> in the DT and then use the standard APIs
<eiln> theyre all pmgr pds but aren't described in the dt
<eiln> thanks, looking into it rn
<marcan> oh, you're directly poking the PDs? if it's something the driver has to do they need to be added to the DT and you should use the standard APIs for that
<marcan> we don't want drivers poking PDs directly (yes apple does it, because their drivers are a mess)
<eiln> they're like sub-power domains w/ burst-style mgmt @ the kext level
Keyaedisa has joined #asahi-dev
<marcan> burst-style?
<marcan> if the registers are part of the pmgr area and follow the same rules as the regular PDs they should be regular PD instances in the DT
<eiln> shut off after every firmware call w/ 0.5sec-ish delay
<marcan> in Linux land that's called runtime PM with autosuspend delay
<marcan> so you *definitely* want to use the pmgr driver and hook it up like that then
<marcan> DCP does the same thing
<eiln> i've added them as normal PDs https://github.com/eiln/linux.git
<marcan> yeah, that looks right :)
<marcan> so if you need resets on those, just also add them into a resets = <> prop
<marcan> and then the reset APIs should just work
<marcan> are the 6 PDs arbitrarily numbered?
<marcan> you might want to add power-domain-names / reset-names and label them, so future bindings don't depend on strict ordering (you don't have to *use* that today, as long as the binding specifies a strict ordering today the driver can just use integer indices, it's more for future-proofing)
<marcan> grep around othe DTs for examples
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
eiln has quit [Remote host closed the connection]
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
<povik> marcan: i did ask and you haven't answered, but since then i started getting samples on j274 so indeed it looks like it's wired up on all models!
<povik> the status is that it's pretty much ready in https://github.com/povik/linux/tree/ivsense
<povik> (at least on j314)
<povik> i have been sitting on it as i still want to polish a few things
<marcan> nice :)
<marcan> think it's good enough to start doing experiments at least?
<marcan> (we need to do a bunch of modeling/validation/etc before we can ship this anyway)
<povik> well, i have been doing some experiments myself :p
<povik> this counts joules...
<povik> marcan: that repo is where the research you may need to do can go as well :)
<marcan> cool :)
<marcan> let's go with that then, calibration stuff in that repo and the Rust stuff chadmed is working on for production
<marcan> might start poking at this tomorrow
<marcan> first step is to replicate the expected model Apple uses and plug in their numbers and see if we come up with sensible temperature estimates that match reality
<marcan> then come up with some sensible governor algorithm for the volume and prove it works
<marcan> then port it to Rust and figure out how we want to do the safety interlock
<povik> btw to bring it up on a new model, you need to: 1. describe the sense data slots in DT; 2. uncomment the ISENSE/VSENSE switches being disabled in macaudio
<marcan> and finally I'll have to do some ad-hoc "oven" tests on the M1 laptops to get a calibration for the temperature measurement we can then use to derive a model
<marcan> povik: got it :)
<povik> err, i mean you need to *comment out* disabling of the switches
<chadmed> as a toy implementation ive just been using the thermal resistance of the voice coil as provided by apple to estimate temperature from a given power level but if we can get something more accurate then it shouldnt be too much effort to use that instead
<marcan> in principle it's a 2-stage model (voice coil and magnet temp)
<marcan> which is what I intend to implement
<marcan> for temperature measurement we need the voice coil resistance and tempco, which is known for the 14"+ laptops but not the 13" ones. resistance can just be measured with visense, tempco needs doing that at a few temperatures
<chadmed> yeah
<marcan> I'll try to come up with something sensible for that (probably involving a thermocouple, running the tests immediately after power-on for an ambient-temperature laptop, and sticking it in a few environments for an hour before each test
<marcan> at this time of the year, outdoors vs. my shower room with the clothes drying heater fan turned on should give decent range :p
<povik> measurements on a laptop that's initially freezing might be the most accurate
<povik> for estimating the parameters of the model
<marcan> freezing as in sub-zero?
<chadmed> thatll be great for the battery :P
<povik> not necessarily, just very cold :p
<marcan> I mean I can certainly do a fridge test :p
<marcan> I just need to get myself some kind of logging setup to make sure whatever environment I pick the temperature is stable enough to guarantee it reaches equilibrium
<marcan> https://www.amazon.co.jp/dp/B088H5KFT9/ that looks sensible, they have the (trivial) USB-serial protocol on their website
<marcan> meh, I think it ships from china, no prime and expensive shipping...
Keyaedisa has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
<marcan> aliexpress it is, less than half the price for something similar and not much slower
bisko has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
nullroute has quit [Read error: Connection reset by peer]
bisko has quit [Ping timeout: 480 seconds]
nullroute has joined #asahi-dev
bisko has joined #asahi-dev
bisko has quit []
nullroute has quit [Read error: Connection reset by peer]
nullroute has joined #asahi-dev
jluthra_ has quit [Remote host closed the connection]
jluthra_ has joined #asahi-dev
nullroute has quit [Ping timeout: 480 seconds]
nullroute has joined #asahi-dev
hexafox has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
roxfan has joined #asahi-dev
maor26 has quit [Read error: Connection reset by peer]
maor26 has joined #asahi-dev
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
hexafox has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
<sven> IOMFBStatus VideoInterfaceIOAV::plug_gated(IOAVVideoInterface *): display HPD asserted
<sven> *almost*
<sven> doesn't get any modes yet, either it needs additional DPTX calls or I'm missing something inside NHI
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
bcrumb has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.8]
Keyaedisa has quit [Ping timeout: 480 seconds]
maor has joined #asahi-dev
Keyaedisa has joined #asahi-dev
maor has quit [Read error: Connection reset by peer]
maor26 has quit [Ping timeout: 480 seconds]
maor26 has joined #asahi-dev
maor26 has quit [Read error: Connection reset by peer]
maor26 has joined #asahi-dev
cylm has joined #asahi-dev
nela has quit [Ping timeout: 480 seconds]
maor has joined #asahi-dev
maor26 has quit [Ping timeout: 480 seconds]
maor has quit [Read error: Connection reset by peer]
maor has joined #asahi-dev
maor26 has joined #asahi-dev
maor has quit [Ping timeout: 480 seconds]
maor26 has quit [Read error: Connection reset by peer]
maor26 has joined #asahi-dev
kit_ty_kate1 has joined #asahi-dev
kit_ty_kate has quit [Remote host closed the connection]
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
nela has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
bcrumb has joined #asahi-dev
Keyaedisa has joined #asahi-dev
roxfan has quit [Ping timeout: 480 seconds]
hertz has quit [Ping timeout: 480 seconds]
hertz has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.8]
bcrumb has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.8]
bcrumb has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
bcrumb has quit [Quit: WeeChat 3.8]
bcrumb has joined #asahi-dev
bcrumb has quit []
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
bcrumb has joined #asahi-dev
<jeffmiw> chamed: why not, do you have an example of such example of dt binding with array of 2 elements ? I will look for it but if you have something handy that will help. I'll check for the float conversion function in smc
<jeffmiw> I was working from an old tag. I'm planning to move to the edge one as a next step
bcrumb has quit [Quit: WeeChat 3.8]
bcrumb has joined #asahi-dev
Illya is now known as jdek
seeeath has joined #asahi-dev
jdek is now known as illya
illya is now known as jdek
jdek has left #asahi-dev [#asahi-dev]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Keyaedisa has joined #asahi-dev
bcrumb has quit [Quit: WeeChat 3.8]
Keyaedisa has quit [Ping timeout: 480 seconds]
amarioguy has joined #asahi-dev
Keyaedisa has joined #asahi-dev
zjstraus has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Remote host closed the connection]
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
seeeath has joined #asahi-dev
<chadmed> jeffmiw: have a look at the opp table for a good example of what i mean
Keyaedisa has joined #asahi-dev
Keyaedisa has quit [Ping timeout: 480 seconds]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
<povik> probable fix for the stuck ADMAC IRQs: https://tpaste.us/Vqbz
mkurz has quit [Ping timeout: 480 seconds]
seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seeeath has joined #asahi-dev
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
maor26 has quit [Quit: Leaving]
Keyaedisa has joined #asahi-dev