mirror of
https://github.com/AuxXxilium/arc.git
synced 2026-09-02 22:26:51 +08:00
amd_iommu has no graphics-only value. intel_iommu=igfx_off exempts just the GPU and leaves the rest of the IOMMU working; the AMD driver has no equivalent carve-out, so amd_iommu=off disables DMA remapping for the whole system -- and with it VM device passthrough. Setting it for every platform in IGFXRL applied that cost to Intel and GPU-less AMD boxes, which gain nothing from it. Keep the platform gate and add a hardware one: emit amd_iommu=off only when a 1002 display device is actually on the bus. It is needed on the boxes that do have one. The PSP fetches its TOC by DMA, and with the IOMMU active the command never completes: psp gfx command ID_LOAD_TOC(0x20) failed and response status is (0x0) hw_init of IP block <psp> failed -22 amdgpu then aborts before drm_dev_register(), so no render node is created. Confirmed on a Legion Go (Phoenix1, Radeon 780M): with amd_iommu=off the driver probes and /dev/dri/renderD128 appears. amd_iommu=off alone is sufficient -- the broader iommu=off also works but is not needed here. getAmdGpuId() mirrors the existing getIgpuId(), matching the whole PCI display class rather than only VGA (0300) -- the Phoenix1 iGPU reports 0380. Verified against synthetic sysfs trees: AMD-only and mixed Intel+AMD boxes return the AMD id, while Intel-only and GPU-less boxes return nothing and so keep their IOMMU. Signed-off-by: AuxXxilium <info@auxxxilium.tech>