witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
witchbutter has joined #asahi-dev
witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
witchbutter has joined #asahi-dev
DarkShadow44 has joined #asahi-dev
daren_jojo has joined #asahi-dev
millenialhacker has joined #asahi-dev
andymc73[m] has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
kov has joined #asahi-dev
pseigo_ has quit []
pseigo_ has joined #asahi-dev
PhilippvK has joined #asahi-dev
phiologe has quit [Ping timeout: 480 seconds]
daren_jojo has quit [Remote host closed the connection]
nicolas17 has quit [Quit: Konversation terminated!]
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi-dev
nickchan has joined #asahi-dev
nickchan has quit []
nickchan has joined #asahi-dev
witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nickchan has quit [Quit: nickchan]
nickchan has joined #asahi-dev
witchbutter has joined #asahi-dev
nickchan has quit [Quit: nickchan]
nickchan has joined #asahi-dev
jluthra has quit [Remote host closed the connection]
jluthra has joined #asahi-dev
chadmed_ has joined #asahi-dev
chadmed_ has quit [Remote host closed the connection]
MajorBiscuit has joined #asahi-dev
Major_Biscuit has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millenialhacker has joined #asahi-dev
yamii has joined #asahi-dev
millenialhacker has quit [Read error: No route to host]
pseigo_ has quit [Ping timeout: 480 seconds]
<chadmed>
hm interesting
<chadmed>
i added some floating point divisions and FMAs to the "power virus" thing i was working on
<chadmed>
and the supposed "cluster power" on the firestorm cores goes ballistic whereas the icestorm cores dont seem to be affected at all
pseigo_ has joined #asahi-dev
kettenis has joined #asahi-dev
nickchan has quit [Quit: nickchan]
nickchan has joined #asahi-dev
<kettenis>
looks like I missed most of the fun yesterday
pseigo_ has quit [Read error: No route to host]
pseigo_ has joined #asahi-dev
nickchan has quit [Quit: nickchan]
nickchan has joined #asahi-dev
millenialhacker has joined #asahi-dev
nickchan has quit [Quit: nickchan]
nickchan has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
nickchan has quit [Quit: nickchan]
nickchan has joined #asahi-dev
mrkajetanp_ has joined #asahi-dev
psykose has quit [Remote host closed the connection]
psykose has joined #asahi-dev
nickchan has quit [Quit: nickchan]
<chadmed>
if anyone's feeling like doing some testing, i've pushed some devicetree updates for t8103 and t600x that enable EAS with no extra changes. i've been testing myself on a t6000 for ~2 months
<chadmed>
results so far: slightly cooler running machines, ~2ish hours of extra battery life, no performance regression in day to day tasks, stable
<chadmed>
would be nice to get a bigger sample size than 1 though
<chadmed>
since the cpufreq driver already registers the energy model if the data is in the device tree, you can just build the DTs from this branch and put them on top of linux-asahi and itll work as long as the module loads
<marcan>
(moving from #asahi) re MTP on the t8112, looks like they moved one of two firmwares wholesale from the trackpad to the M2 indeed
<marcan>
looks like the usual standard ASC, probably with a very simple interface, like NVMe, and then they moved the actual SPI stuff to a dockchannel
<j`ey>
chadmed: nice work!
<marcan>
I already looked at dockchannel way back. it's a very, very simple interface, just two FIFOs you read and write bytes from
<marcan>
and some IRQs I guess
<marcan>
main question is how do we organize this in our devicetree/drivers
<j`ey>
what do you mean 'to the M2'?
<marcan>
like inside
<marcan>
it's a copro now
<j`ey>
ah
<marcan>
in principle, there are three independent pieces of code here: the RTKit/ASC stuff, the dockchannel driver, and the consumer which just exposes HID over dockchannel
<marcan>
does Linux have any subsystem abstraction that fits dockchannel? it's... like a serial port but even dumber
<marcan>
basically "character device but in the kernel"
<j`ey>
yeah, drivers/soc/apple :P
<marcan>
:p
<marcan>
but yeah, what I'm wondering is how to structure this in the DT. dockchannels exist without an associated ASC (e.g. the debug one), hypothetically we could have multiple dockchannels handled by one ASC...
<marcan>
the ASC needs to be at least some kind of device link to everything else so they know when the other side is up
<marcan>
but other than that... different nodes?
<marcan>
for NVMe we made everything one node (unlike apple), which may or may not have been the right decision given NVMe does not really talk to the ASC, but at least AIUI there are some debug commands that go via the DART address space so that's some argument for how we did it there
<marcan>
but in this case I get the feeling the dockchannel driver should not be kicking the ASC itself
<sven>
yeah, all debug commands use SART
<sven>
now we could've added a ASC node and then attach SART to both that ASC and NVME but meh..
<marcan>
right...
<sven>
btw. do you know where that cal-blob for wifi comes from on ACPI platforms?
roxfan2 has joined #asahi-dev
<sven>
bluetooth really needs it to actually work and I figured I'd just add T2 support while i'm at it
<marcan>
on ACPI it's in ROM, we don't need to load it
<sven>
oh, nice!
millenialhacker has joined #asahi-dev
<marcan>
(no idea if BT is different, hope not...)
<sven>
i'll just assume it's the same for now. if only BT scanning works but pairing or connecting times out on T2 we'll have to go look for it there as well
roxfan has quit [Ping timeout: 480 seconds]
<mps>
chadmed: if it is enough to just rebuild DT I could try this evening on mbp (j293)
<mps>
chadmed: and which module have to be loaded, I didn't understood
millenialhacker has quit [Ping timeout: 480 seconds]
<chadmed>
mps: you just need the apple cpufreq driver to work. for me it wouldnt load automatically and i had to make a rule for it in modules-load.d so just make sure its actually loaded with lsmod
<marcan>
sven: what do you think about creating a "simple rtkit" device that is really just a no-op, that other devices can depend on via producer/consumer type stuff?
<marcan>
just binding to apple,asc4-helper for now, the -mtp versions are in case it turns out we need some MTP-specific RTKit level nonsense after all in the future, and the t8112 variants the usual SoC specific compatibles
<mps>
chadmed: ah, ok. I already have it loaded. I'm using conservative governor
<marcan>
(cc robher)
<j`ey>
chadmed: did you need any Kconfig options for EAS? (after a quick grep I dont see any, so I guess it's always there)
<marcan>
then the dockchannel... that should probably be something like i2c/spi, with a parent dockchannel device and a child node that represents the consumer?
<marcan>
(possibly multiple if we have multiple dockchannels or need to group them for some reason)
<marcan>
with a link to the helper rtkit device, just to make sure it's up first
<marcan>
actually the link would be to the dockchannel consumer
<marcan>
since dockchannel doesn't care if the ASC is up, the HID interface on top does
<marcan>
another potential dockchannel consumer would be a simple tty/uart device (that would expose the debug dockchannel)
<chadmed>
j`ey: CONFIG_ENERGY_MODEL and the schedutil governor is all you should need for it to work
<j`ey>
marcan: Im a bit confused how the dockchannel and ASC relate here. is it that the ASC/rtkit is just to boot up the coproc (I think similar to how the nvme asc is booted but never talked to from the driver), and the dockchannel is the actual communicatiom from the main CPU to the ASC? (and the ASC contains the actual SPI driver)
<marcan>
correct
<marcan>
dockchannel is a dumb fifo between the coprocessors, which is used here in lieu of RTKit mailbox stuff for the actual touchpad
<j`ey>
marcan: thanks and chadmed thanks
<marcan>
it replaces SPI from the point of view of the OS
<marcan>
the ASC contains the actual SPI driver but it doesn't talk the old protocol, it talks some lower level whatever to the raw chip
<marcan>
the ASC is doing all the trackpad multitouch algorithmic magic, force touch, etc
<mps>
chadmed: also I had to add it to /etc/modules to be loaded
<mps>
uhm, sorry
<mps>
(looked at backlog)
<j`ey>
marcan: I wonder why they went with dock channel here rather than rtkit
<marcan>
*shrug*
<marcan>
someone said "give me something like a SPI/whatever uart" and they had dockchannel lying around
<chadmed>
mps: youll need to change to the schedutil governor btw, wont work with conservative
<mps>
chadmed: yes, I see
<marcan>
ah, I found the Broadcom firmware for the M2. It's still there, just next to the touch bar firmware for some silly reason.
<marcan>
that one shrank too
the_lanetly_052 has joined #asahi-dev
<marcan>
so it looks like they moved a big pile of functionality from the STM32 and BCM5976 alike into the ASC. Not sure if they kept the same STM32 or it's a smaller one now. Both firmwares are tiny compared to the originals.
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
<sven>
marcan: I guess that'll work for anything that more-or-less treats rtkit stuff as something like a clock or power domain. we might also need some way to trigger a rtkit reset then
<mps>
chadmed: is it possible to somehow see improvements or just experience
zx2c4_ has left #asahi-dev [#asahi-dev]
<chadmed>
you could A/B test with the old DT and compare battery life but its hard to create a reproducible workload that will sufficiently challenge the scheduler, its mostly an experience thing
<chadmed>
the machine should be cooler and the battery life should be longer which is what matters anyway
<sven>
marcan: btw., which broadcom chip does the M2 use? still 4378/4387?
<mps>
chadmed: yes, I will try to follow battery status. and on these external temperatures I don't think I could 'feel' differences :)
<mps>
chadmed: scaling_governor should be schedutil?
<mps>
for both cores?
<chadmed>
yeah
<mps>
good, already set it
<mps>
thanks
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
Catyre_ has joined #asahi-dev
johey has joined #asahi-dev
Catyre has quit [Ping timeout: 480 seconds]
pjakobsson has quit [Remote host closed the connection]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
Catyre_ has quit [Remote host closed the connection]
Catyre has joined #asahi-dev
Catyre has quit [Read error: Connection reset by peer]
Catyre has joined #asahi-dev
Gaspare has joined #asahi-dev
Catyre_ has joined #asahi-dev
Catyre has quit [Ping timeout: 480 seconds]
Catyre_ has quit [Remote host closed the connection]
Gaspare has quit [Quit: Gaspare]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Remote host closed the connection]
witchbutter has joined #asahi-dev
millenialhacker has joined #asahi-dev
witchbutter has quit []
millenialhacker has quit [Ping timeout: 480 seconds]
witchbutter has joined #asahi-dev
Catyre has joined #asahi-dev
witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sven>
<sven> i have nothing else to test it with and these airpods works with my other non-apple linux machine
rowang077[m] has left #asahi-dev [#asahi-dev]
<sven>
the main issue probably is device -> host IPC. i don't quite understand the idea behind that mess yet
<sven>
there's a transmission and a completion queue and device->host IPC works by putting an entry on the completion queue (nope, this doesn't make sense) and then the host advances the non-existing transmission queue (this also doesn't make sense)
witchbutter has joined #asahi-dev
<sven>
I think the "advance the non-existing transmission queue" is their hack to generate an interrupt on the device
pseigo_ has quit [Ping timeout: 480 seconds]
<j`ey>
sven: is there any buttons like volume control, just thinking about some other intercation you could try
nicolas17 has joined #asahi-dev
<sven>
nah, this is 99% something dumb. There’s something broken with how I handle these ipc queues
<sven>
hci traffic works fine but audio goes over a different pipe that behaves slightly different
<sven>
i can see that something goes horribly wrong with btmon ;)
<j`ey>
is that a wireshark-like thing?
<sven>
yeah, tcpdump for Bluetooth
Gaspare has quit [Quit: Gaspare]
Gaspare has joined #asahi-dev
Major_Biscuit has quit [Ping timeout: 480 seconds]
the_lanetly_052 has quit [Ping timeout: 480 seconds]
pseigo_ has joined #asahi-dev
nickchan has quit [Quit: nickchan]
Gaspare has quit [Quit: Gaspare]
nickchan has joined #asahi-dev
nickchan has quit []
nickchan has joined #asahi-dev
pseigo_ has quit [Read error: No route to host]
pseigo_ has joined #asahi-dev
Gaspare has joined #asahi-dev
<sven>
aaaand it works 😌
<j`ey>
sven: woo, so was itsome IPC issue?
<sven>
yeah, and maybe also an issue with the calibration blob
<sven>
i sent the wrong one because strcmp returns 0 when the strings are equal and had an if(strcmp(…))
<j`ey>
ah yes, done that one before
<sven>
oh, and the MAC address was byteswapped but I doubt that actually caused any issues
pseigo_ has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
Gaspare has quit [Quit: Gaspare]
millenialhacker has quit [Ping timeout: 480 seconds]
rustylerp has joined #asahi-dev
Revy has joined #asahi-dev
pseigo_ has joined #asahi-dev
rustylerp has quit []
Catyre_ has joined #asahi-dev
Catyre has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
pseigo_ has quit [Ping timeout: 480 seconds]
pseigo_ has joined #asahi-dev
Catyre has joined #asahi-dev
Catyre__ has joined #asahi-dev
Catyre___ has joined #asahi-dev
Catyre_ has quit [Ping timeout: 480 seconds]
Gaspare has joined #asahi-dev
Catyre has quit [Ping timeout: 480 seconds]
Catyre__ has quit [Ping timeout: 480 seconds]
pseigo_ has quit [Ping timeout: 480 seconds]
witchbutter has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-dev
riker77_ has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
riker77 has quit [Ping timeout: 480 seconds]
riker77_ is now known as riker77
Catyre has joined #asahi-dev
Catyre has quit []
nsklaus_ has joined #asahi-dev
Gaspare has quit [Read error: Connection reset by peer]
nsklaus has quit [Ping timeout: 480 seconds]
kettenis has quit [Ping timeout: 480 seconds]
kettenis has joined #asahi-dev
millenialhacker has joined #asahi-dev
Catyre has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]
Catyre___ has quit [Ping timeout: 480 seconds]
Catyre_ has joined #asahi-dev
Catyre has quit [Ping timeout: 480 seconds]
kettenis has quit [Ping timeout: 480 seconds]
amarioguy has quit [Remote host closed the connection]
KamikazePlatypus has joined #asahi-dev
KamikazePlatypus has quit [Quit: Leaving...]
KamikazePlatypus has joined #asahi-dev
millenialhacker has joined #asahi-dev
millenialhacker has quit [Ping timeout: 480 seconds]