2023-01-22
00:09chadmed_ has quit [Remote host closed the connection]
00:09chadmed_ has joined #asahi-dev
00:21seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:01eiln has joined #asahi-dev
02:08faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:09faruk has joined #asahi-dev
02:14amarioguy has quit [Remote host closed the connection]
02:29seeeath has joined #asahi-dev
02:58eiln has quit [Remote host closed the connection]
03:10seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:57swaggie has joined #asahi-dev
03:58eiln has joined #asahi-dev
04:00eilnand ml is so watered down that ik people are gonna complain without a one-click unstable diffusion notebook to run
05:10chadmed_ has quit [Remote host closed the connection]
06:01faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:07chadmedi borrowed jeffmiw's float translation function because the one in smc-core kept giving a null pointer dereference, which i will look at fixing at some point
06:08chadmedits based mostly on jeffmiw's work but generalised so that it will be a bit nicer to maintain and work with multiple machines
06:11chadmedthe scaling on translated floats is incorrect for power readings but that can be easily rectified
07:51mkurz has quit [Remote host closed the connection]
07:51mkurz has joined #asahi-dev
08:49cylm has quit [Ping timeout: 480 seconds]
08:52marcanplus there are going to be combinatronics involved, e.g. you have certain SoC-tied things (like CLVR voltage rails on Pro/Max) and some machine-tied things (e.g. j314 vs j316 differences)
08:53marcanso we probably want to have it in the DT as separate includes much like the platforms themselves are handled
08:55chadmedyeah my thought on that was to end up with a per-machine smc binding for the match table, but that makes a bit more sense
08:56chadmedthe hwmon docs say something about the way applesmc-intel does it being non-preferred these days, and none of the recent hwmon drivers do anything like that
08:57svenoh well, here comes the usb curse: if I first use my apple tbt 3->2 adapter and then switch to this startech adapter acio hangs 🙃
09:02zzywysm has joined #asahi-dev
09:09zzywysm_ has quit [Ping timeout: 480 seconds]
09:46swaggie has quit [Remote host closed the connection]
09:47swaggie has joined #asahi-dev
09:48jeffmiwchamed: I'm working on an hwmon driver version that will have configurable labels when we know them and do that from the DT like previously discussed with marcan.
09:49chadmed_ has joined #asahi-dev
09:53jeffmiwby the way, if anyone has idea suggestion for the DT data/structure format or something that will be similar, I'm very interested :)
09:55swaggie has quit [Ping timeout: 480 seconds]
10:02swaggie has joined #asahi-dev
10:15swaggie has quit [Remote host closed the connection]
10:17swaggie has joined #asahi-dev
10:25swaggie has quit [Ping timeout: 480 seconds]
10:48swaggie has joined #asahi-dev
11:03kensan has joined #asahi-dev
11:08kensan has quit []
11:10swaggie has quit [Ping timeout: 480 seconds]
11:27kh has joined #asahi-dev
11:31marcanchadmed_: yeah the "don't build the hwmon_channel_info on the fly" thing falls under "lol subsystem maintainers think they can dictate how hardware works"
11:34swaggie has joined #asahi-dev
11:37kettenis_in the openbsd aplsmc(4) driver I simply have a list of keys we might be interested in and check which of them exist when the driver attaches
11:38kettenis_of course if Apple starts using the same key for wildly different purposes this won't work
11:42marcankettenis_: some keys have a different meaning on different systems because they are abstractly attached to power rails
11:42marcane.g. MPMU buck #1 might be two totally different things on different machines, and naming it "MPMU buck #1" erases all information useful for end users
11:43marcan(of course we don't have that data for everything, but we do for some machines, and that's nice)
11:44svenjannau: fwiw, I think at this point we might as well try to just writer our own small dwc3 driver that calls into the dwc3 core but is more aware of the annoying atcphy dance by hooking into the typec_mux stuff as well
11:44ChaosPrincessif we intend to unify smc drivers with intel machines, then how to define that data for intel systems where there is no DT
11:44svenjannau: especially with thunderbolt this seems to be very annoying to get right and end in even more ugly hacks
11:44marcanChaosPrincess: I don't think intel machines have anywhere near as many sensors as these; we could just have some defaults hardcoded in the driver and probe for existing keys like kettenis_ does for those
11:45ChaosPrincessso, just assume apple will not make new intel machines and have hardcoded tables in the driver?
11:45svenjannau: it looks like we e.g. don't need a dwc3 reset if we just switch from usb3-only to usb3/dp
11:46marcansven: works for me, we already have apple,dwc3 for this. might need a denylist in the generic dwc3 driver to make sure it doesn't probe on snps,dwc3 first.
11:47kettenis_having a consistent set of descriptions for those keys may be a challenge ("name of the power rail" vs. "what they're for")
11:47marcankettenis_: I'd just include both, flood users with info. repair people will love it, and it's cool. for stuff we don't have the info for, just roll with what we can guess.
11:48marcanit doesn't have to be consistent other than a few very well defined and stable keys, it has to be useful.
11:52kh has quit [Quit: Quit]
12:04chadmed_ChaosPrincess: 90% of that applesmc-intel driver can be factored out into an x86 backend for smc core
12:04ChaosPrincessand the other 90% is parsing of the keys
12:04ChaosPrincesssince they dont match
12:05robinp has joined #asahi-dev
12:05swaggie has quit [Ping timeout: 480 seconds]
12:08ChaosPrincessmarcan: dont they use a different data format
12:08ChaosPrincessint vs float and such
12:09ChaosPrincessand intel macs used some weird fixpoint format for some keys
12:09chadmed_would it be worth just not unifying them, but factoring out the backend stuff we can and still have an independent driver for the intel machines
12:12marcanonce we have fan/temp unified, the rest of what the intel driver is what... keyboard backlight and some ambient light sensor thing?
12:12marcanthose are easy enough to throw in for completeness and call the existing driver superseded
12:13marcanand in the meantime we can just have both drivers mutually exclusive in kconfig and let people pick
12:27marcanso apple silicon already has mixed key formats: most templeratures are 'flt ' (float32), but some are 'ioft' (16.16 fixed point). intel macs seem to use (at least) 'sp78' which is 8.8 fixed point (7.8 plus sign bit, but hopefully the sign bit is standard two's complement?)
12:27marcanthe driver needs to just enumerate all T??? keys, and grab the formats, and export everything it supports
12:30bcrumb has joined #asahi-dev
12:54amarioguy has joined #asahi-dev
12:58eiln has quit [Remote host closed the connection]
13:01swaggie has joined #asahi-dev
13:29swaggie has quit [Ping timeout: 480 seconds]
13:54svenhrm, there's a strange apciec1-piodma node in the ADT which seems to use the pciec dart for some reason
13:59jannaumarcan: please replace bits/020-t6000-dart with https://github.com/jannau/linux/tree/bits/020-t6000-dart - update to Thierry's v13 which hopefully gets merged for v6.3
14:02jannaumarcan: do you still want to "stabilize" asahi-wip soon? I would like to get the component based probing and runtime PM merged before 13.2 support
14:03marcanjannau: I think at this point we might just release everything together, so I'm happy to merge those in first
14:05bcrumb has quit [Quit: WeeChat 3.8]
14:06ChaosPrincessif you have time, mind looking at the touchbar prs?
14:07svenapciec[%s]::%s no PIODMA engine associated with this port <-- oh dear god, I'm not sure I want to know what that's about
14:13chadmed_ has quit [Ping timeout: 480 seconds]
14:13jannaumarcan: ok, I'll prepare it. not sure if I want to something about the PCIe dart runtime PM hack
14:14svenand DCP at least uses that piodma thing somehow internally. it's just weird that the thunderbolt pcie controller has that thing as wel
14:20m42uko_ has joined #asahi-dev
14:26m42uko has quit [Ping timeout: 480 seconds]
14:28kensan has joined #asahi-dev
14:34jannaumarcan: https://github.com/jannau/linux/tree/dcp_runtime_pm based on asahi-6.2-rc3-5 I hope you don't mind sorting the patches into their bits/* branches. creating PRs for all of them is a little tedious
14:35jannaudepends on https://github.com/AsahiLinux/m1n1/pull/272 and https://github.com/AsahiLinux/linux/pull/105
14:37jannaua0139ccbde88 can be dropped from bits/200-dcp wrong branch and change is already squashed in bits/020-t6000-dart
15:02marcan[ 211.940035] apple-dcp 38bc00000.dcp: RTKit wakeup timed out, trying reset. Please do not report bugs
15:15jannaubut I think I was mostly testing on t8103 without always-on added that only for the PR, it was always there for t600x and t8112 though
15:20bisko has joined #asahi-dev
15:24bisko has quit []
15:24jannauI see neither on t8103-j274 without always-on for ps_disp0_cpu0. testing now with always-on
15:27bisko has joined #asahi-dev
15:44bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:45jannaumarcan: reproduced with "soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode" reverted
15:52seeeath has joined #asahi-dev
15:59antonio2 has joined #asahi-dev
15:59jannaulooks ok. nice though that the reset recovered from this. I still consider the module reload and reset handling as unsupported
16:00marcanoh this one wasn't causing any badness, the rpm code just re-incremented the count so it was just cosmetic
16:03jannaudriver changes will be a little annoying. firmware specific call/callback tables and structures
16:04antonio2 has quit [Quit: Leaving]
16:05jannaumarcan: component (linux/component.h) based probing starts when the last missing component is probed
16:07jannauI think the wait_ready change is not that important. it prevents a "drm: crtc missing modes" during fbdev initailization
16:12marcanI'm thinking I might merge lina's new UAPI/rebase stuff plus rebase on the latest rc, and then after some smoke testing of that do a release to stable to see if we regress anything (which really should only affect -edge at that point)
16:13marcanand then when the M2 Pro/Max stuff is ready, release it together with promoting -edge stuff to stable
16:14marcanwhether something else makes it in there (audio? DP?) depends on timing at that point, TBD
16:33marcan[ 1.326413] WARNING: CPU: 4 PID: 460 at drivers/gpu/drm/drm_atomic_state_helper.c:174 drm_atomic_helper_crtc_duplicate_state+0x58/0x74
16:36marcanI'm guessing we might need to just cache backlight values somewhere before this stuff is ready?
16:36jannauthe backlight device gets only registered after dcp is (re)started and reports the current brightness
16:37marcanyeah but I think the issue is that there hasn't been a swap yet, so we don't have any atomic state
16:38marcanso I think systemd is probably triggering that immediately when the backlight device appears
16:39jannauok, missing swap or modeset sounds reasonable and it appears it's called then the backlight devices reappears
16:40jannaunot really happy with the backlight handling. I wish the drm backlight integration would progress faster
17:03faruk has joined #asahi-dev
17:04faruk has quit []
17:09seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:14seeeath has joined #asahi-dev
17:35seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:37faruk has joined #asahi-dev
17:50jeffmiw_ has joined #asahi-dev
17:56jeffmiw_ has quit [Remote host closed the connection]
18:08bcrumb has joined #asahi-dev
18:10hightower4 has quit [Ping timeout: 480 seconds]
18:11bcrumb has quit []
18:28gladiac has joined #asahi-dev
18:41jeffmiw_ has joined #asahi-dev
18:42jeffmiw_ has quit [Remote host closed the connection]
18:43swaggie has joined #asahi-dev
18:46thastihaving an interesting issue here (m2 air, on -edge): I'm trying to use an USB-C ethernet dongle. I can only get it to enumerate reliably by placing a finger on top of the USB traces on its PCB. Without doing that, it never enumerates (and I get repeated 'Cannot enable. Maybe the USB cable is bad?' or 'config error' messages in dmesg)
18:47thasticould that be caused by some USB-PHY setting, making the link not come up properly due to marginal signal integrity without my finger on the PCB?
19:00thastiI only have one other machine to test, but it seemed to work fine there. I should be able to test another machine or two at work tomorrow
19:02thastii at least two have two such devices (same model, both new out of box), and both of them behave exactly the same
19:03thastithis I haven't tried yet (haven't booted back into macos since I installed asahi on here)
19:12thasti.. turns out macOS actually doesn't boot any longer (telling me it needs to be reinstalled)
19:17bisko has joined #asahi-dev
19:26thastii can get them to appear sometimes with the same kind of trick, but without that they don't show up
19:30seeeath has joined #asahi-dev
19:30thastiyep, best guess it's just a marginal design (they were free, I probably know the reason why now...)
19:44bcrumb has joined #asahi-dev
19:46bcrumb_ has joined #asahi-dev
19:47swaggie has quit [Ping timeout: 480 seconds]
19:50bcrumb__ has joined #asahi-dev
19:50bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:53bcrumb has quit [Ping timeout: 480 seconds]
19:57bisko has joined #asahi-dev
19:57bcrumb_ has quit [Ping timeout: 480 seconds]
20:00bisko has quit []
20:03bcrumb__ has quit [Quit: WeeChat 3.8]
20:05bisko has joined #asahi-dev
20:14faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:16bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:18gladiac has quit [Quit: k thx bye]
20:26nicolas17 has joined #asahi-dev
20:39mkurz has quit [Quit: Leaving]
20:39bisko has joined #asahi-dev
20:40ChaosPrincessin theory should work on m2, but i do not have one
20:42nicolas17I have M2, but maybe you want some review/testing on M1 first, before messing with the M2 devicetree :P
20:47bisko has quit [Ping timeout: 480 seconds]
20:50faruk has joined #asahi-dev
21:09nicolas17 has quit [Ping timeout: 480 seconds]
21:10nicolas17 has joined #asahi-dev
21:12* thastifixed the USB ethernet dongles by shortening the wires between the USB-C cable pigtail and the PCB... now works reliably
21:14jluthra has quit [Remote host closed the connection]
21:15jluthra has joined #asahi-dev
21:30faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:30c10l1 has quit []
21:30c10l has joined #asahi-dev
21:30faruk has joined #asahi-dev
21:39faruk has quit [Ping timeout: 480 seconds]
21:58svenhrm, looks like apple's pciec driver has some quirks for certain devices that don't play nice with the rid2sid map
21:59svenand then there's a marvel-wa-viddids field in the ADT to select some devices that also get a special treatment
22:02svenohh... the PI7C9X442SL workaround makes sense I think. it's the controller in the old apple thunderbolt displays (like mine) and that one exposes three different pci functions
22:13svenyeah, that’s what I assume happens. but if we just go with mapping each bus to a separate sid it’ll just work without quirks
22:24seeeath_ has joined #asahi-dev
22:25hightower2 has joined #asahi-dev
22:30seeeath has quit [Ping timeout: 480 seconds]
22:51sawyer has joined #asahi-dev
22:52sawyerhi all, saw this in the tethered boot setup guide and wasn't sure if it was a placeholder or a reference that I'm just out-of-the-loop on: `A somewhat sane .config can be found at [[DesktopKernel]].`
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:12whomst has joined #asahi-dev
23:12whomst has quit []
23:12whomst has joined #asahi-dev
23:17whomst has quit []
23:20cylm has joined #asahi-dev
23:26seeeath_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:26seeeath has joined #asahi-dev
23:31yrlf has joined #asahi-dev
23:33seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:35seeeath has joined #asahi-dev
23:37seeeath has quit []
23:44whomst has joined #asahi-dev
23:53whomst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]