#
…

2022-06-28

00:09DarkShadow44 has quit [Quit: ZNC - https://znc.in]
00:12pseigo_ has joined #asahi-dev
00:18witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:19witchbutter has joined #asahi-dev
00:41witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:41witchbutter has joined #asahi-dev
00:56DarkShadow44 has joined #asahi-dev
00:58daren_jojo has joined #asahi-dev
01:14millenialhacker has joined #asahi-dev
01:20andymc73[m] has joined #asahi-dev
01:22millenialhacker has quit [Ping timeout: 480 seconds]
01:26kov has joined #asahi-dev
02:13pseigo_ has quit []
02:13pseigo_ has joined #asahi-dev
02:21PhilippvK has joined #asahi-dev
02:24phiologe has quit [Ping timeout: 480 seconds]
03:20daren_jojo has quit [Remote host closed the connection]
03:27nicolas17 has quit [Quit: Konversation terminated!]
03:38kov has quit [Quit: Coyote finally caught me]
03:38kov has joined #asahi-dev
03:41nickchan has joined #asahi-dev
03:44nickchan has quit []
04:09nickchan has joined #asahi-dev
04:16witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:56nickchan has quit [Quit: nickchan]
04:57nickchan has joined #asahi-dev
05:02witchbutter has joined #asahi-dev
05:17nickchan has quit [Quit: nickchan]
05:19nickchan has joined #asahi-dev
06:17jluthra has quit [Remote host closed the connection]
06:17jluthra has joined #asahi-dev
06:26chadmed_ has joined #asahi-dev
06:28chadmed_ has quit [Remote host closed the connection]
06:30MajorBiscuit has joined #asahi-dev
06:31Major_Biscuit has joined #asahi-dev
06:39MajorBiscuit has quit [Ping timeout: 480 seconds]
06:41witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:55millenialhacker has joined #asahi-dev
06:57yamii has joined #asahi-dev
07:00millenialhacker has quit [Read error: No route to host]
07:02pseigo_ has quit [Ping timeout: 480 seconds]
07:25chadmedhm interesting
07:26chadmedi added some floating point divisions and FMAs to the "power virus" thing i was working on
07:26chadmedand the supposed "cluster power" on the firestorm cores goes ballistic whereas the icestorm cores dont seem to be affected at all
07:56pseigo_ has joined #asahi-dev
08:12kettenis has joined #asahi-dev
08:24nickchan has quit [Quit: nickchan]
08:27nickchan has joined #asahi-dev
08:36kettenislooks like I missed most of the fun yesterday
08:44pseigo_ has quit [Read error: No route to host]
08:45pseigo_ has joined #asahi-dev
08:55nickchan has quit [Quit: nickchan]
08:56nickchan has joined #asahi-dev
09:11millenialhacker has joined #asahi-dev
09:13nickchan has quit [Quit: nickchan]
09:14nickchan has joined #asahi-dev
09:19millenialhacker has quit [Ping timeout: 480 seconds]
09:20nickchan has quit [Quit: nickchan]
09:21nickchan has joined #asahi-dev
09:25mrkajetanp_ has joined #asahi-dev
09:56psykose has quit [Remote host closed the connection]
09:57psykose has joined #asahi-dev
10:11nickchan has quit [Quit: nickchan]
10:25chadmedif 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
10:25chadmedresults so far: slightly cooler running machines, ~2ish hours of extra battery life, no performance regression in day to day tasks, stable
10:26chadmedwould be nice to get a bigger sample size than 1 though
10:28chadmedsince 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
10:28marcan(moving from #asahi) re MTP on the t8112, looks like they moved one of two firmwares wholesale from the trackpad to the M2 indeed
10:29marcanlooks like the usual standard ASC, probably with a very simple interface, like NVMe, and then they moved the actual SPI stuff to a dockchannel
10:29j`eychadmed: nice work!
10:29marcanI already looked at dockchannel way back. it's a very, very simple interface, just two FIFOs you read and write bytes from
10:29marcanand some IRQs I guess
10:30marcanmain question is how do we organize this in our devicetree/drivers
10:30j`eywhat do you mean 'to the M2'?
10:30marcanlike inside
10:30marcanit's a copro now
10:31marcanin 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
10:31marcandoes Linux have any subsystem abstraction that fits dockchannel? it's... like a serial port but even dumber
10:31marcanbasically "character device but in the kernel"
10:31j`eyyeah, drivers/soc/apple :P
10:32marcanbut 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...
10:32marcanthe ASC needs to be at least some kind of device link to everything else so they know when the other side is up
10:32marcanbut other than that... different nodes?
10:33marcanfor 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
10:33marcanbut in this case I get the feeling the dockchannel driver should not be kicking the ASC itself
10:34svenyeah, all debug commands use SART
10:34svennow we could've added a ASC node and then attach SART to both that ASC and NVME but meh..
10:34marcanright...
10:35svenbtw. do you know where that cal-blob for wifi comes from on ACPI platforms?
10:35roxfan2 has joined #asahi-dev
10:35svenbluetooth really needs it to actually work and I figured I'd just add T2 support while i'm at it
10:36marcanon ACPI it's in ROM, we don't need to load it
10:36svenoh, nice!
10:36millenialhacker has joined #asahi-dev
10:36marcan(no idea if BT is different, hope not...)
10:37sveni'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
10:41roxfan has quit [Ping timeout: 480 seconds]
10:42mpschadmed: if it is enough to just rebuild DT I could try this evening on mbp (j293)
10:44mpschadmed: and which module have to be loaded, I didn't understood
10:44millenialhacker has quit [Ping timeout: 480 seconds]
10:47chadmedmps: 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
10:48marcansven: 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?
10:48marcanwe'd end up with a compatible like this:
10:48marcan"apple,t8112-mtp", "apple,t8112-asc4-helper", "apple,asc4-mtp", "apple,asc4-helper"
10:49marcanjust 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
10:49mpschadmed: ah, ok. I already have it loaded. I'm using conservative governor
10:49marcan(cc robher)
10:49j`eychadmed: did you need any Kconfig options for EAS? (after a quick grep I dont see any, so I guess it's always there)
10:50marcanthen the dockchannel... that should probably be something like i2c/spi, with a parent dockchannel device and a child node that represents the consumer?
10:50marcan(possibly multiple if we have multiple dockchannels or need to group them for some reason)
10:50marcanwith a link to the helper rtkit device, just to make sure it's up first
10:50marcanactually the link would be to the dockchannel consumer
10:50marcansince dockchannel doesn't care if the ASC is up, the HID interface on top does
10:51marcananother potential dockchannel consumer would be a simple tty/uart device (that would expose the debug dockchannel)
10:52chadmedj`ey: CONFIG_ENERGY_MODEL and the schedutil governor is all you should need for it to work
10:53j`eymarcan: 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)
10:53marcandockchannel is a dumb fifo between the coprocessors, which is used here in lieu of RTKit mailbox stuff for the actual touchpad
10:53j`eymarcan: thanks and chadmed thanks
10:53marcanit replaces SPI from the point of view of the OS
10:54marcanthe ASC contains the actual SPI driver but it doesn't talk the old protocol, it talks some lower level whatever to the raw chip
10:54marcanthe ASC is doing all the trackpad multitouch algorithmic magic, force touch, etc
10:57mpschadmed: also I had to add it to /etc/modules to be loaded
10:57mpsuhm, sorry
10:58mps(looked at backlog)
10:58j`eymarcan: I wonder why they went with dock channel here rather than rtkit
10:59marcansomeone said "give me something like a SPI/whatever uart" and they had dockchannel lying around
11:04chadmedmps: youll need to change to the schedutil governor btw, wont work with conservative
11:04mpschadmed: yes, I see
11:24marcanah, I found the Broadcom firmware for the M2. It's still there, just next to the touch bar firmware for some silly reason.
11:24marcanthat one shrank too
11:25the_lanetly_052 has joined #asahi-dev
11:25marcanso 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.
11:27millenialhacker has joined #asahi-dev
11:35millenialhacker has quit [Ping timeout: 480 seconds]
11:45svenmarcan: 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
11:45mpschadmed: is it possible to somehow see improvements or just experience
11:51zx2c4_ has left #asahi-dev [#asahi-dev]
11:53chadmedyou 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
11:53chadmedthe machine should be cooler and the battery life should be longer which is what matters anyway
11:54svenmarcan: btw., which broadcom chip does the M2 use? still 4378/4387?
11:56mpschadmed: yes, I will try to follow battery status. and on these external temperatures I don't think I could 'feel' differences :)
11:57mpschadmed: scaling_governor should be schedutil?
11:57mpsfor both cores?
11:57mpsgood, already set it
11:57mpsthanks
12:18millenialhacker has joined #asahi-dev
12:26millenialhacker has quit [Ping timeout: 480 seconds]
12:51Catyre_ has joined #asahi-dev
12:55johey has joined #asahi-dev
12:57Catyre has quit [Ping timeout: 480 seconds]
13:05pjakobsson has quit [Remote host closed the connection]
13:41millenialhacker has joined #asahi-dev
13:49millenialhacker has quit [Ping timeout: 480 seconds]
13:53Catyre_ has quit [Remote host closed the connection]
13:54Catyre has joined #asahi-dev
13:54Catyre has quit [Read error: Connection reset by peer]
13:54Catyre has joined #asahi-dev
15:19Gaspare has joined #asahi-dev
15:24Catyre_ has joined #asahi-dev
15:29Catyre has quit [Ping timeout: 480 seconds]
15:54Catyre_ has quit [Remote host closed the connection]
15:57Gaspare has quit [Quit: Gaspare]
16:10millenialhacker has joined #asahi-dev
16:21millenialhacker has quit [Remote host closed the connection]
16:25witchbutter has joined #asahi-dev
16:27millenialhacker has joined #asahi-dev
16:28witchbutter has quit []
16:35millenialhacker has quit [Ping timeout: 480 seconds]
16:36witchbutter has joined #asahi-dev
16:42Catyre has joined #asahi-dev
16:45witchbutter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:48sven[CHG] Device XX:XX:XX:XX:XX:XX Alias: Sven’s AirPods
16:48sven[bluetooth]# pair XX:XX:XX:XX:XX:XX
16:48svenAttempting to pair with XX:XX:XX:XX:XX:XX
16:48svenPairing successful
16:48svennow if it would only also play music on them :D
16:49Gaspare has joined #asahi-dev
16:49svenlooks like there's still something broken
16:49rowang077[m] Well maybe BT audio is not the best peripheral to test with in Linux :p I have nothing but bad experience with it tbh
16:50sveni have nothing else to test it with and these airpods works with my other non-apple linux machine
16:50Catyre has quit [Ping timeout: 480 seconds]
16:54Jamie[m]i wonder if the bluetooth firmware has some apple customisations which are negotiating something special with airpods
16:54Jamie[m]that linux doesn’t expect
16:54Catyre has joined #asahi-dev
16:55sveni'm pretty sure this is just some bug in my driver
16:55nickchan has joined #asahi-dev
16:56Jamie[m]alright haha
16:56rowang077[m]You have to at least do some magic things
16:56sven*sigh*
16:56sven<sven> i have nothing else to test it with and these airpods works with my other non-apple linux machine
16:57rowang077[m] has left #asahi-dev [#asahi-dev]
16:59sventhe main issue probably is device -> host IPC. i don't quite understand the idea behind that mess yet
17:00sventhere'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)
17:01witchbutter has joined #asahi-dev
17:01svenI think the "advance the non-existing transmission queue" is their hack to generate an interrupt on the device
17:02pseigo_ has quit [Ping timeout: 480 seconds]
17:06j`eysven: is there any buttons like volume control, just thinking about some other intercation you could try
17:06nicolas17 has joined #asahi-dev
17:06svennah, this is 99% something dumb. There’s something broken with how I handle these ipc queues
17:07svenhci traffic works fine but audio goes over a different pipe that behaves slightly different
17:09sveni can see that something goes horribly wrong with btmon ;)
17:09j`eyis that a wireshark-like thing?
17:10svenyeah, tcpdump for Bluetooth
17:19Gaspare has quit [Quit: Gaspare]
17:21Gaspare has joined #asahi-dev
17:25Major_Biscuit has quit [Ping timeout: 480 seconds]
17:30the_lanetly_052 has quit [Ping timeout: 480 seconds]
17:48pseigo_ has joined #asahi-dev
17:54nickchan has quit [Quit: nickchan]
17:55Gaspare has quit [Quit: Gaspare]
17:55nickchan has joined #asahi-dev
17:57nickchan has quit []
17:59nickchan has joined #asahi-dev
18:05pseigo_ has quit [Read error: No route to host]
18:05pseigo_ has joined #asahi-dev
18:10Gaspare has joined #asahi-dev
18:13svenaaaand it works 😌
18:16j`eysven: woo, so was itsome IPC issue?
18:17svenyeah, and maybe also an issue with the calibration blob
18:17sveni sent the wrong one because strcmp returns 0 when the strings are equal and had an if(strcmp(…))
18:18j`eyah yes, done that one before
18:19svenoh, and the MAC address was byteswapped but I doubt that actually caused any issues
18:28pseigo_ has quit [Ping timeout: 480 seconds]
18:30millenialhacker has joined #asahi-dev
18:40Gaspare has quit [Quit: Gaspare]
18:41millenialhacker has quit [Ping timeout: 480 seconds]
18:45rustylerp has joined #asahi-dev
18:46Revy has joined #asahi-dev
19:01pseigo_ has joined #asahi-dev
19:08rustylerp has quit []
19:18Catyre_ has joined #asahi-dev
19:24Catyre has quit [Ping timeout: 480 seconds]
19:29millenialhacker has joined #asahi-dev
19:47millenialhacker has quit [Ping timeout: 480 seconds]
19:54pseigo_ has quit [Ping timeout: 480 seconds]
19:57pseigo_ has joined #asahi-dev
20:02Catyre has joined #asahi-dev
20:05Catyre__ has joined #asahi-dev
20:08Catyre___ has joined #asahi-dev
20:09Catyre_ has quit [Ping timeout: 480 seconds]
20:09Gaspare has joined #asahi-dev
20:11Catyre has quit [Ping timeout: 480 seconds]
20:14Catyre__ has quit [Ping timeout: 480 seconds]
20:14pseigo_ has quit [Ping timeout: 480 seconds]
20:36witchbutter has quit [Ping timeout: 480 seconds]
20:49millenialhacker has joined #asahi-dev
20:53riker77_ has joined #asahi-dev
20:57millenialhacker has quit [Ping timeout: 480 seconds]
20:58riker77 has quit [Ping timeout: 480 seconds]
20:58riker77_ is now known as riker77
20:59Catyre has joined #asahi-dev
20:59Catyre has quit []
21:11nsklaus_ has joined #asahi-dev
21:12Gaspare has quit [Read error: Connection reset by peer]
21:18nsklaus has quit [Ping timeout: 480 seconds]
21:57kettenis has quit [Ping timeout: 480 seconds]
21:59kettenis has joined #asahi-dev
22:00millenialhacker has joined #asahi-dev
22:03Catyre has joined #asahi-dev
22:08millenialhacker has quit [Ping timeout: 480 seconds]
22:09Catyre___ has quit [Ping timeout: 480 seconds]
22:10Catyre_ has joined #asahi-dev
22:16Catyre has quit [Ping timeout: 480 seconds]
22:51kettenis has quit [Ping timeout: 480 seconds]
23:13amarioguy has quit [Remote host closed the connection]
23:35KamikazePlatypus has joined #asahi-dev
23:36KamikazePlatypus has quit [Quit: Leaving...]
23:37KamikazePlatypus has joined #asahi-dev
23:47millenialhacker has joined #asahi-dev
23:55millenialhacker has quit [Ping timeout: 480 seconds]
…