Skip to content

Commit

Permalink
drm/i915: Mark the ringbuffers as being in the GTT domain
Browse files Browse the repository at this point in the history
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 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41092
Signed-off-by: Chris Wilson <[email protected]>
Cc: [email protected]
Signed-off-by: Daniel Vetter <[email protected]>
  • Loading branch information
ickle authored and danvet committed Jun 4, 2012
1 parent 9e612a0 commit 3eef891
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,10 @@ static int intel_init_ring_buffer(struct drm_device *dev,
if (ret)
goto err_unref;

ret = i915_gem_object_set_to_gtt_domain(obj, true);
if (ret)
goto err_unpin;

ring->virtual_start = ioremap_wc(dev->agp->base + obj->gtt_offset,
ring->size);
if (ring->virtual_start == NULL) {
Expand Down

0 comments on commit 3eef891

Please sign in to comment.