aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-16 07:43:36 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-17 06:28:23 -0500
commiteb119bd612906519cacef2536a9a524c2da5f7fb (patch)
tree946f3e2f589c6bf09b2200c7dfe7de0fbcb59667
parent3f8c65d60467c6ccf4d690f5266567d6c423ae7d (diff)
drm/i915: Access to snooped system memory through the GTT is incoherent
We ignore all the user requests to handle flushing to the GTT domain if the user requests such on a snoopable bo, and as such access through the GTT to such pages remains incoherent. The specs even warn that such behaviour is undefined - a strong reason never to do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6380c6083cb2..d15c86279d02 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1341,6 +1341,12 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1341 1341
1342 trace_i915_gem_object_fault(obj, page_offset, true, write); 1342 trace_i915_gem_object_fault(obj, page_offset, true, write);
1343 1343
1344 /* Access to snoopable pages through the GTT is incoherent. */
1345 if (obj->cache_level != I915_CACHE_NONE && !HAS_LLC(dev)) {
1346 ret = -EINVAL;
1347 goto unlock;
1348 }
1349
1344 /* Now bind it into the GTT if needed */ 1350 /* Now bind it into the GTT if needed */
1345 ret = i915_gem_object_pin(obj, 0, true, false); 1351 ret = i915_gem_object_pin(obj, 0, true, false);
1346 if (ret) 1352 if (ret)