#
…

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:09povik' Y_overall = ((reading + 0.5) * 0.01086 - 1.0 / (1 - slope_trim * 0.001375)) \
10:10povik / (614.0 + offset_trim * 0.125)
10:10povik Y_pulldown = 1.0 / (1100 - pulldown_trim*2)
10:10povikoops, not what i wanted to paste
10:10povikthis: detectImpendenceMode
10:10povikapple's spelling of impedance ^
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
11:40poviki got something new
11:40povik^-- turn your Mac machine into an ohmmeter, TODAY!
11:55svenlol :D
12:05kettenispovik: time to give the ADMAC series another push?
12:06sventhere's also SPI that could use another push
12:07sven(finally I can annoy other people with this now that nvme is in torvald's tree :>)
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:09svenfrom my limited experience sending a new version every other week seems to work
12:09marcandoesn't help when google blocks half my emails
12:09marcan(they're still doing that, and postmaster tools still says everything is green)
12:09marcan(I had someone file a bug on their side for this...)
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:20marcanyeah, I caught myself in an email death spiral since the release in march :(
12:20marcantrying to get out of it
12:21dsrt^ has quit [Ping timeout: 480 seconds]
12:32_jannau_sven: did you send the t8103 nvme dts changes as well?
12:33svennope, totally forgot about those. i'll send them this evening
12:33_jannau_sending an updated series every week only works if there is something to update
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:44povikyeah, i suppose a push on ADMAC is overdue
12:47dsrt^ has quit [Ping timeout: 480 seconds]
13:03c10l4 has quit []
13:05poviki guess i should still be splitting off the MAINTAINERS addition
13:05povikdidn't do it for v3 (sending v4 now)
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:13tsujpI'm _actually_ a full stack (devops and webdev) at my day job if that stuff is useful too
14:16mpstsujp: any help is good to have
14:17mpstsujp: what is 'full stack (devops and webdev)'? webdev I assume as web server development
14:18mpsbut rest?
14:18tsujpYeah titles are next to useless that's all good
14:18lkvrsfld[m]Ci/cd for web applications
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:18mpslkvrsfld[m]: thanks
14:19mpslkvrsfld[m]: I interpreted 'full stack' as kernel and drivers at bottom
14:19tsujpAzure, AWS, C#, F#, TypeScript, C (a little), Bash, Ansible, Terraform, Linux (Ubuntu/Fedora/Void/Alpine)
14:19sven--> #asahi please
14:19Gaspare has joined #asahi-dev
14:19mpssorry sven
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:24mpsit is 'bare' one without bells and whistles but works and easy to change
14:24Gaspare has quit [Quit: Gaspare]
14:24mpsand ugly hacked before going to bed
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:10marcanthat seems hackier than an orderly shutdown though
15:18marcan(renamed from HW:Mailbox)
15:18marcanwhat I didn't find is a way to restart the CPU without involving a PMGR reset
15:20mpsoh sorry for above messages, I though I'm on #asahi channel
15:20mpsthought*
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:24svendidn't manage to figure out what they were though
15:24marcanI couldn't find the nmi stuff where I thought it was
15:25svenit's moved around quite a bit, let me see if I still have notes
15:25sventhe kext hast like 5 or 6 different offsets depending on the asc version
15:26marcanmaybe the "ipi" thing I found is the nmi
15:27svenhrm, one version is write32(0x10004, 0x11) followed by write32(0x10024, 1) but i'm not sure that's the correct one
15:28marcanyeah, that one is the one I had but I think those registers don't exist/do anything
15:30svenanother one I tried at some point is 0xc004 / 0xc024
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:56marcan0x1004 / 0x1014 kind of fits, those did look like they do something for me
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:05marcannot sure if that fixes it on the mac studio though, haven't tried there yet
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:07marcan(well, it does, but it requires the ADT to specify the current state)
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:20jannau1 1/2 tables should be enough for 5120x2160
17:22ajxu2 has quit []
17:22ajxu2 has joined #asahi-dev
17:23jannauhigher resolution displays than that are hopefully connected via displayport anyway
17:36jannauworks with my picky display
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]
17:52jannaumacos still panics with an reallocated frame buffer on the studio
18:09marcanwill have to look at that then
18:10marcanjannau: how does the second modeset fail if done too quickly, exactly?
18:14jannaumarcan: sometimes silently, sometimes with "EPIC: IOP returned 0xe00002bc" in the mode set
18:14marcanany syslogs?
18:19marcanthat's just an unplug
18:19marcanso the monitor cycles pretty quickly in your case, and we rely on the second modeset happening *after* that in that case?
18:20marcanI guess one thing to do would be to retry the whole modeset a few times
18:21marcanare both of those after a stage1 modeset?
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:22marcanor was stage1 not modeset there?
18:23marcansounds like we probably just want to retry a couple times
18:23jannauyes, stage 1 doesn't do anything. Done explictly to make experimenting with it easier
18:24marcanapparently the first modeset trakes 485ms so that explains the bad lining up
18:24marcanI need to get some sleep :)
18:24marcanbut I think this should work reasonably well once we do that
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:25marcanthat might be a good idea actuallyu
18:26marcanit effectively fixes the race entirely I think, at least within a single stage
18:26marcanI'll give that a shot tomorrow
18:26marcan(or maybe later this week)
18:28jannaugood night
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]
…