drm/i915/ringbuffer: Remove duplicate initialisation of ring control
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
1d8f38f4e7
commit
c584fe47e4
@ -578,7 +578,6 @@ err:
|
|||||||
int intel_init_ring_buffer(struct drm_device *dev,
|
int intel_init_ring_buffer(struct drm_device *dev,
|
||||||
struct intel_ring_buffer *ring)
|
struct intel_ring_buffer *ring)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
|
||||||
struct drm_i915_gem_object *obj_priv;
|
struct drm_i915_gem_object *obj_priv;
|
||||||
struct drm_gem_object *obj;
|
struct drm_gem_object *obj;
|
||||||
int ret;
|
int ret;
|
||||||
@ -626,16 +625,7 @@ int intel_init_ring_buffer(struct drm_device *dev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_unmap;
|
goto err_unmap;
|
||||||
|
|
||||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
return 0;
|
||||||
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;
|
|
||||||
|
|
||||||
err_unmap:
|
err_unmap:
|
||||||
drm_core_ioremapfree(&ring->map, dev);
|
drm_core_ioremapfree(&ring->map, dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user