diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-29 13:15:52 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-29 15:22:06 -0400 |
commit | c584fe47e4d92934c10e5d7f932ee042587dbcff (patch) | |
tree | 45f1ea867c30068485424d21d5370ae8be0d25ad /drivers | |
parent | 1d8f38f4e7146d22f7fbc94eef0508bd75463f54 (diff) |
drm/i915/ringbuffer: Remove duplicate initialisation of ring control
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 0f1693981ee6..4d00da97905f 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -578,7 +578,6 @@ err: | |||
578 | int intel_init_ring_buffer(struct drm_device *dev, | 578 | int intel_init_ring_buffer(struct drm_device *dev, |
579 | struct intel_ring_buffer *ring) | 579 | struct intel_ring_buffer *ring) |
580 | { | 580 | { |
581 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
582 | struct drm_i915_gem_object *obj_priv; | 581 | struct drm_i915_gem_object *obj_priv; |
583 | struct drm_gem_object *obj; | 582 | struct drm_gem_object *obj; |
584 | int ret; | 583 | int ret; |
@@ -626,16 +625,7 @@ int intel_init_ring_buffer(struct drm_device *dev, | |||
626 | if (ret) | 625 | if (ret) |
627 | goto err_unmap; | 626 | goto err_unmap; |
628 | 627 | ||
629 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 628 | return 0; |
630 | i915_kernel_lost_context(dev); | ||
631 | else { | ||
632 | ring->head = I915_READ_HEAD(ring) & HEAD_ADDR; | ||
633 | ring->tail = I915_READ_TAIL(ring) & TAIL_ADDR; | ||
634 | ring->space = ring->head - (ring->tail + 8); | ||
635 | if (ring->space < 0) | ||
636 | ring->space += ring->size; | ||
637 | } | ||
638 | return ret; | ||
639 | 629 | ||
640 | err_unmap: | 630 | err_unmap: |
641 | drm_core_ioremapfree(&ring->map, dev); | 631 | drm_core_ioremapfree(&ring->map, dev); |