#asahi-re · 2023-04-23 08:36
marcanChaosPrincess: try plane + 0x2c bits 0x2, 0x4, 0x100000#asahi-re · 2023-04-23 08:32
marcanso likely all registers are different#asahi-re · 2023-04-23 08:32
marcanChaosPrincess: I think the DFR pipe is a major redesign behind DCP, that's why they use that simpler one#asahi-re · 2023-04-23 08:26
marcanI think the latter are the flip bits and the former rotation, though if so I'd expect it to only work on older hardware... but then again you have older hardware than the main DISP0.#asahi-re · 2023-04-23 08:26
marcanalso bits 0x8 and 0x10 of 0x50030 or 0x51008#asahi-re · 2023-04-23 08:23
marcanChaosPrincess: try bit 0x100 of 0x50004 or 0x51004#asahi-re · 2023-04-23 08:16
marcanlet me see if I can find it#asahi-re · 2023-04-23 08:16
marcanI'm not entirely sure, this code is a bit tricky to trace :/#asahi-re · 2023-04-23 08:15
marcanthat's... a good question#asahi-re · 2023-04-23 08:15
marcan | | | | | "IOMFBSupportsXFlip" = Yes#asahi-re · 2023-04-23 08:15
marcan | | | | | "IOMFBSupportsYFlip" = Yes#asahi-re · 2023-04-23 08:14
marcan | | | | | "CFBundleIdentifier" = "com.apple.driver.AppleMobileDispH14G-DFR"#asahi-re · 2023-04-23 08:14
marcanChaosPrincess: ioreg will tell youi#asahi-re · 2023-04-23 08:14
marcanreflections work IIRC, though I don't remember if all#asahi-re · 2023-04-23 08:00
marcanI'm not surprised it's not supported, rotation sucks for display controllers since it completely destroys your memory access pattern#asahi-re · 2023-04-23 07:59
marcan"IOMFB %s: No support for rotated surfaces"#asahi-re · 2023-04-23 07:59
marcanyeah so#asahi-re · 2023-04-23 07:59
marcanah, that#asahi-re · 2023-04-23 07:56
marcanChaosPrincess: you mean the scaling based on src/dst rect?#asahi-re · 2023-04-23 06:11
marcan(I had to do that for the iBoot protocol since we can't hypervise that and at the time there wasn't even any iBoot plaintext available)#asahi-re · 2023-04-23 06:11
marcanI have, uh, a few scattered ghidra databases#asahi-re · 2023-04-23 06:10
marcanChaosPrincess: sure#asahi-re · 2023-02-05 07:50
marcanwe generally name things 1:1 with the PMGR descriptors in the ADT table, but if they aren't in there at all then that sounds like a good alternative#asahi-re · 2023-02-05 07:49
marcaneiln: sure, why not#asahi-re · 2023-02-05 07:37
marcan(you can still add base separately if there's a reason to turn it on without the children of course)#asahi-re · 2023-02-05 07:36
marcan(cpu also depends on sys of course, as it already does)#asahi-re · 2023-02-05 07:36
marcanso the dep chain is sys -> base -> {1-5} and the driver probably only needs to know about cpu and 1-5, sys and 0 would be implicitly driven as parents#asahi-re · 2023-02-05 07:36
marcanok, then let's go with that, call 0 "base" in the DT and 1-5 can keep those numbers, 1-based is fine if Apple does that#asahi-re · 2023-02-05 07:34
marcanno dep relationship between the 5 themselves? i.e. if base is on, you can turn on 5 first or 1 first?#asahi-re · 2023-02-05 07:33
marcaneiln: that means 1-5 should depend on base in the DT, that's the expected behavior#asahi-re · 2023-02-05 07:08
marcanif this were any other SoC vendor I'd be wary of lockups and badness if things are powered out of order, but Apple seems to be pretty good about encoding dependencies in pmgr cleanly where required :p#asahi-re · 2023-02-05 07:02
marcanif the ack does not come in and there is a hardware dep, that should be encoded by chaining them as parent/child#asahi-re · 2023-02-05 07:02
marcanI'd say test to see if you can power them up in the wrong order and the pstate ack comes in. if it does, treat them as an unordered set (might still be worth following the power up/down order to match macOS just in case, but it'd be a driver responsibility)#asahi-re · 2023-02-05 07:01
marcanseems pretty arbitrary...#asahi-re · 2023-02-05 07:01
marcan(and you get some error flag bit set which I forget)#asahi-re · 2023-02-05 07:00
marcan(the current pstate will not reach 0xf if parent domains are off)#asahi-re · 2023-02-05 07:00
marcanmight be worth testing#asahi-re · 2023-02-05 07:00
marcanbut if they have a hardware dependency it would show up if you try to turn them on in the wrong order, because they would refuse to do that#asahi-re · 2023-02-05 06:59
marcanheh, that ordering almost sounds like they should be a big chain#asahi-re · 2023-02-05 06:58
marcanbut if they're always handled together we can just shrug and treat them as an arbitrary set#asahi-re · 2023-02-05 06:58
marcaneiln_: any idea what each does? 6 sounds odd for 8 cores, like they have a deeper meaning we don't know#asahi-re · 2023-01-14 02:16
marcancute#asahi-re · 2023-01-14 01:28
marcaniBoot1 probably always needs to be personalized#asahi-re · 2023-01-14 01:27
marcanamarioguy: yes, that tracks#asahi-re · 2023-01-13 10:13
marcanmight want to compare with S3C2400 which has the RX TO enable bit in a different position#asahi-re · 2023-01-13 10:13
marcanq3k: I believe the original implementation had discrete IRQs, then Apple merged them into one, so it's possible that one still has them split#asahi-re · 2023-01-13 03:44
marcanyou need to make sure the IRQs are enabled (possibly masked at the IRQ controller, but enabled as far as the UART goes), clear the UTRSTAT bits (they're write 1 to clear), drain the RX FIFO, and then you should get an IRQ next time a byte comes in and times out#asahi-re · 2023-01-13 03:44
marcaninternally edge triggered that is#asahi-re · 2023-01-13 03:43
marcani.e. RXTO won't fire if you enable it with stuff already in the FIFO#asahi-re · 2023-01-13 03:43
marcanalso IIRC these chips only have edge triggered IRQs, so you need to get the sequencing right