Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddeff6ee authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

drm/i915: Silence the WARN if the user tries to GTT mmap an incoherent object



If the user tries to mmap through the GTT an object that is marked as
snooped, we report an error rather than allow the GPU to hang the
machine. The choice of EINVAL, however, was unfortunate as we turn that
into a WARN rather than a quiet SIGBUS.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent dbb42748
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1427,7 +1427,7 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)

	/* Access to snoopable pages through the GTT is incoherent. */
	if (obj->cache_level != I915_CACHE_NONE && !HAS_LLC(dev)) {
		ret = -EINVAL;
		ret = -EFAULT;
		goto unlock;
	}