Skip to content

Commit ddeff6e

Browse files
ickledanvet
authored andcommitted
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: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent dbb4274 commit ddeff6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/i915_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
14271427

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

0 commit comments

Comments
 (0)