Skip to content

Commit

Permalink
drm/i915: Silence the WARN if the user tries to GTT mmap an incoheren…
Browse files Browse the repository at this point in the history
…t 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>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Jun 5, 2014
1 parent dbb4274 commit ddeff6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ddeff6e

Please sign in to comment.