#asahi-dev · 2024-08-06 15:27
j`eyah ok#asahi-dev · 2024-08-06 15:27
sventhere’s a net/phy or something like that #asahi-dev · 2024-08-06 15:27
svennope, not the same thing #asahi-dev · 2024-08-06 15:26
j`eysven: luckily there is another PHY in rust#asahi-dev · 2024-08-06 15:26
sventhanks! I have to rewrite half of atcphy anyway and wanted to see how much additional work just doing it in rust would be #asahi-dev · 2024-08-06 15:24
jannauhttps://lore.kernel.org/rust-for-linux/20240618234025.15036-1-dakr@redhat.com/T/#m14cae6b5c619e9057ae0d16bc41ef19070bb7de8 is what's currently under discussion#asahi-dev · 2024-08-06 15:19
jannausven: yes, "struct device" in 6.11-rc1 is the only thing already merged. there is bits/210-gpu and support branches in rust-4-linux#asahi-dev · 2024-08-06 14:52
svenhrm, so i take it there is almost no rust support stuff (like, say, platform device bindings) upstream so far?#asahi-dev · 2024-08-06 05:27
chadmed_trying to write 0/nothing outside of manual mode will also return -EINVAL #asahi-dev · 2024-08-06 05:27
chadmed_once a fan is in manual mode, it will respond to any request for a valid speed within its min/max range. writing 0/nothing will take it out of manual mode and any attempt to write a value outside of its safe range will return -EINVAL and do nothing#asahi-dev · 2024-08-06 05:26
chadmed_pushed some changes to how the fans are handled when in manual mode#asahi-dev · 2024-08-06 03:28
chadmed_so i think we definitely need to change the behaviour such that any out of bounds write just brings us back to auto control#asahi-dev · 2024-08-06 03:26
chadmed_the SMC doesnt actually limit the fan speed itself to the min and max :) #asahi-dev · 2024-08-06 03:25
chadmed_well uhh thats fun#asahi-dev · 2024-08-05 22:51
chadmed_based on latest asahi-wip so has all the required dt stuff too#asahi-dev · 2024-08-05 22:50
chadmed_https://github.com/chadmed/linux/tree/hwmon-fanset#asahi-dev · 2024-08-05 22:49
chadmed_maz: the branch that patch came from has jannau's write f32 in there, it's the previous commit#asahi-dev · 2024-08-05 21:41
amarioguygot it, honestly i forgot the tracing facility existed for m1n1 honestly so that's my bad, i'll get that up and running haha#asahi-dev · 2024-08-05 21:39
jannauamarioguy: I don't know. I suppose you're doing something different. Can you easily run your project under the HV? then I'd start with tracing and see what u-boot does different#asahi-dev · 2024-08-05 21:16
amarioguyik i'm asking a lot of pcie questions, my apologies i'm just finishing bringing up the asmedia controller for my project and need to shave the yaks to let it work#asahi-dev · 2024-08-05 21:14
amarioguyi'm hitting data aborts/serrors when doing 8 bit/16 bit writes to them, but it looks like U-boot can do non 32 bit writes just fine?#asahi-dev · 2024-08-05 21:14
amarioguyjannau: quick question, are you supposed to write to PCIe memory (like XHCI controller capability/operational regs) under the HV with 32 bit writes?#asahi-dev · 2024-08-05 15:21
mazah, lovely. I'll hack something together that doesn't require me to update the DT yet.#asahi-dev · 2024-08-05 15:18
jannauyou need something like https://github.com/jannau/linux/commit/06e97a76cad31f6fe4f86bf70976869ce0f62da5#asahi-dev · 2024-08-05 15:17
mazI'm pretty sure my DT is out of date (it doesn't contain any "apple,fan" property, but hopefully I can hack something.#asahi-dev · 2024-08-05 15:16
jannaufound in https://github.com/jannau/linux/commits/macsmc-hwmon/#asahi-dev · 2024-08-05 15:16
mazjannau: yup, found it. thanks.#asahi-dev · 2024-08-05 15:16
jannaumaz: https://github.com/jannau/linux/commit/e4c0db6de6954789e8176cef4c5a0ab2b8b30a77 for apple_smc_write_f32_scaled#asahi-dev · 2024-08-05 15:12
mazchadmed: which branch is this on? this patch calls apple_smc_write_f32_scaled(), which isn't defined.#asahi-dev · 2024-08-05 11:51
thasti^ignore#asahi-dev · 2024-08-05 11:49
thastiMikisu03#asahi-dev · 2024-08-05 11:43
chadmedbut i would rather avoid that entirely if we can, maybe a cute little dev_info if someone writes something silly to fan_target#asahi-dev · 2024-08-05 11:42
chadmedit would probably just throttle like the fanless macbooks tbh #asahi-dev · 2024-08-05 11:40
chaos_princessshouldnt the soc shut down on it's own if it trips a certain temp value? Not great ux, but i do not think you can actually melt it with a misconfiguration\#asahi-dev · 2024-08-05 11:33
chadmedi think this would basically negate any "help i melted my mac" possibility and we could remove the module param gate#asahi-dev · 2024-08-05 11:33
chadmedjannau: what do you think about making the driver reset the fan mode to auto and return -EINVAL if someone tries to write any value less than what SMC says is the min, as opposed to just writing a 0 #asahi-dev · 2024-08-05 11:22
chadmedecho -n ${RPM} | sudo tee /sys/class/hwmon/hwmon${n}/fan{0,1}_target#asahi-dev · 2024-08-05 11:21
chadmedbuild and runtime tested on m2 max studio on my end so you should be good to go #asahi-dev · 2024-08-05 11:20
chadmedmaz: https://github.com/chadmed/linux/commit/dacc14f73ae9c88a5b21c42377dde00284c079fb#asahi-dev · 2024-08-05 08:26
mazchadmed: cheers. poke me when you have something that needs testing -- I think I have the ideal workload! ;-)#asahi-dev · 2024-08-05 08:18
chadmedill sort it out in a little bit#asahi-dev · 2024-08-05 08:18
chadmedmaz: it's a series of patches that are unpleasant to try and shoehorn back into the version of the hwmon driver that got merged#asahi-dev · 2024-08-05 07:58
mazjannau: I'll happily carry such patch if you point me to it.#asahi-dev · 2024-08-04 11:00
chadmedmy main concern with it was just people melting their macs#asahi-dev · 2024-08-04 11:00
chadmedall the machines seem to have a minimum fan speed of about 1000 rpm so we can just return einval if someone tries to write a value lower than that too#asahi-dev · 2024-08-04 11:00
chadmedwe can just write it in and hide it behind a module param #asahi-dev · 2024-08-04 10:20
jannaubah, looking at it it'll be annoying to carry it out of tree#asahi-dev · 2024-08-04 10:14
jannaumaz: maybe turn the internal fan fully on? I'll look for the fan control patch#asahi-dev · 2024-08-04 09:31
mazanyone knows of an efficient way to add extra cooling to an M2-pro mini? Mine is cooking...