]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915/ringbuffer: Remove duplicate initialisation of ring control
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 29 Oct 2010 17:15:52 +0000 (18:15 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 29 Oct 2010 19:22:06 +0000 (20:22 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_ringbuffer.c

index 0f1693981ee6728450b363cd71431866ac46a3d3..4d00da97905fd68c815cccb9ba3edf90ce6101eb 100644 (file)
@@ -578,7 +578,6 @@ err:
 int intel_init_ring_buffer(struct drm_device *dev,
                           struct intel_ring_buffer *ring)
 {
-       struct drm_i915_private *dev_priv = dev->dev_private;
        struct drm_i915_gem_object *obj_priv;
        struct drm_gem_object *obj;
        int ret;
@@ -626,16 +625,7 @@ int intel_init_ring_buffer(struct drm_device *dev,
        if (ret)
                goto err_unmap;
 
-       if (!drm_core_check_feature(dev, DRIVER_MODESET))
-               i915_kernel_lost_context(dev);
-       else {
-               ring->head = I915_READ_HEAD(ring) & HEAD_ADDR;
-               ring->tail = I915_READ_TAIL(ring) & TAIL_ADDR;
-               ring->space = ring->head - (ring->tail + 8);
-               if (ring->space < 0)
-                       ring->space += ring->size;
-       }
-       return ret;
+       return 0;
 
 err_unmap:
        drm_core_ioremapfree(&ring->map, dev);