#asahi-gpu · 2026-01-29 13:35
olivermeh. okay. any hints on why macos is using it then? they dont have any of those problems?#asahi-gpu · 2026-01-29 13:35
oliveryea, hacks all the way#asahi-gpu · 2026-01-29 13:34
alyssano hacks.#asahi-gpu · 2026-01-29 13:34
alyssaand I won't be merging patches for any of this to Mesa unless it is very high quality, because this is subtle#asahi-gpu · 2026-01-29 13:34
alyssathere exist solutions to all of these problems but dcp is really the easy part.#asahi-gpu · 2026-01-29 13:33
alyssa& the fact that iirc celebrity compositors like kwin *do* read back the scanout fb to implement screen grab#asahi-gpu · 2026-01-29 13:33
alyssa& the fact we don't actually know how the image will be used ahead-of-time for two#asahi-gpu · 2026-01-29 13:32
alyssapartial renders for one https://rosenzweig.io/blog/asahi-gpu-part-5.html#asahi-gpu · 2026-01-29 13:29
oliverwhy does it need to be able to read things back?#asahi-gpu · 2026-01-29 13:28
alyssaoliver: I stand by what I said - effectively can't use interleaved compressed even for scanout in Mesa because AGX needs to be able to read things back.#asahi-gpu · 2026-01-29 12:13
oliversome pictures for that later today to make that clear. #asahi-gpu · 2026-01-29 12:13
oliverThe first one. I've modified mesa and the kernel and build a small app to initialize the plane with interchange_compressed, render a triangle and scan that out. I looked at the raw compressed data (basically as linear would scan it out) to see how the compressed data looks like. I then compared what's in my rendered buffer with how the dumped buffer from macos looks like to get a feeling of how my data _should_ look like. Let me create #asahi-gpu · 2026-01-29 11:44
jannaupuzzled how the linear scanout could not match your expectation#asahi-gpu · 2026-01-29 11:40
jannauoliver: I'm not sure I understand what you're exactly doing. are you trying to scanout a interchange_compressed surface created by a modified mesa? or a interchange surface rendered on macos and dumped?#asahi-gpu · 2026-01-29 10:45
oliverIt looked at framebuffers generated by Macos#asahi-gpu · 2026-01-29 10:44
oliverjannau: I have looked at the images, yes. The interchange format compresses each 16x16 tile independently and writes one compressed tile per 1024 bytes. So I expect the picture to be mostly back and to have little dots of color all over the place. #asahi-gpu · 2026-01-29 09:22
olivialI was *gonna* test it against a version of panvk hacked to have the same bug, but panvk doesn't have ESO and I don't have hw to test against real hk :(#asahi-gpu · 2026-01-29 09:22
olivial(binding pipelines normally, the application will unbind the GS automatically)#asahi-gpu · 2026-01-29 09:21
olivialoof, putting together a CTS test for the xfb bug is kinda annoying cause it's only possible to actually trigger it with ESO#asahi-gpu · 2026-01-29 08:35
jannauhttps://www.collabora.com/news-and-blog/blog/2020/04/08/adding-mainline-arm-frame-buffer-compression-support-for-rockchip/ has an overview how AFBC works#asahi-gpu · 2026-01-29 08:31
jannauI expect the compression metadata to contain offset into the frame buffer to indicate where the tile data is stored. compare how Arm's compressed framebuffer format works#asahi-gpu · 2026-01-29 08:29
jannauoliver: my point being that is that I expect a mostly solid color picture to compress well. As in just a few bytes per page sized tile. so your linear scanout doesn't look that unexpected to me#asahi-gpu · 2026-01-29 07:29
jannauoliver: have you looked at the interchange_compressed framebuffer in an image viewer? Does it look like the linear scanout of it?#asahi-gpu · 2026-01-29 06:46
oliverokay i'll write something regarding that in the re channel#asahi-gpu · 2026-01-29 06:43
chadmedthat was for compressed agx#asahi-gpu · 2026-01-29 06:42
chadmedi got as far as verify_surfaces complaining that the surfaces havent been marked as having twiddled addresses#asahi-gpu · 2026-01-29 06:42
oliverhere are some pictures of rendering and scanning out interchange. i am using a little program to open the drm interface directly & render the triangle via gl, no wayland between.#asahi-gpu · 2026-01-29 06:42
oliverhttps://gist.github.com/oliverbestmann/999188061c3a29da850844f5ed9eea8d#asahi-gpu · 2026-01-29 06:39
chadmedmy ghidra project is probably less complete than yours, i spent maybe like 6 or so hours of actual work on it :P #asahi-gpu · 2026-01-29 06:38
chadmedi can send you my ghidra project (#asahi-re if you wanna discuss this more) but in terms of making dcp show agx fbs i just added the format modifiers to the kernel driver and it showed them without crashing (with the above caveats that they looked wrong) #asahi-gpu · 2026-01-29 06:13
oliverCould you send me what you have? I was also doing that, but as soon as I enable compression and tiling, the dcp crashes with something like "isr0 queue not empty". I also looked into the firmware blob, and I think I understood the verify surfaces and verify agx surfaces methods. They do pass happily with compression set, but still crashes in the end.. #asahi-gpu · 2026-01-29 06:02
JamesCalligeros[m]I just dont know where those could be. I got partway through reversing iomfb_verify_surfaces in ghidra but ran out of holiday :p#asahi-gpu · 2026-01-29 06:01
JamesCalligeros[m]I got it to display them, but not properly. There are clearly flags or something we need to set to make it deal with the tiling and compression and addressing mode#asahi-gpu · 2026-01-29 05:47
oliverExactly. And I didn't get it to not crash with an agx fb either. #asahi-gpu · 2026-01-29 05:35
JamesCalligeros[m](note that the support for agx fbs is implied by firmware re and not m1n1 work. ive never actually seen macos pass an agx fb to dcp)#asahi-gpu · 2026-01-29 05:34
JamesCalligeros[m]we dont need to care about interchange unless its the only way to get framebuffers out of avd#asahi-gpu · 2026-01-29 05:34
JamesCalligeros[m]dcp supports actual agx framebuffers#asahi-gpu · 2026-01-29 05:29
oliverAlyssa: except for compressed scanout like macos does, right? #asahi-gpu · 2026-01-29 02:49
olivialhahaha :)#asahi-gpu · 2026-01-29 02:44
alyssa~~I am glad that driver isn't my problem anymore~~#asahi-gpu · 2026-01-29 02:43
alyssaIt's just a hash table hit.#asahi-gpu · 2026-01-29 02:43
alyssaProbably reasonable.#asahi-gpu · 2026-01-29 02:40
olivialand recompute the passthrough GS every time GS/VS are dirty and a passthrough is needed#asahi-gpu · 2026-01-29 02:40
alyssafair#asahi-gpu · 2026-01-29 02:40
alyssahonestly fiar.#asahi-gpu · 2026-01-29 02:40
olivialthe way I'm handling this in panvk is to just not have a fast path for passthrough-gs-already-bound#asahi-gpu · 2026-01-29 02:39
olivialyeah#asahi-gpu · 2026-01-29 02:39
alyssawould be great to get CTS for it#asahi-gpu · 2026-01-29 02:39
olivialcan send a patch in a bit#asahi-gpu · 2026-01-29 02:39
olivialI thought *maybe* the xfb fuzz tests would catch this, but I guess not :)