drm/i915: Don't use stolen memory for ring buffers with LLC
authorjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 04:25:33 +0000 (04:25 +0000)
committerjsg <jsg@openbsd.org>
Mon, 27 Mar 2023 04:25:33 +0000 (04:25 +0000)
From John Harrison
d805c28e11fc2a3043bb75aae098e576d746f625 in linux-6.1.y/6.1.16
690e0ec8e63da9a29b39fedc6ed5da09c7c82651 in mainline linux

sys/dev/pci/drm/i915/gt/intel_ring.c

index 15ec64d..fb1d259 100644 (file)
@@ -116,7 +116,7 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size)
 
        obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE |
                                          I915_BO_ALLOC_PM_VOLATILE);
-       if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt))
+       if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt) && !HAS_LLC(i915))
                obj = i915_gem_object_create_stolen(i915, size);
        if (IS_ERR(obj))
                obj = i915_gem_object_create_internal(i915, size);