I have configured the DRM stack and the Panfrost driver on FreeBSD 15.0-RELEASE and the Radxa Zero 3W but it still doesn't work well. The problem is that after the switch "VT: Replacing driver "efifb" with new "fb" the cursor freezes and the keyboard no longer works, but the rest continues to work. I can use the system via SSH, I still have the Wi-Fi connection. It seems to be a problem related only to the USB keyboard. I tried two keyboards but the situation was always the same. At the same time however, when I configured DRM and Panfrost driver on FreeBSD 14.2 that problem does not occurs.
I have applied your IOMMU v2 code to FreeBSD 15.0-RELEASE where I have enabled the DRM stack and the panfrost driver as a module. Now I'm testing it. On FreeBSD 14.2 the timeouts (hw_done and flip_done) occur because IOMMU is not present. This means that the VOP2 (Video Output Processor) absolutely needs the IOMMU to manage memory fragmentation; without it it fails to render the framebuffer. In FreeBSD 15.0 IOMMU can restart the graphics acceleration (resolving the flip_done timed outs of 14.2).
But it seems that the "price" to pay for this rescue seems to be,at least on the 15.0-RELEASE, the introduction of a massive transient load on the AXI bus which "chokes" the USB queues for an instant just at the moment in which the vt virtual display switch occurs, causing the ukbd keyboard to freeze.
Does this analysis make sense to you ? I'm trying to understand what's the exact problem and how to fix it...