tmlind has quit [Remote host closed the connection]
PhilippvK has quit [Ping timeout: 480 seconds]
chadmed has quit [Ping timeout: 480 seconds]
chadmed has joined #asahi-dev
yuyichao_ has joined #asahi-dev
willemml has joined #asahi-dev
willemml has quit [Ping timeout: 480 seconds]
the_lanetly_052__ has quit [Ping timeout: 480 seconds]
tmlind has joined #asahi-dev
FinnBehrenshehim[m] has joined #asahi-dev
FinnBehrenshehim[m] is now known as kloenk
chadmed has quit [Quit: Konversation terminated!]
kloenk has quit [Quit: issued !quit command]
chadmed has joined #asahi-dev
kloenk has joined #asahi-dev
klaus has joined #asahi-dev
<sven>
jannau: 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
<sven>
eventually 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
<sven>
before i write about the second step, how familiar are you with the iommu subsystem?
<ChaosPrincess>
is there some sort of a write-up/documenatation/etc on locked darts?
<sven>
it just means that you can't change any of the registers
<sven>
it's a bit iboot sets for the dcp dart
<ChaosPrincess>
so, how does reclaiming memory will work then, dcp can unlock it?
<sven>
jannau: 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
<sven>
ChaosPrincess: what do you mean with reclaim memory?
<_jannau_>
sven: almost not familiar at all. I looked over the dart commits and I figured out how to map the dcp crashlog buffer
<sven>
locked 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
<sven>
jannau: okay. i'll write a bit more about that later then
<ChaosPrincess>
sven: ok, got it
kloenk has quit [Remote host closed the connection]
<sven>
if 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.
<sven>
or just hack the DART driver to scan out existing pagetables and recreate them on a domain attach
<sven>
i 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
<_jannau_>
macos clears all planes as first swap during boot. that hopefully removes the boot framebuffer scanout
<sven>
yes! that's what i was thinking about, thanks
<sven>
wasn't able to find it
<maz>
though this assumes idmap.
<sven>
i think at the end there was some brief discussion about non idmaps, but there never was any conclusion
<maz>
it's been going on for at least 5 years, with various patch series.
<sven>
great :/
<sven>
there goes my hope that someone else would solve that problem for us
<sven>
jannau: 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
<sven>
(well, not DCP but the actual display controller but same difference)
kloenk has joined #asahi-dev
<maz>
sven: the best bet would be to pick the series and to push it forward. it is the lack of persistent engagement that ruined the effort so far.
espo has joined #asahi-dev
<_jannau_>
but to disable scan out we need dcp. is dart reconfigured at probe time or only when the first iommu domain attaches?
the_lanetly_052__ has joined #asahi-dev
kloenk has quit [Quit: Leaving...]
kloenk has joined #asahi-dev
kloenk_ has joined #asahi-dev
MajorBiscuit has joined #asahi-dev
kloenk has quit [Ping timeout: 480 seconds]
the_lanetly_052__ has quit [Remote host closed the connection]
espo has quit [Quit: Leaving]
espo has joined #asahi-dev
kloenk_ has quit [Quit: Leaving...]
kloenk has joined #asahi-dev
<kloenk>
Hi, trying to hack a bit on m1n1 right now. The path argument to adt_get_reg (type int), does it always have the size 8? or is it dynamic?
espo has quit [Quit: Leaving]
klaus has quit [Quit: leaving]
nsklaus has joined #asahi-dev
<sven>
jannau: a default DMA Domain is attached when the device is probed
<sven>
that 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
<sven>
so the whole locked dart thing has to support detaching and attaching domains eventually
<sven>
(while always keeping the DCP firmware maps)
espo has joined #asahi-dev
the_lanetly_052 has joined #asahi-dev
<kettenis>
can't you just reserver the iova's used by the framebuffer to stop the iommu code fro messing about with those mappings?
<sven>
the iommu subsystem will overwrite whatever pagetable is present and drop all mappings when doing that
<sven>
there's no mechanism to keep certain iovas around, that's what that patch series linked above is about
<sven>
what 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
roxiun[m] has joined #asahi-dev
<alyssa>
sven: thank you for reminding me why i stopped working on dcp
chadmed has quit [Ping timeout: 480 seconds]
<sven>
alyssa: so that means if jannau fixes those issues you'll return? :>
<alyssa>
sven: 3d awaits
<sven>
even better!
<alyssa>
and what do you mean return i just did a pile of mesa work for the M1 a week ago
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi-dev
the_lanetly_052 has quit [Ping timeout: 480 seconds]
MajorBiscuit has quit [Ping timeout: 480 seconds]
dsrt^ has joined #asahi-dev
dsrt^ has quit [Remote host closed the connection]
Gaspare has joined #asahi-dev
Gaspare has quit [Ping timeout: 480 seconds]
aleasto has quit [Quit: Konversation terminated!]
aleasto has joined #asahi-dev
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit [Ping timeout: 480 seconds]
nirgo has joined #asahi-dev
jeffmiw has joined #asahi-dev
jeffmiw has quit [Remote host closed the connection]
<jannau>
sven: I guess noboby checked if something else needs to be mapped. proof of concept seems to work but kernel hangs after dcp-piodma attaches to the iommu domain
<jannau>
mapping the framebuffer also for stream 4 of dart-disp0 is not enough
yuyichao_ has quit [Ping timeout: 480 seconds]
<jannau>
it has a region just after the framebuffer mapped, only referenced in carveout-memory-map
<jannau>
stream 0 has also one additional page mapped
nyx_o has quit [Quit: WeeChat 3.3]
<alyssa>
sounds like you're having fun
<jannau>
yes, except for dealing with devicetree
* alyssa
never figured out what the DT for DCP should look like