#
…

2023-07-16

00:01adryzz has quit [Quit: .]
00:08mikelee has quit [Ping timeout: 480 seconds]
00:18mikelee has joined #asahi-dev
00:26mikelee has quit [Ping timeout: 480 seconds]
00:36mikelee has joined #asahi-dev
00:43pg12_ has joined #asahi-dev
00:45pg12 has quit [Ping timeout: 480 seconds]
00:45mikelee has quit [Ping timeout: 480 seconds]
00:46cylm has quit [Ping timeout: 480 seconds]
00:52fenix144 has joined #asahi-dev
00:53mikelee has joined #asahi-dev
00:55fenix144 has quit [Quit: Leaving...]
00:55richyliu2 has quit [Ping timeout: 480 seconds]
01:21mikelee has quit [Ping timeout: 480 seconds]
01:26mrhh has joined #asahi-dev
01:35chadmedi just want to make sure we dont have any severe performance/interactivity regressions
01:36mrhh has quit [Ping timeout: 480 seconds]
01:46mikelee has joined #asahi-dev
01:55mikelee has quit [Ping timeout: 480 seconds]
01:59fenix144 has joined #asahi-dev
02:00gabuscus has quit []
02:03mikelee has joined #asahi-dev
02:10fenix144 has quit [Remote host closed the connection]
02:21gabuscus has joined #asahi-dev
02:24mikelee has quit [Ping timeout: 480 seconds]
02:28mikelee has joined #asahi-dev
02:30jeisom has joined #asahi-dev
02:42maria has joined #asahi-dev
02:48mikelee has quit [Ping timeout: 480 seconds]
02:58mikelee has joined #asahi-dev
03:06mikelee has quit [Ping timeout: 480 seconds]
03:11mikelee has joined #asahi-dev
03:20chadmed has quit [Remote host closed the connection]
03:22chadmed has joined #asahi-dev
03:25mikelee has quit [Ping timeout: 480 seconds]
03:28mikelee has joined #asahi-dev
03:42erso has quit [Ping timeout: 480 seconds]
03:45mikelee has quit [Ping timeout: 480 seconds]
03:45Method has quit [Read error: Connection reset by peer]
03:49jeisom has quit [Ping timeout: 480 seconds]
03:50erso has joined #asahi-dev
03:58erso has quit [Ping timeout: 480 seconds]
04:00mikelee has joined #asahi-dev
04:03erso has joined #asahi-dev
04:12erso has quit [Ping timeout: 480 seconds]
04:12mikelee has quit [Ping timeout: 480 seconds]
04:15mikelee has joined #asahi-dev
04:19erso has joined #asahi-dev
04:28erso has quit [Ping timeout: 480 seconds]
04:34mikelee has quit [Ping timeout: 480 seconds]
04:36erso has joined #asahi-dev
04:43mikelee has joined #asahi-dev
04:44erso has quit [Ping timeout: 480 seconds]
04:51mikelee has quit [Ping timeout: 480 seconds]
04:52erso has joined #asahi-dev
05:00mikelee has joined #asahi-dev
05:01erso has quit [Ping timeout: 480 seconds]
05:10erso has joined #asahi-dev
05:12pg12_ has quit []
05:12pg12 has joined #asahi-dev
05:18mikelee has quit [Ping timeout: 480 seconds]
05:19erso has quit [Ping timeout: 480 seconds]
05:27zachole_ has joined #asahi-dev
05:27zachole has quit [Remote host closed the connection]
05:29erso has joined #asahi-dev
05:41erso has quit [Ping timeout: 480 seconds]
05:44mikelee has joined #asahi-dev
05:50erso has joined #asahi-dev
05:52mikelee has quit [Ping timeout: 480 seconds]
05:58erso has quit [Ping timeout: 480 seconds]
06:00mikelee has joined #asahi-dev
06:06erso has joined #asahi-dev
06:15erso has quit [Ping timeout: 480 seconds]
06:16mikelee has quit [Ping timeout: 480 seconds]
06:22erso has joined #asahi-dev
06:30erso has quit [Ping timeout: 480 seconds]
06:37mikelee has joined #asahi-dev
06:38crabbedhaloablut has joined #asahi-dev
06:39erso has joined #asahi-dev
06:39sid-linux has joined #asahi-dev
06:41sid-linuxchadmed: thanks again :)
06:41sid-linuxsorry wrong username !
06:43sid-linuxsid-linux: thanks for the link to the firmware overview ChaosPrincess -- very useful..
06:43sid-linux has quit []
06:47erso has quit [Ping timeout: 480 seconds]
06:55mikelee has quit [Ping timeout: 480 seconds]
06:55erso has joined #asahi-dev
07:04erso has quit [Ping timeout: 480 seconds]
07:14erso has joined #asahi-dev
07:14dottedmagI see previous discussion on lack of vblank IRQ (good riddance!) Does DCP provide a event+timestamp for "this fb/crtc configuration is being presented", and is it exposed by DRM somehow? 16ms is quite a bit of time room, so it would be nice to be able to synchronize with actual refresh.
07:19mikelee has joined #asahi-dev
07:23jannaudottedmag: for now the swaps are immediate and blocking so you have a rough idea when the previous one was. the FW interface has timestamps, supposedly for VRR and async swaps. The driver doesn't use that yet and I haven't really looked into how that fits into drm/kms
07:23erso has quit [Ping timeout: 480 seconds]
07:25dottedmagjannau: So, do I get it right that for now DRM_IOCTL_MODE_ATOMIC blocks, and DRM_MODE_ATOMIC_NONBLOCK is not supported?
07:28jannauunsure, DRM atomic helpers might handle DRM_MODE_ATOMIC_NONBLOCK for us but the fw/hw swap is blocking
07:31dottedmagI see. So when in the lifecycle of the frame swap unblocks? I'm not sure how it works. I guess at some point DCP should stop reading from one framebuffer and start reading from another. I guess that without further nudging it does not do that within the frame, so it's somewhere within vblank? Is it when DCP releases the previous framebuffer after it's done with the frame, or when DCP starts reading the new one?
07:31erso has joined #asahi-dev
07:32dottedmagOr anywhere in between?
07:37jannauon DRM side we can release the FB only after DCP reported the swap to the new FB as completed. everything else led to crashes of the HW display controller due to reading unmapped memory
07:38chadmedis that why we get stuttering when doing ops like changing the CTM or brightness? or is that something else
07:38jannauI suppose DCP reports the swap as completed in vblank, i.e. after it stopped accessing the old FB
07:39dottedmagYep, so the swap returns after the previous framebuffer has been dealt with. This leaves uncertainty when swap can return during the vblank (which is still >=4% of the frame length). I guess I'd better empirically test it.
07:40erso has quit [Ping timeout: 480 seconds]
07:42mikelee has quit [Remote host closed the connection]
07:42mikelee has joined #asahi-dev
07:44jannauchadmed: I haven't noticed that but haven't tested specifically for it. For CTM updates it depends on how userspace handles them. if it does a CTM update independently of FB updates it will lose one FB update
07:44jannaubrightness should be ok though but I better should check the implementation\
07:47chadmedyeah i tried to go through the iomfb swap implementation to see what was up a while ago but i ran out of time
07:48chadmedbasically just stutters/fps drops when changing brightness which is also the only time the CTM seems to get updated
07:48chadmedbut that could be a kwin thing
07:48erso has joined #asahi-dev
07:56Method has joined #asahi-dev
08:02jannaudoes that mean the color temperature preview in system settings doesn't work for you? change the setting to "always on night color" and move the "night color temperature" around while keep the left mouse button presses
08:04jannauif you move it fast you can see lag which is caused by blocking ctm updates and "stealing" frame updates from rendering
08:04jannauI suppose I should check if CTM updates need a swap, they probably don't
08:05erso has quit [Ping timeout: 480 seconds]
08:05mkurz has quit [Read error: Connection reset by peer]
08:06mikelee has quit [Remote host closed the connection]
08:07chadmed correct, the preview doesnt work correctly
08:07jannaudefine correctly
08:08chadmedit does not update when you move the slider
08:08chadmedi would have assumed that a swap is necessary with the current implementation since the code that updates the CTM lives in iomfb swap
08:08jannauit does here
08:09chadmedi changed compositor settings to force lowest latency and it works
08:10chadmedso thats probably a kwin thing
08:10jannauthe question is whether it's necessary to a swap with DCP. It lives in the function responsible for atomic updates
08:14jannauwhich setting was the previous one? I have "Force smoothest animations" and "Reduce latency by allowing screen tearing ...", not sure if/how the latter would make a difference with wayland
08:14erso has joined #asahi-dev
08:15chadmedi had "force smoothest animations" set
08:15jannaucolor preview works with all settings here
08:16chadmedhm no yeah that wasnt it, it works now???
08:16chadmeddunno what would cause it to be intermittend
08:16chadmedintermittent*
08:23erso has quit [Ping timeout: 480 seconds]
08:25mikelee has joined #asahi-dev
08:27mikelee has quit [Remote host closed the connection]
08:27jannaustrange, except for the lag it has always worked here
08:30marcanchadmed: I don't think that's related, there's something wacky there
08:30marcan(the stuttering)
08:31erso has joined #asahi-dev
08:32chadmedyeah its odd, ive experienced it since dcp was first merged in on both asahi and gentoo
08:32chadmedand ive detonated my root fs multiple times in between
08:36marcanthe stutter on brightness happens for me everywhere
08:36marcanI've never seen it smooth
08:36jannaustandalone CTM updates will consume one swap which can't be sed for screen updates. it shouldn't and probably doesn't need to
08:37dottedmagjannau: you mean CTM update should return and fold the change into next screen update?
08:40erso has quit [Ping timeout: 480 seconds]
08:42jannaubrightness updates probably consume a swap as well. I thought I left the code in which waits and checks if a swap already updated the brightness
08:43jannaudottedmag: no, at least from the FW interface CTM updates and swaps are decoupled, it's a driver limitation that it swaps after an CTM update
08:45mikelee has joined #asahi-dev
08:45zachole_ has quit [Read error: Connection reset by peer]
08:45zachole has joined #asahi-dev
08:47erso has joined #asahi-dev
08:55erso has quit [Ping timeout: 480 seconds]
08:56mikelee has quit [Ping timeout: 480 seconds]
09:00zachole has quit [Read error: Connection reset by peer]
09:00zachole_ has joined #asahi-dev
09:03erso has joined #asahi-dev
09:07pg12 has quit [Quit: pg12]
09:11nsklaus has joined #asahi-dev
09:11erso has quit [Ping timeout: 480 seconds]
09:16pg12_ has joined #asahi-dev
09:18pg12_ has quit []
09:18erso has joined #asahi-dev
09:19pg12 has joined #asahi-dev
09:21rootbeerdan has quit [Ping timeout: 480 seconds]
09:27erso has quit [Ping timeout: 480 seconds]
09:33pg12 has quit [Quit: pg12]
09:35erso has joined #asahi-dev
09:35zachole_ has quit [Read error: Connection reset by peer]
09:35darkapex has quit [Ping timeout: 480 seconds]
09:36zachole has joined #asahi-dev
09:38pg12 has joined #asahi-dev
10:02ourdumbfuture has joined #asahi-dev
10:05mikelee has joined #asahi-dev
10:20jannaunot sure what happens with the CTM updates but I can't avoid the swap in the current form. I need to check what kwin does and if other drivers have special shortcuts for this. night color on intel (using gamma tables is smother)
10:30mikelee has quit [Remote host closed the connection]
10:39zachole has quit [Quit: Leaving...]
10:45mikelee has joined #asahi-dev
11:01ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
11:03mikelee has quit [Remote host closed the connection]
11:22cylm has joined #asahi-dev
11:25mikelee has joined #asahi-dev
11:26mikelee has quit [Remote host closed the connection]
11:26mikelee has joined #asahi-dev
11:30mikelee has quit [Remote host closed the connection]
11:35erso has quit [Ping timeout: 480 seconds]
11:43erso has joined #asahi-dev
11:45Z750 has quit [Quit: Ping timeout (120 seconds)]
11:45Z750 has joined #asahi-dev
11:47mikelee has joined #asahi-dev
11:49mikelee has quit [Remote host closed the connection]
11:58ourdumbfuture has joined #asahi-dev
12:00mikelee has joined #asahi-dev
12:02mikelee has quit [Remote host closed the connection]
12:10jeisom has joined #asahi-dev
12:13mikelee has joined #asahi-dev
12:17ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
12:20mikelee has quit [Remote host closed the connection]
12:20ourdumbfuture has joined #asahi-dev
12:21mikelee_ has joined #asahi-dev
12:29chadmedhttps://github.com/chadmed/bankstown/ ok i kinda think im on the right track here
12:29chadmed(virtual bass)
12:29chadmedat a loss for what needs to be implemented for the distortion stage of the pipeline though and i dont want to just wholesale rip off calf's implementation
12:29chadmedthats not how to learn things
12:31chadmedtheres a fair amount of zipper noise on the biquads, dunno if thats because of the implementation in the crate or because im tearing down the entire array and rebuilding it each time i change Fc :P
12:40mikelee_ has quit [Remote host closed the connection]
12:44kettenissven: do the type-C ports remain powered in suspend on Linux?
12:49hightower2 has joined #asahi-dev
12:50mikelee has joined #asahi-dev
12:54jannauoh. `for b in $(seq 255); echo $b > /sys/class/backlight/apple-panel-bl/brightness; done` freezes/deadlocks dcp
12:59mikelee has quit [Remote host closed the connection]
13:00mikelee has joined #asahi-dev
13:05mikelee has quit [Remote host closed the connection]
13:05mikelee has joined #asahi-dev
13:13svenkettenis: I never checked tbh, but unless we suspend the tipd chip they should stay powered I think
13:14svenxhci suspend/resume is broke though as marcan noticed a while ago :/
13:14sven*broken
13:15mikelee has quit [Remote host closed the connection]
13:15mikelee has joined #asahi-dev
13:19mikelee has quit [Remote host closed the connection]
13:20mikelee has joined #asahi-dev
13:21ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:28mikelee has quit [Remote host closed the connection]
13:28mikelee has joined #asahi-dev
13:32ourdumbfuture has joined #asahi-dev
13:40ourdumbfuture has quit [Ping timeout: 480 seconds]
13:42ayke has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
13:43ourdumbfuture has joined #asahi-dev
13:47ayke has joined #asahi-dev
14:01kettenisah, ok, I just made it "work" on OpenBSD
14:02kettenisbut noticed that devices that are plugged in continue to consume quite a bit of power
14:11eiln has joined #asahi-dev
14:17svenI think you can just send that SSPS command to move the tipd chip to P0 or so
14:18sventhat should power the ports down
14:22eilnthis is a much better script with the bootargs parsed
14:22eilnthe next step is enabling fw print through the "ioctl"/cmd
14:22eilnim working on the irq & command arg structs
14:22kettenissven: thanks, lemme try that
14:24ChaosPrincesseiln: i have this as tunables apply code, and while im not sure, i think you might be able to skip at least some of the writes in the bridge_evt_ctrs block https://paste.bingner.com/paste/xrn3w
14:25ChaosPrincessalso, i dont think you need a reset after load_fw, but again, not 100% sure
14:27eilnChaosPrincess: without the reset it doesn't run on the second run (and requires reboot). i need to look into it though
14:29eilnthe +0x8000s aren't necessary, they're something to do with voltages in powertop
14:29eiln*powermetrics
14:46eiln has quit [Quit: WeeChat 4.0.0]
14:54jeisom_ has joined #asahi-dev
14:54jeisom has quit [Read error: Connection reset by peer]
15:00fenix144 has joined #asahi-dev
15:04ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:08svenjannau: my memory's a bit fuzzy for the multi-die t600x, do you remember how the crossbar works there? was is a single crossbar for each die that can only route between the ports on that die and the dcpext on that die?
15:08fenix144 has quit [Remote host closed the connection]
15:26jannausven: I think we concluded that the crossbars are per die without ultrafusion links
15:26svenokay, makes sense
15:26sveni'm trying to write down what we currently know while trying to turn my vague idea into something that resembles a device tree ;)
15:45mrhh has joined #asahi-dev
15:45mikelee has quit [Remote host closed the connection]
15:45mikelee has joined #asahi-dev
15:47mikelee_ has joined #asahi-dev
15:47mikelee has quit [Read error: Connection reset by peer]
15:47mikelee has joined #asahi-dev
15:52mikelee has quit [Remote host closed the connection]
15:55mikelee_ has quit [Ping timeout: 480 seconds]
16:05mrhh has quit [Ping timeout: 480 seconds]
16:08mrhh has joined #asahi-dev
16:10erso has quit [Quit: leaving]
16:40abd has joined #asahi-dev
16:42mikelee has joined #asahi-dev
16:50darkapex has joined #asahi-dev
16:58abd has quit [Ping timeout: 480 seconds]
16:58ourdumbfuture has joined #asahi-dev
16:58mrhh has quit [Ping timeout: 480 seconds]
16:58mikelee has quit [Remote host closed the connection]
17:16ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
17:20ourdumbfuture has joined #asahi-dev
17:28hightower2 has quit [Ping timeout: 480 seconds]
17:28abd has joined #asahi-dev
17:44Guest6081 has quit [Quit: Bridge terminating on SIGTERM]
17:44rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
17:48rhysmdnz has joined #asahi-dev
17:48Jamie has joined #asahi-dev
17:48Jamie is now known as Guest6167
17:50marcansven: I hope the suspend thing just means we need more atcphy crap (ugh but doable) and not that it really is broken
17:50marcanneed to trace dwc3/atcphy through a suspend cycle on macos...
17:51abd has quit [Ping timeout: 480 seconds]
17:59svensomeone*cough* just needs to make the hv survive the wake-up:p
18:00svenbut didn’t xnu completely shut down atcphy when suspending? or do I remember that wrong?
18:07hightower2 has joined #asahi-dev
18:10WindowPa- has joined #asahi-dev
18:13WindowPain has quit [Ping timeout: 480 seconds]
18:45phire has quit [Remote host closed the connection]
18:47phire has joined #asahi-dev
18:53signaryk has joined #asahi-dev
19:51jeisom_ has quit [Quit: Leaving]
19:53eiln has joined #asahi-dev
19:57abd has joined #asahi-dev
20:01eiln5am again, but i got the isp firmware to do its init dance
20:02eilnwtf pastebin is down
20:04svenI wish I could still do the „hack until 5am“ thing without regretting it for the next week or so :D
20:05svennice work :)
20:07eilnsven: thank you, dcp/ipc.py was really helpful :)
20:10eilnChaosPrincess: the sensors should be next. im really not familiar with the color/calibration magic though
20:16eiln has quit [Quit: WeeChat 4.0.0]
20:19jeisom has joined #asahi-dev
20:29lewurm`` has quit [Ping timeout: 480 seconds]
20:31jeisom has quit [Ping timeout: 480 seconds]
20:37jannauis it reasonable to assume that devices are shutdown sufficiently when they detach from the iommu so they don't access memory
20:38jannaulooking into whether I need to save and restore the boot level one table for locked darts
20:39jannauso I guess I should be answer that for dcp but I guess other coprocessor without locked darts are affected as well
20:41jannaushould be fine in the sane that we restore reserved boot regions when the device re-attaches
20:43jannaudcp should be fine in the sense that we will never return to simpledrm. also the use case for detaching from the iommu is a bit esoteric to begin with
20:46svendetaching is essentially „attach new iommu domain“ isn’t it?
21:01jannauI was looking at .release_device which should be fine. attaching to new iommu domain might be a problem if apple_dart_domain_free() is called
21:03jannauand I fear I will run into that once I use an unmanaged domain for dcp piodma
21:04svenoh, right, there’s also the „this device disappeared“ callback
21:04svenif our drivers aren’t broken we really shouldn’t try any DMA after that :D
21:07kettenissven: S5 turns off VBUS, S3 doesn't
21:08svengood to know!
21:09svenso that SSPS command to S5 works?
21:10sveniirc there were also other power related commands for that tipd chip but they all didn’t work on apple’s firmware
21:10svennice :)
21:10kettenisI put it back into S0 upon resume and the USB devices reattach
21:11kettenis(note that I don't have USB3 working yet)
21:12svenI’ll probably push some updates to the usb3 sequence next weekend or so fwiw
21:13sventhe current one is slightly different from xnu and might have lead to some weird issues for some people
21:13kettenismight give it another try at that point
21:13svenand iirc the broken behavior happened when using the xhci suspend mechanism
21:13kettenismy previous attempt didn't work
21:14sveni think the ports got stuck it sone non-ready state ok resume
21:14svenatcphy is very picky when it comes to those magic pokes unfortunately :-(
21:14svens/ok/on/
21:26ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
21:27ourdumbfuture has joined #asahi-dev
21:30roxfan has quit [Ping timeout: 480 seconds]
21:43abd has quit [Ping timeout: 480 seconds]
21:50abd has joined #asahi-dev
22:03ourdumbfuture has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:05ourdumbfuture has joined #asahi-dev
22:14jeisom has joined #asahi-dev
22:18abd has quit [Ping timeout: 480 seconds]
22:44nsklaus has quit [Ping timeout: 480 seconds]
23:09crabbedhaloablut has quit []
23:12c10l5 has quit []
23:21c10l5 has joined #asahi-dev
23:25fenix144 has joined #asahi-dev
23:31fenix144 has quit [Remote host closed the connection]
…