diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-29 16:18:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-29 19:00:43 +0100 |
commit | 33626e6a08669b1a5834e76363dcd5c8733a4278 (patch) | |
tree | de35d668bdd5336119eb64a427bdbd5599c3174b /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 872d860c85e30cdc97e7c91723257f4fcf04d5e9 (diff) |
drm/i915/ringbuffer: Disable the ringbuffer on cleanup.
It should be idle on cleanup anyway...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 632a98e0ba5..0f1693981ee 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -651,9 +651,17 @@ err_hws: void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring) { + struct drm_i915_private *dev_priv; + int ret; + if (ring->gem_object == NULL) return; + /* Disable the ring buffer. The ring must be idle at this point */ + dev_priv = ring->dev->dev_private; + ret = intel_wait_ring_buffer(ring, ring->size - 8); + I915_WRITE_CTL(ring, 0); + drm_core_ioremapfree(&ring->map, ring->dev); i915_gem_object_unpin(ring->gem_object); |