* [PATCH] drm/i915: Access to snooped system memory through the GTT is incoherent
@ 2012-12-16 12:43 Chris Wilson
2012-12-17 11:26 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2012-12-16 12:43 UTC (permalink / raw)
To: intel-gfx
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>
---
drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 65cf019..6438b2c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1417,6 +1417,12 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
trace_i915_gem_object_fault(obj, page_offset, true, write);
+ /* Access to snoopable pages through the GTT is incoherent. */
+ if (obj->cache_level != I915_CACHE_NONE && !HAS_LLC(dev)) {
+ ret = -EINVAL;
+ goto unlock;
+ }
+
/* Now bind it into the GTT if needed */
ret = i915_gem_object_pin(obj, 0, I915_PIN_MAPPABLE);
if (ret)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915: Access to snooped system memory through the GTT is incoherent
2012-12-16 12:43 [PATCH] drm/i915: Access to snooped system memory through the GTT is incoherent Chris Wilson
@ 2012-12-17 11:26 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-12-17 11:26 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Sun, Dec 16, 2012 at 12:43:36PM +0000, Chris Wilson wrote:
> 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>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-17 11:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 12:43 [PATCH] drm/i915: Access to snooped system memory through the GTT is incoherent Chris Wilson
2012-12-17 11:26 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).