diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 12:05:40 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-06-04 14:16:40 -0400 |
commit | 3eef8918ff440837f6af791942d8dd07e1a268ee (patch) | |
tree | e32d25574d4e9cc80ec0b1060c17f0c6dec346f6 /drivers/gpu/drm | |
parent | 9e612a008fa7fe493a473454def56aa321479495 (diff) |
drm/i915: Mark the ringbuffers as being in the GTT domain
By correctly describing the rinbuffers as being in the GTT domain, it
appears that we are more careful with the management of the CPU cache
upon resume and so prevent some coherency issue when submitting commands
to the GPU later. A secondary effect is that the debug logs are then
consistent with the actual usage (i.e. they no longer describe the
ringbuffers as being in the CPU write domain when we are accessing them
through an wc iomapping.)
Reported-and-tested-by: Daniel Gnoutcheff <daniel@gnoutcheff.name>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41092
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 490df551e312..9fbad086cb4b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -988,6 +988,10 @@ static int intel_init_ring_buffer(struct drm_device *dev, | |||
988 | if (ret) | 988 | if (ret) |
989 | goto err_unref; | 989 | goto err_unref; |
990 | 990 | ||
991 | ret = i915_gem_object_set_to_gtt_domain(obj, true); | ||
992 | if (ret) | ||
993 | goto err_unpin; | ||
994 | |||
991 | ring->virtual_start = ioremap_wc(dev->agp->base + obj->gtt_offset, | 995 | ring->virtual_start = ioremap_wc(dev->agp->base + obj->gtt_offset, |
992 | ring->size); | 996 | ring->size); |
993 | if (ring->virtual_start == NULL) { | 997 | if (ring->virtual_start == NULL) { |