#asahi-dev · 2023-09-10 15:20
marcanand yeah, they do init some unknown regs but it doesn't seem to matter#asahi-dev · 2023-09-10 15:19
marcan*video#asahi-dev · 2023-09-10 15:19
marcant8103 works all the way to videao, yeah#asahi-dev · 2023-09-10 15:15
marcanbut yeah our DART driver knows how to share page tables and everything, it literally just works... (other than that inconsistent bypass thing I had to patch)#asahi-dev · 2023-09-10 15:14
marcanwould've probably saved you quite a bit of time :/#asahi-dev · 2023-09-10 15:14
marcanI'm so sorry you got caught up in this mess and I/we didn't catch it earlier and tell you what it's about :(#asahi-dev · 2023-09-10 15:14
marcantheir software engineering... is not.#asahi-dev · 2023-09-10 15:13
marcantheir hardware engineering is pretty good#asahi-dev · 2023-09-10 15:13
marcanbecause apple lol#asahi-dev · 2023-09-10 15:12
marcanwhich our driver knows how to do normally#asahi-dev · 2023-09-10 15:12
marcanyes, because that sequence is basically initializing the DART#asahi-dev · 2023-09-10 15:09
marcanbecause unlike Apple, our DART driver actually knows how to initialize stuff without relying on random hardcoded register pokes in the device tree#asahi-dev · 2023-09-10 15:09
marcaneiln: best part? it works without the "CTRR"/tunables setup at all#asahi-dev · 2023-09-10 15:08
marcaneiln: and everything works with 3 proper DARTs :)#asahi-dev · 2023-09-10 15:07
marcannice :)#asahi-dev · 2023-09-10 15:02
marcanlol#asahi-dev · 2023-09-10 14:58
marcanand of *course* apple made that inconsistent#asahi-dev · 2023-09-10 14:58
marcanwe check for matching bypass support#asahi-dev · 2023-09-10 14:58
marcan[ 0.326037] apple-dart 22c0fc000.iommu: DART [pagesize 4000, 16 streams, bypass support: 0, bypass forced: 0, locked: 0, AS 32 -> 36] initialized#asahi-dev · 2023-09-10 14:58
marcan[ 0.324633] apple-dart 22c0f4000.iommu: DART [pagesize 4000, 16 streams, bypass support: 0, bypass forced: 0, locked: 0, AS 32 -> 36] initialized#asahi-dev · 2023-09-10 14:58
marcan[ 0.323231] apple-dart 22c0e8000.iommu: DART [pagesize 4000, 16 streams, bypass support: 1, bypass forced: 0, locked: 0, AS 32 -> 36] initialized#asahi-dev · 2023-09-10 14:58
marcanohhh I get it#asahi-dev · 2023-09-10 14:57
marcanthat EPROBE_DEFER is wrong, isp is making it up#asahi-dev · 2023-09-10 14:55
marcanwith USB we could see certain kinds of requests wind up on one DART or the other (ask sven about that)#asahi-dev · 2023-09-10 14:54
marcanI believe the underlying reason for the multiple DARTs is performance or perhaps different configurations, where they connect different hardware memory initiators to different DARTs so it doesn't bottleneck on one#asahi-dev · 2023-09-10 14:54
marcanwhich is a pattern they have#asahi-dev · 2023-09-10 14:54
marcanthis is just Apple being very, very stupid in how they represent things in their device tree#asahi-dev · 2023-09-10 14:53
marcanthey are absolutely real DARTs#asahi-dev · 2023-09-10 14:53
marcanoh that's just EPROBE_DEFER lol#asahi-dev · 2023-09-10 14:53
marcansomething's wack here#asahi-dev · 2023-09-10 14:53
marcan[ 0.372900] apple-isp 22a000000.isp: failed to init iommu: -517#asahi-dev · 2023-09-10 14:53
marcan[ 0.371541] apple-dart 22c0e8000.iommu: adding as dart #0#asahi-dev · 2023-09-10 14:53
marcan[ 0.372085] apple-dart 22c0f4000.iommu: sid=0#asahi-dev · 2023-09-10 14:53
marcan[ 0.371095] apple-dart 22c0e8000.iommu: sid=0#asahi-dev · 2023-09-10 14:53
marcanah wait#asahi-dev · 2023-09-10 14:52
marcantrying to figure out why#asahi-dev · 2023-09-10 14:52
marcanthe "right" way#asahi-dev · 2023-09-10 14:52
marcanI mean the multi-dart thing isn't working now#asahi-dev · 2023-09-10 14:42
marcanand I also don't see things mirrored in the DARTs#asahi-dev · 2023-09-10 14:41
marcanhm, now I broke t8103 the same way#asahi-dev · 2023-09-10 14:36
marcanah yeah#asahi-dev · 2023-09-10 14:35
marcanwas that done in the DART driver?#asahi-dev · 2023-09-10 14:35
marcanjannau: oh, we need 3 here :/#asahi-dev · 2023-09-10 14:34
marcanso we just do that#asahi-dev · 2023-09-10 14:34
marcaninstead of just instantiating the hardware multiple times, which is actually what is going on here#asahi-dev · 2023-09-10 14:34
marcanthey do it as a horrible hack in the IOMMU driver#asahi-dev · 2023-09-10 14:34
marcanthat's effectively what you're doing and what Apple does for USB too#asahi-dev · 2023-09-10 14:34
marcanthat's just a shortcut for "there are multiple DARTs and you need to configure them all"#asahi-dev · 2023-09-10 14:27
marcanjannau: we didn't need anything special in USB for this right? the iommu code just handes multiple IOMMUs?#asahi-dev · 2023-09-10 14:25
marcanhold on, let me just go back to t8103 and try to clean this up