#
✕ nick:sven
#asahi-dev · 2022-01-27 12:37
svenwhat we can do is to essentially read out the pagetable and re-create the mapping, and that's essentially what "cleaning up the locked dart hacks" is about
#asahi-dev · 2022-01-27 12:34
sventhere's no mechanism to keep certain iovas around, that's what that patch series linked above is about
#asahi-dev · 2022-01-27 12:34
sventhe iommu subsystem will overwrite whatever pagetable is present and drop all mappings when doing that
#asahi-dev · 2022-01-27 11:39
sven(while always keeping the DCP firmware maps)
#asahi-dev · 2022-01-27 11:38
svenso the whole locked dart thing has to support detaching and attaching domains eventually
#asahi-dev · 2022-01-27 11:38
sventhat also makes everything a bit more complex since we will have to switch to a domain that can be controlled with the raw iommu api
#asahi-dev · 2022-01-27 11:37
svenjannau: a default DMA Domain is attached when the device is probed
#asahi-dev · 2022-01-27 08:58
sven(well, not DCP but the actual display controller but same difference)
#asahi-dev · 2022-01-27 08:57
svenjannau: so the problem is that DCP will continue to scan out the buffer even before the first swap but the moment the disp0 DART is probed that framebuffer will disappear
#asahi-dev · 2022-01-27 08:57
sventhere goes my hope that someone else would solve that problem for us
#asahi-dev · 2022-01-27 08:56
svengreat :/
#asahi-dev · 2022-01-27 08:52
sveni think at the end there was some brief discussion about non idmaps, but there never was any conclusion
#asahi-dev · 2022-01-27 08:52
svenwasn't able to find it
#asahi-dev · 2022-01-27 08:52
svenyes! that's what i was thinking about, thanks
#asahi-dev · 2022-01-27 08:48
sveni think if it's easily possibly to disable the framebuffer scanout while linux attached disp0 and re-creates pagetables i'd go with that for now
#asahi-dev · 2022-01-27 08:47
svenor just hack the DART driver to scan out existing pagetables and recreate them on a domain attach
#asahi-dev · 2022-01-27 08:47
svenif it's not possible to work around the constant framebuffer scanout we'll have to do a bit more invasive surgery to essentially get the iommu subsystem to remap the framebuffer before it replaces the pagetables. there's a thread somewhere on the iommu list because someone else also needs something like that.
#asahi-dev · 2022-01-27 08:43
svenjannau: okay. i'll write a bit more about that later then
#asahi-dev · 2022-01-27 08:41
svenlocked dart for us mostly means that we can't point that dart to our own first level pagetable but instead have to hack around the dart driver to re-use that first level pagetables
#asahi-dev · 2022-01-27 08:40
svenChaosPrincess: what do you mean with reclaim memory?
#asahi-dev · 2022-01-27 08:40
svenjannau: note that getting rid of the forced-locked is a bit tricky since DCP will still try to access the framebuffer when linux already took over and cleared the pagetables. not sure what the easiest way there is
#asahi-dev · 2022-01-27 08:39
svenit's a bit iboot sets for the dcp dart
#asahi-dev · 2022-01-27 08:39
svenit just means that you can't change any of the registers
#asahi-dev · 2022-01-27 08:37
svenbefore i write about the second step, how familiar are you with the iommu subsystem?
#asahi-dev · 2022-01-27 08:36
sveneventually we probably still want to re-use that memory but for now I'd get rid of that hack just to make everything a bit easier
#asahi-dev · 2022-01-27 08:36
svenjannau: first step for the locked DART cleanup: get rid of the forced-locked for the disp0 dart that contains the framebuffer and just allocate the framebuffer manually for now instead of trying to take over the one provided by m1n1
#asahi-dev · 2022-01-26 22:14
svenhm.. could be
#asahi-dev · 2022-01-26 22:10
svenI vaguely remember that there was some way to force it to blend the cursor in software
#asahi-dev · 2022-01-26 22:08
svenyeah, or maybe the hardware supports 4 but the DCP firmware didn’t and they fixed that
#asahi-dev · 2022-01-26 22:07
svenor maybe it was three :D
#asahi-dev · 2022-01-26 22:07
svenWasn’t there some limitation where the DCP could only blend two planes and macOS just ended up fusing the cursor into the bg plane?
#asahi-dev · 2022-01-26 20:01
svenand s/passing/padding/ :(
#asahi-dev · 2022-01-26 20:01
sven*cursor
#asahi-dev · 2022-01-26 20:01
svensomething about create a bigger cursed by passing that plane maybe? It’s been a while
#asahi-dev · 2022-01-26 20:00
sveni vaguely remember alyssa talking about that issue (and maybe even suggesting a workaround)
#asahi-dev · 2022-01-26 15:27
svenit'll also need to stop doing these dma-buf pretend exports and switch to the IOMMU api IIRC
#asahi-dev · 2022-01-26 15:27
svenah, yes. locked DARTs. i keep forgetting
#asahi-dev · 2022-01-26 10:14
svenpretty sure we already have default ARCH_APPLE for APPLE_PMGR_PWRSTATE
#asahi-dev · 2022-01-25 21:22
svenNice!
#asahi-dev · 2022-01-25 20:03
svennice! time to add real power domains support to that driver I guess ;)
#asahi-dev · 2022-01-24 20:19
svenmaybe it changed some setting somewhere (nvram?) because it synced that when I set up my Apple ID or something like that
#asahi-dev · 2022-01-24 20:09
svenand it’s essentially never done a clean shutdown so it should always remember that it was last on :/
#asahi-dev · 2022-01-24 20:08
svenweird, mine never starts automatically when I turn in the power
#asahi-dev · 2022-01-24 19:52
svenI’m just a bit annoyed that the mini doesn’t start automatically when it gets power again
#asahi-dev · 2022-01-24 18:56
svenI should submit those dwc bindings again and then figure how to get usb3 up
#asahi-dev · 2022-01-24 18:56
svenand thunderbolt… one of these days.
#asahi-dev · 2022-01-24 18:55
svenhaha :D
#asahi-dev · 2022-01-24 18:15
svenhuh, I thought it would just ignore those
#asahi-dev · 2022-01-23 14:45
svensure, thanks!
#asahi-dev · 2022-01-23 13:58
svennow it looks great :)

plus ›