summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMario Limonciello (AMD) <superm1@kernel.org>2026-11-05 16:32:15 +0000
committerJoerg Roedel <joerg.roedel@amd.com>2026-11-06 13:22:42 +0100
commitb32ecac779bba6e7ac7caeae8c40db4280941634 (patch)
tree9bc62b6b19e7267d39ead4ab721ebc1d7995d5ee /scripts
parent6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff)
iommu/amd: Enable PerfOpt automatically for integrated GPUs
PerfOpt is usable by integrated GPUs in identity mode. Enable it from the IOMMU driver's domain attachment paths instead of requiring an amdgpu policy knob and exported enable/disable interfaces. Mark supported integrated GPUs as PerfOpt-eligible when selecting their default identity domain. Skip GCR3 setup and ATS/PRI/PASID enablement for these identity attachments, then enable PerfOpt after installing the DTE. Clear PerfOpt before attaching an eligible GPU to a translated or blocked domain, including unmanaged domains used by VFIO. Propagate failures to clear bypass, but keep a completed identity attachment successful if the optional PerfOpt enable fails. Clear inherited PerfOpt state during initialization, including when a crash kernel reuses device tables. Read feature support directly from hardware because cached features may not be available yet, and stop initialization if the initial clear fails. Each IOMMU has at most one PerfOpt-eligible GPU, so track activation with a boolean under the IOMMU lock. Preserve this state while clearing hardware at suspend and shutdown, and restore the bit on resume only where it was active. Do not enable PerfOpt unconditionally during early IOMMU initialization. Remove the amdgpu parameter, driver callbacks, and exported interfaces. Translated attachments retain their normal device capability setup. Suggested-by: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions