Commit 33626e6a authored by Chris Wilson's avatar Chris Wilson

drm/i915/ringbuffer: Disable the ringbuffer on cleanup.

It should be idle on cleanup anyway...
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 872d860c
......@@ -651,9 +651,17 @@ int intel_init_ring_buffer(struct drm_device *dev,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment