2022-05-31
00:40kaine2 has quit [Quit: kaine2]
00:43bps2 has quit [Ping timeout: 480 seconds]
00:46Gaspare has joined #asahi-dev
01:35derzahl has quit [Remote host closed the connection]
01:48commandoline has joined #asahi-dev
01:51commandoline_ has quit [Remote host closed the connection]
02:52PhilippvK has joined #asahi-dev
02:56phiologe has quit [Ping timeout: 480 seconds]
03:28boardwalk has quit [Quit: The Lounge - https://thelounge.chat]
03:34Gaspare has quit [Quit: Gaspare]
03:38pyropeter2 has joined #asahi-dev
03:40pyropeter1 has quit [Ping timeout: 480 seconds]
03:49kov has quit [Quit: Coyote finally caught me]
04:10greguu has quit [Ping timeout: 480 seconds]
04:30derzahl has joined #asahi-dev
04:43dsrt^ has joined #asahi-dev
05:08jluthra has quit [Remote host closed the connection]
05:09jluthra has joined #asahi-dev
05:12dsrt^ has quit [Ping timeout: 480 seconds]
05:13derzahl has quit [Remote host closed the connection]
05:18derzahl has joined #asahi-dev
05:28derzahl has quit [Remote host closed the connection]
05:30derzahl has joined #asahi-dev
05:31derzahl has quit [Remote host closed the connection]
05:37dsrt^ has joined #asahi-dev
05:53derzahl has joined #asahi-dev
06:01greguu has joined #asahi-dev
06:18jakebot6 has joined #asahi-dev
06:25VinDuvjannau: I was talking about the “shut down DCP” approach that marcan mentioned. If my understanding is correct, the race condition is that the monitor might disconnect after you set the mode but before you shut down DCP, and in that case the DCP might have seen the monitor disconnecting and reset the mode. I was thinking that checking (once) that the monitor is still connected just before shutting down DCP might give a tighter rac
06:25VinDuve window. (of course if you see that the monitor did disconnect, you will need to start up DCP, wait for the monitor to come back, and do it all over again, but that should not happen often)
06:36jannauyes, but I'm not sure how much that helps if the monitor indeed disconnects within 500 ms after mode set. we have to test what happens
06:38jannaubut if the display does disconnect without user interaction after modeset it's probably within a couple of 100 ms
07:07dsrt^ has quit [Ping timeout: 480 seconds]
07:33bps2 has joined #asahi-dev
07:36dsrt^ has joined #asahi-dev
07:38greguu has quit [Ping timeout: 480 seconds]
07:55c10l4 has quit []
07:56c10l4 has joined #asahi-dev
08:05dsrt^ has quit [Ping timeout: 480 seconds]
08:30c10l4 has quit []
08:33c10l4 has joined #asahi-dev
08:53pg12_ has quit [Ping timeout: 480 seconds]
08:54pg12_ has joined #asahi-dev
10:12bps3 has joined #asahi-dev
10:17derzahl has quit [Ping timeout: 480 seconds]
10:18bps2 has quit [Ping timeout: 480 seconds]
10:20bps2 has joined #asahi-dev
10:20bps3 has quit [Read error: Connection reset by peer]
10:27Retr0id0 has joined #asahi-dev
10:28Retr0id has quit [Read error: Connection reset by peer]
10:28Retr0id0 is now known as Retr0id
10:37the_lanetly_052 has joined #asahi-dev
11:15Retr0id has quit [Ping timeout: 480 seconds]
11:31marcanVinDuv: you can't check if it's connected without DCP, so you'd just have to re-modeset and do it all over again yes
11:32marcanbut I think in practice it will ~definitely work for a single-modeset; what I'm not so sure about is the stage1->2 latency. but stage2 will ~always have to do a re-check anyway because stage1 might be old or broken or we might need to change the resolution anyway
11:33marcanat which point we can do the double check and *hopefully* it doesn't line up in the race very often
11:33marcani.e. it would break if, say the two stages take ~100ms and stage2 does not change resolution and the monitor takes about the same to disconnect and catches stage2 in just the exact window between hpd check and dcp shutdown
12:08kettenisI'm probably the worst person here to give advice about pushing things into Linux, but letting things linger for months doesn't seem to be a good strategy
12:10svenfastmail + mailing lists has been a bit annoying as well. i really need to look into just getting one of these @kernel.org aliases
12:11sveni've had two people now reach out to me because mails they got via a list ended up in their spam :/
12:13dsrt^ has joined #asahi-dev
12:14kettenismarcan: ir probably helps if you, as the maintainer of the m1 stuff, actively review/ack the patches others send to the lists
12:21dsrt^ has quit [Ping timeout: 480 seconds]
12:37kettenisjannau: but a reminder after 2-4 weeks if things are unreviewed is appropriate isn't it?
12:39dsrt^ has joined #asahi-dev
12:47dsrt^ has quit [Ping timeout: 480 seconds]
13:03c10l4 has quit []
13:12c10l4 has joined #asahi-dev
13:36dsrt^ has joined #asahi-dev
13:36derzahl has joined #asahi-dev
13:44CME has quit []
13:44CME has joined #asahi-dev
13:46dsrt^ has quit [Remote host closed the connection]
14:13tsujpAnything a novice-intermediate C developer (me) who is willing and able to learn much more about C (I love C) can do to help Asahi?
14:18lkvrsfld[m]Ci/cd for web applications
14:18lkvrsfld[m]Etc.
14:18lkvrsfld[m]Same thing i do
14:18lkvrsfld[m]But can‘t understand a shit of the linux kernel
14:18tsujpSo I do devops and all that entails and that's _mostly_ for web applications like say a REST API or a full blown site
14:19tsujpAzure, AWS, C#, F#, TypeScript, C (a little), Bash, Ansible, Terraform, Linux (Ubuntu/Fedora/Void/Alpine)
14:19Gaspare has joined #asahi-dev
14:19lkvrsfld[m]mps: Actually a mix of that, and backend web app developing, and kind of sometimes „fixing ui“
14:21the_lanetly_052__ has joined #asahi-dev
14:23mpsfor my excuse last night friend asked me about charging control perl script I posted here last week or so and I rewrote it in C and to run as daemon, it is here https://www.arvanta.net/2x3d1kfg/charge-ctl.c
14:24Gaspare has quit [Quit: Gaspare]
14:27the_lanetly_052 has quit [Ping timeout: 480 seconds]
14:29Gaspare has joined #asahi-dev
14:50yuyichao has joined #asahi-dev
14:57yuyichao has quit [Quit: Konversation terminated!]
15:10marcanjannau: found another way to do it; DCP has a mini AIC type thing and we can disable IRQs or mask the relevant IRQ, then it behaves the same (doesn't notice the disconnect, still doesn't notice if it comes back before IRQs are reenabled)
15:24svenmarcan: oh, fun, i wondered if those registers where some kind of irq controller because you can also trigger what apple calls NMI somewhere in there
15:27svenhrm, one version is write32(0x10004, 0x11) followed by write32(0x10024, 1) but i'm not sure that's the correct one
15:34svenand I think I also tried 0x1004 / 0x1014 but i'm not sure about that one because the context inside m1n1-history is confusing there
15:37svenwrite32(asc_base + 0x1004, 0x10); write32(asc_base + 0x1014, 1); asc.send(0x30000000000010, 0); asc.recv(); read32(0x809f84000) <-- i dunno what that asc.send was supposed to do but this looks like I managed to crash it like that
15:59Gaspare has quit [Quit: Gaspare]
16:04bps2 has quit [Ping timeout: 480 seconds]
16:10off^ has joined #asahi-dev
16:21c10l4 has quit []
16:24tomatkinson has joined #asahi-dev
16:28tomatkinson is now known as hir0pro
16:31c10l4 has joined #asahi-dev
16:48Gaspare has joined #asahi-dev
16:54riker77 has quit [Quit: Quitting IRC - gone for good...]
17:04marcanjannau: Pushed the new stuff to put DCP to sleep. Also fixed macos crashing with the DART changes (it was the l2-tt stuff; iBoot only ever allocates 2 tables, macOS hates any more)
17:07marcanI expect this to break with the linux DCP stuff of course; it needs to learn to unconditionally kick the ASC (like I made m1n1 do)
17:07marcanmacos also doesn't know how to do that, but I made the HV codepath wake DCP back up into quiesced mode
17:08riker77 has joined #asahi-dev
17:11jabashque_ has quit []
17:11jabashque has joined #asahi-dev
17:16jannauthanks, I guess I never tested the l2-tt stuff without fb reallocation and macos. that looked so obvious that macos should be able to handle that that I never considered that would be the problem
17:19ajxu2 has joined #asahi-dev
17:22ajxu2 has quit []
17:22ajxu2 has joined #asahi-dev
17:45jannauwe might have another timing problem. the second modeset fails if it is too close to first one leaving a broken display
17:49jannaudelay between first stage modeset and 2nd stage modeset for custom resolution seems to be long enough for my setup though
17:51ajxu2 has quit [Remote host closed the connection]
18:14jannaumarcan: sometimes silently, sometimes with "EPIC: IOP returned 0xe00002bc" in the mode set
18:19marcanso the monitor cycles pretty quickly in your case, and we rely on the second modeset happening *after* that in that case?
18:22marcanif so I guess the mode that stage1 set was different? since normally a dummy modeset doesn't take much time
18:22jannauthe monitor cycles with 500 - 700 ms for HPD de-assert/assert after modeset i it was in power save mode
18:25marcanalternatively, another hack would be to leave DCP up while m1n1 runs, but kill its HPD interrupt, and then finally shut it down at the end only (which will implicitly fix the IRQ once it comes back up)
18:31jannauI still have the failure case that the dcp modeset suceeds because it comes after the unplug. The monitor doesn't come up though
18:34Gaspare has quit [Quit: Gaspare]
18:34Gaspare has joined #asahi-dev
19:01Retr0id has joined #asahi-dev
19:07the_lanetly_052__ has quit [Ping timeout: 480 seconds]
19:26the_lanetly_052__ has joined #asahi-dev
19:35the_lanetly_052__ has quit [Ping timeout: 480 seconds]
19:39VinDuvI updated the stage2 m1n1 on my mini to test DCP shutdown on my monitors. It works :) Even when turning off the monitor/switching inputs
19:42VinDuvI think I even get a picture a bit faster than with hotplug, which makes sense since the mode is already set when the monitor reconnects
19:55VinDuvOn the subject of disconnection delays, I think that one of my monitors doesn’t continuously check for a signal when in sleep mode. Instead, it checks for a signal every 5 seconds or so, and if there is one, it starts waking up (and go through the disconnection/reconnection sequence)
19:55VinDuvThat means that from the point of view of the computer, the delay between setting the mode and the monitor disconnecting is basically random
19:58VinDuv(running a sleep/wake test in macOS I actually see the disconnect delay vary between 1.4 and 6.5 seconds)
20:14the_lanetly_052__ has joined #asahi-dev
20:30ajxu2 has joined #asahi-dev
20:33ajxu2 has quit [Remote host closed the connection]
20:37hir0pro has quit [Quit: hir0pro]
20:56systwi_ has quit [Ping timeout: 480 seconds]
20:59c10l48 has joined #asahi-dev
21:06c10l4 has quit [Ping timeout: 480 seconds]
21:16the_lanetly_052__ has quit [Ping timeout: 480 seconds]
21:26Gaspare has quit [Quit: Gaspare]
21:32kov has joined #asahi-dev
21:38Gaspare has joined #asahi-dev
22:12systwi has joined #asahi-dev
22:24Gaspare has quit [Quit: Gaspare]