#
…

2022-01-27

00:12willemml has quit [Quit: willemml]
00:13willemml has joined #asahi-dev
00:32willemml has quit [Quit: willemml]
00:53willemml has joined #asahi-dev
00:56willemml has quit []
00:59willemml has joined #asahi-dev
01:00willemml has quit []
01:45balrog has quit [Quit: Bye]
01:51balrog has joined #asahi-dev
02:08suricato_ has joined #asahi-dev
02:10suricato has quit [Ping timeout: 480 seconds]
02:16willemml has joined #asahi-dev
02:18willemml has quit []
02:47yuyichao_ has quit [Ping timeout: 480 seconds]
02:54tmlind has quit [Remote host closed the connection]
03:15PhilippvK has quit [Ping timeout: 480 seconds]
03:19chadmed has quit [Ping timeout: 480 seconds]
03:23chadmed has joined #asahi-dev
03:38yuyichao_ has joined #asahi-dev
05:20willemml has joined #asahi-dev
05:42willemml has quit [Ping timeout: 480 seconds]
06:23the_lanetly_052__ has quit [Ping timeout: 480 seconds]
07:38tmlind has joined #asahi-dev
07:56FinnBehrenshehim[m] has joined #asahi-dev
07:57FinnBehrenshehim[m] is now known as kloenk
08:00chadmed has quit [Quit: Konversation terminated!]
08:02kloenk has quit [Quit: issued !quit command]
08:03chadmed has joined #asahi-dev
08:05kloenk has joined #asahi-dev
08:12klaus has joined #asahi-dev
08:36svenjannau: 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
08:36sveneventually 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
08:37svenbefore i write about the second step, how familiar are you with the iommu subsystem?
08:39ChaosPrincessis there some sort of a write-up/documenatation/etc on locked darts?
08:39svenit just means that you can't change any of the registers
08:39svenit's a bit iboot sets for the dcp dart
08:40ChaosPrincessso, how does reclaiming memory will work then, dcp can unlock it?
08:40svenjannau: 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
08:40svenChaosPrincess: what do you mean with reclaim memory?
08:41_jannau_sven: almost not familiar at all. I looked over the dart commits and I figured out how to map the dcp crashlog buffer
08:41svenlocked 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
08:43svenjannau: okay. i'll write a bit more about that later then
08:45ChaosPrincesssven: ok, got it
08:45kloenk has quit [Remote host closed the connection]
08:47svenif 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.
08:47svenor just hack the DART driver to scan out existing pagetables and recreate them on a domain attach
08:48sveni 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
08:52_jannau_macos clears all planes as first swap during boot. that hopefully removes the boot framebuffer scanout
08:52svenyes! that's what i was thinking about, thanks
08:52svenwasn't able to find it
08:52mazthough this assumes idmap.
08:52sveni think at the end there was some brief discussion about non idmaps, but there never was any conclusion
08:53mazit's been going on for at least 5 years, with various patch series.
08:56svengreat :/
08:57sventhere goes my hope that someone else would solve that problem for us
08:57svenjannau: 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
08:58sven(well, not DCP but the actual display controller but same difference)
09:00kloenk has joined #asahi-dev
09:02mazsven: 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.
09:05espo has joined #asahi-dev
09:08_jannau_but to disable scan out we need dcp. is dart reconfigured at probe time or only when the first iommu domain attaches?
09:17the_lanetly_052__ has joined #asahi-dev
09:17kloenk has quit [Quit: Leaving...]
09:22kloenk has joined #asahi-dev
09:23kloenk_ has joined #asahi-dev
09:29MajorBiscuit has joined #asahi-dev
09:30kloenk has quit [Ping timeout: 480 seconds]
09:32the_lanetly_052__ has quit [Remote host closed the connection]
09:57espo has quit [Quit: Leaving]
10:13espo has joined #asahi-dev
10:29kloenk_ has quit [Quit: Leaving...]
10:29kloenk has joined #asahi-dev
10:33kloenkHi, 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?
11:00espo has quit [Quit: Leaving]
11:23klaus has quit [Quit: leaving]
11:23nsklaus has joined #asahi-dev
11:37svenjannau: a default DMA Domain is attached when the device is probed
11:38sventhat 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
11:38svenso the whole locked dart thing has to support detaching and attaching domains eventually
11:39sven(while always keeping the DCP firmware maps)
11:43espo has joined #asahi-dev
11:48the_lanetly_052 has joined #asahi-dev
12:15ketteniscan't you just reserver the iova's used by the framebuffer to stop the iommu code fro messing about with those mappings?
12:34sventhe iommu subsystem will overwrite whatever pagetable is present and drop all mappings when doing that
12:34sventhere's no mechanism to keep certain iovas around, that's what that patch series linked above is about
12:37svenwhat 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
13:19roxiun[m] has joined #asahi-dev
13:23alyssasven: thank you for reminding me why i stopped working on dcp
13:30chadmed has quit [Ping timeout: 480 seconds]
13:35svenalyssa: so that means if jannau fixes those issues you'll return? :>
13:36alyssasven: 3d awaits
13:36sveneven better!
13:36alyssaand what do you mean return i just did a pile of mesa work for the M1 a week ago
13:36svenreturn to DCP
14:25MajorBiscuit has quit [Ping timeout: 480 seconds]
14:36TheLink has quit [Quit: ZNC 1.8.2 - https://znc.in]
14:39TheLink has joined #asahi-dev
14:41aleasto has joined #asahi-dev
14:46yuyichao_ has quit [Ping timeout: 480 seconds]
14:52espo has quit [Quit: Leaving]
15:07yuyichao_ has joined #asahi-dev
15:14MajorBiscuit has joined #asahi-dev
16:51aleasto has quit [Quit: Konversation terminated!]
16:51aleasto has joined #asahi-dev
16:55aleasto has quit [Remote host closed the connection]
16:55aleasto has joined #asahi-dev
17:00the_lanetly_052 has quit [Ping timeout: 480 seconds]
17:22MajorBiscuit has quit [Ping timeout: 480 seconds]
17:57dsrt^ has joined #asahi-dev
18:05dsrt^ has quit [Remote host closed the connection]
18:12Gaspare has joined #asahi-dev
18:20Gaspare has quit [Ping timeout: 480 seconds]
18:27aleasto has quit [Quit: Konversation terminated!]
18:39aleasto has joined #asahi-dev
19:03___nick___ has joined #asahi-dev
19:03___nick___ has quit []
19:04___nick___ has joined #asahi-dev
20:14___nick___ has quit [Ping timeout: 480 seconds]
20:18nirgo has joined #asahi-dev
20:59jeffmiw has joined #asahi-dev
22:13jeffmiw has quit [Remote host closed the connection]
23:05jannausven: 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
23:06jannaumapping the framebuffer also for stream 4 of dart-disp0 is not enough
23:15yuyichao_ has quit [Ping timeout: 480 seconds]
23:15jannauit has a region just after the framebuffer mapped, only referenced in carveout-memory-map
23:16jannaustream 0 has also one additional page mapped
23:23nyx_o has quit [Quit: WeeChat 3.3]
23:23alyssasounds like you're having fun
23:26jannauyes, except for dealing with devicetree
23:41* alyssanever figured out what the DT for DCP should look like
23:55NightsOnly[m] has joined #asahi-dev
…