From: jsg Date: Mon, 27 Mar 2023 04:27:20 +0000 (+0000) Subject: drm/i915: Don't use BAR mappings for ring buffers with LLC X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c1b1784e0b098465c3b19f3ae612782f1a23c124;p=openbsd drm/i915: Don't use BAR mappings for ring buffers with LLC From John Harrison be11d0d9c4eb7c2108ce9041b9e89c86856ca596 in linux-6.1.y/6.1.16 85636167e3206c3fbd52254fc432991cc4e90194 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/gt/intel_ring.c b/sys/dev/pci/drm/i915/gt/intel_ring.c index fb1d2595392..fb99143be98 100644 --- a/sys/dev/pci/drm/i915/gt/intel_ring.c +++ b/sys/dev/pci/drm/i915/gt/intel_ring.c @@ -53,7 +53,7 @@ int intel_ring_pin(struct intel_ring *ring, struct i915_gem_ww_ctx *ww) if (unlikely(ret)) goto err_unpin; - if (i915_vma_is_map_and_fenceable(vma)) { + if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915)) { addr = (void __force *)i915_vma_pin_iomap(vma); } else { int type = i915_coherent_map_type(vma->vm->i915, vma->obj, false); @@ -98,7 +98,7 @@ void intel_ring_unpin(struct intel_ring *ring) return; i915_vma_unset_ggtt_write(vma); - if (i915_vma_is_map_and_fenceable(vma)) + if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915)) i915_vma_unpin_iomap(vma); else i915_gem_object_unpin_map(vma->obj);