#asahi-dev · 2023-09-10 11:10
eilnrebased and pushed the just-works heap mapping#asahi-dev · 2023-09-10 10:58
maz... I'd be interested in reviewing it.#asahi-dev · 2023-09-10 10:57
mazmarcan: the one thing I don't want to create is some new form of ABI at the userspace or hypercall level upstream. I know you went down that way in the Asahi tree, and that's fine by me as long as you keep it there. *how* you make it work is interesting though. If you have a bit of a spec/write-up that describes the various controls in the AUX regs at both ELs.#asahi-dev · 2023-09-10 09:26
marcanI'd be happy with enabling TSO globally in the VM (Apple already do this for Rosetta on Linux VMs on macOS anyway), we just need to signal it to the guest somehow so FEX can pick it up.#asahi-dev · 2023-09-10 09:25
marcan(I know you're not going to like any of this, but I hope we can come up with at least a least-horrible solution because, really, using TSO is non-negotiable here, the perf boost for x86 emu is major)#asahi-dev · 2023-09-10 09:23
marcanso we might at the very least need to copy ACTLR_EL12 (impdef) <= ACTLR_EL2 to make the prctl work "automatically" for kvm host processes#asahi-dev · 2023-09-10 09:22
marcanactually I'm not sure if the guest ACTLR behaves as intended already, since apple came up with an IMPDEF ACTLR_EL12... I feel like I looked into this already but I'm not sure any more. it might be that right now EL1 always gets default ACTLR (ACTLR_EL12) even if EL2 set something in its ACTLR_EL2, regardless of what is enabled in HACR_EL2.#asahi-dev · 2023-09-10 09:10
marcanfor ref, the TSO series is here: https://github.com/asahilinux/linux/tree/bits/220-tso#asahi-dev · 2023-09-10 09:08
marcanalternatively we could have higher level hypervisor calls to forward this to prctl without dropping all the way to qemu or whatever, since I assume a vm exit (or more) to qemu for every context switch in the guest is a really bad idea#asahi-dev · 2023-09-10 09:08
marcanbut of course it would be more efficient to only have TSO in the VM where needed, which would mean forwarding that control to the guest. in principle, AIUI the guest can directly twiddle that bit without any VM exits, but we have to explicitly allow that and it would be IMPDEF of course.#asahi-dev · 2023-09-10 09:07
marcanbut, that means we need TSO for KVM. right now it's a prctl on the host (not sure if you saw that patch) and I assume it would work as-is to enable TSO globally in the VM if KVM just keeps that state untouched from process context.#asahi-dev · 2023-09-10 09:06
marcanmaz: so we have another fun challenge now. turns out running x86 games in a 4K VM on a 16K host is actually doable and already proven to work well. that neatly sidesteps the whole 4K kernel pain for us, and might easily be the way to go at this point.#asahi-dev · 2023-09-10 08:22
marcanjannau: probably yes, back when I did bringup on that I assume I saw it was breaking the display and did the quick fix.#asahi-dev · 2023-09-10 06:34
jannauwhy is t602x' ps_dptx_phy_ps always-on? is it not blocked on t602x laptops and disabling it breaks the display? If that's the case we should either add it to dcp's or the panel's power-domain#asahi-dev · 2023-09-10 06:01
marcanin a future where m1n1 can do atcphy stuff and point the display at multiple places, it probably makes sense for it to add the relevant PDs to the framebuffers dynamically#asahi-dev · 2023-09-10 06:00
marcanyup#asahi-dev · 2023-09-10 04:54
jannauadding the code to simpledrm shouldn't be a problem. it has already code to handle multiple clocks and regulators#asahi-dev · 2023-09-10 04:46
jannauit will not be a problem for dcp in the final state as the phy will get it's own node and everything has a single power-domain#asahi-dev · 2023-09-10 04:45
jannauthis is with display/dcp disabled since they must not take over the framebuffer#asahi-dev · 2023-09-10 04:35
marcanjannau: with my genpd defer patches, it should work if you don't give the genpd to simpledrm as long as dcp owns it and *it* knows how to handle it. however, if you remove DCP from the device tree, just simpledrm will break without explicit multi pd handling.#asahi-dev · 2023-09-09 20:20
jannauworks now with explicit power domain handling in simpledrm#asahi-dev · 2023-09-09 19:55
jannauit supports multiple regulators#asahi-dev · 2023-09-09 19:51
jannauone could also argue that sequencing for simpledrm doesn't matter since it expected to boot with the power-domains powered#asahi-dev · 2023-09-09 19:50
jannauwe have our own compatible so I could in principle#asahi-dev · 2023-09-09 19:48
jannauthis is a little annoying, adding handling of multiple power-domains to simpledrm is for the same reason not a solution#asahi-dev · 2023-09-09 19:47
jannauno, I added it as power-domain to display-subsystem which has none#asahi-dev · 2023-09-09 19:38
svendoes DCP maybe already have the logic to add more than one domain?#asahi-dev · 2023-09-09 19:38
jannauseems to "work" fine in the sense that it leaves active domains on #asahi-dev · 2023-09-09 19:37
sven+have#asahi-dev · 2023-09-09 19:37
sveni think the reason from the subsystem maintainers was that once you more than one the sequencing is usually complicated and should be left to the driver #asahi-dev · 2023-09-09 19:36
sven*genpd#asahi-dev · 2023-09-09 19:36
sveniirc genod by default only supports a single power domain #asahi-dev · 2023-09-09 19:34
jannaudcp will maybe just work with dptx-port/dptx-phy brought up by m1n1#asahi-dev · 2023-09-09 19:33
jannaunevermind, dcp gets loaded and that drops simpledrm and the dptx-phy power-domain#asahi-dev · 2023-09-09 19:30
jannauis that a genpd issue our an issue with our driver?#asahi-dev · 2023-09-09 19:29
jannauwhat was the issue with multiple power-domains? even with the dptx-phy power-domains added to framebuffer0 it ends up being turned off during boot#asahi-dev · 2023-09-09 08:22
jannauah, it used dcpext0 instead of dcp0 while it used the darts of dcp0. fixed#asahi-dev · 2023-09-09 07:42
jannaunot ready, I somehow managed to break the m2 pro#asahi-dev · 2023-09-09 07:37
jannauyes, but only with pd_ignore_unused. device tree needs power-domain changes for simpledrm#asahi-dev · 2023-09-09 07:30
chadmedjannau: does that give us simpledrm on hdmi for those machines?#asahi-dev · 2023-09-09 07:22
jannauonto the mess the linux driver currently is#asahi-dev · 2023-09-09 07:21
jannaum1n1 dptx support for m2* is ready for review / to be merged#asahi-dev · 2023-09-08 17:34
mazyup. the switches (which are absolutely tiny) are either off by about 1mm, or have some bad bridges. the only change I made in v3.1 was to pick hummer-sized ICs, and it's been pretty solid since.#asahi-dev · 2023-09-08 17:24
svenhow did they mess them up? unaligned ics?#asahi-dev · 2023-09-08 17:18
mazI've been secretly thinking of buying a hot-plate to rework the handful of v3 that were butchered by jlcpcb... total nonsense from a cost perspective, but still...#asahi-dev · 2023-09-08 16:59
kevans91I hadn't ordered a stencil for that batch, but I'm not averse to ordering one to throw in and sweeten the pot a bit#asahi-dev · 2023-09-08 16:52
mazsven: I know a few mad people... :D#asahi-dev · 2023-09-08 16:48
sveni wouldn't want to solder some of those chips without a stencil :D#asahi-dev · 2023-09-08 16:46
mazkevans91: did you get a stencil as well, or just the boards?