On 9/25/26 5:39 PM, Jason Gunthorpe wrote:
On Fri, Sep 25, 2026 at 08:11:41AM -0500, Mario Limonciello wrote:


On 9/25/26 07:28, Jason Gunthorpe wrote:
On Fri, Sep 25, 2026 at 09:20:02AM +0200, Joerg Roedel wrote:
On Thu, Sep 24, 2026 at 07:50:18PM -0300, Jason Gunthorpe wrote:
Why does the GPU driver have to request this? Why can't the iommu
driver know that this is a special device that can use this magic fast
path and then auto set it when identity is asked for?

This is a layering violation either way. Either the IOMMU driver needs to poke
into device details and their relations or the device driver needs to poke into
IOMMU details.

There are no device details, this is just a module option in the gpu
driver.

Well the GPU driver has knowledge whether it's a GPU inside of an APU to
decide if it's valid.  That information is part of the discovery table
setup.

Where was that in patch 2?

amdgpu_device_use_perfopt()


The right way for this to work is to quirk it through the iommu driver
so it can choose the fast mode, and not involve the GPU driver at
all. Like we've done for every other GPU weirdness. And AMD should be
making this work better by providing ACPI support so the iommu driver
can understand how it should work without inspecting PCI IDs.

There is a heuristic that Vasant added recently that we detect APU from the IOMMU driver. We might be able to use that for now.

I'll take a look at what an incremental patch looks like on top of iommu/next that I think reworks all these paths the way you want. I should be able to post something next week.

Reply via email to