OSDN Git Service

drm/i915: Sleep around performing iommu unmaps on Tigerlake
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Dec 2020 16:40:07 +0000 (16:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Dec 2020 19:43:18 +0000 (19:43 +0000)
commit84361529ee853d25b1d06b7070a590d972cdcc03
treee3a6a62fb9a8d2a39a9eeef6924cfb05fd84359e
parent63de1da1479968e256123097fe9d153183e5fe6c
drm/i915: Sleep around performing iommu unmaps on Tigerlake

Tigerlake is plagued by spontaneous DMAR faults [reason 7, next page
table ptr is invalid] which lead to GPU hangs. These faults occur when
an iommu map is immediately reused. Adding further clflushes and
barriers around either the GTT PTE or iommu PTE updates do not prevent
the faults. So far the only effect has been from inducing a delay
between reuse of the iommu on the GPU, and applying the delay at the
iommu map allows for the smallest stable delay.

Note that such a delay is hideous and clearly does not fix the root cause,
and so should only be a bandaid until a complete solution is found. The
delay was determined by running igt/gem_exec_fence/parallel in a loop for
a few hours (unpatched MTBF is about 10s).

We have also seen such DMAR fault [reason 7] errors on other platforms,
notably gen9-gen11, but so far it has only been trivially and
consistently reproduced on Tigerlake.

v2: Leave a tell-tale to know when we apply the vt'd quirk, and as a
reminder to remove it again. Hopefully.

Testcase: igt/gem_exec_fence/parallel
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201209164008.5487-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_ggtt.c