Okay I spent some time looking into it, and this is the result.
We have to manually insert the VRAM BAR into the pat memory tracking
table as WC. The only other way things get inserted are via ioremap,
which we never do for the whole VRAM BAR. We could in theory map
the VRAM BAR using the iomap stuff that i915 uses, but we don't
and this seems easier for now.
We have to fix up at least nouveau and radeon I think as well.
amd-gfx mailing list