Commit ecfe00d8 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: s/init()/init_hw()/ in intel_engine_cs

This is (mostly, some exceptions that need fixing) the hw setup
function which starts the ring. And not the function which allocates
all the resources.

Make this clear by giving it a better name.
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Reviewed-by: default avatarDave Gordon <david.s.gordon@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ebd0fd4b
...@@ -1391,8 +1391,8 @@ static int logical_ring_init(struct drm_device *dev, struct intel_engine_cs *rin ...@@ -1391,8 +1391,8 @@ static int logical_ring_init(struct drm_device *dev, struct intel_engine_cs *rin
if (ret) if (ret)
return ret; return ret;
if (ring->init) { if (ring->init_hw) {
ret = ring->init(ring); ret = ring->init_hw(ring);
if (ret) if (ret)
return ret; return ret;
} }
...@@ -1417,7 +1417,7 @@ static int logical_render_ring_init(struct drm_device *dev) ...@@ -1417,7 +1417,7 @@ static int logical_render_ring_init(struct drm_device *dev)
if (HAS_L3_DPF(dev)) if (HAS_L3_DPF(dev))
ring->irq_keep_mask |= GT_RENDER_L3_PARITY_ERROR_INTERRUPT; ring->irq_keep_mask |= GT_RENDER_L3_PARITY_ERROR_INTERRUPT;
ring->init = gen8_init_render_ring; ring->init_hw = gen8_init_render_ring;
ring->init_context = intel_logical_ring_workarounds_emit; ring->init_context = intel_logical_ring_workarounds_emit;
ring->cleanup = intel_fini_pipe_control; ring->cleanup = intel_fini_pipe_control;
ring->get_seqno = gen8_get_seqno; ring->get_seqno = gen8_get_seqno;
...@@ -1444,7 +1444,7 @@ static int logical_bsd_ring_init(struct drm_device *dev) ...@@ -1444,7 +1444,7 @@ static int logical_bsd_ring_init(struct drm_device *dev)
ring->irq_keep_mask = ring->irq_keep_mask =
GT_CONTEXT_SWITCH_INTERRUPT << GEN8_VCS1_IRQ_SHIFT; GT_CONTEXT_SWITCH_INTERRUPT << GEN8_VCS1_IRQ_SHIFT;
ring->init = gen8_init_common_ring; ring->init_hw = gen8_init_common_ring;
ring->get_seqno = gen8_get_seqno; ring->get_seqno = gen8_get_seqno;
ring->set_seqno = gen8_set_seqno; ring->set_seqno = gen8_set_seqno;
ring->emit_request = gen8_emit_request; ring->emit_request = gen8_emit_request;
...@@ -1469,7 +1469,7 @@ static int logical_bsd2_ring_init(struct drm_device *dev) ...@@ -1469,7 +1469,7 @@ static int logical_bsd2_ring_init(struct drm_device *dev)
ring->irq_keep_mask = ring->irq_keep_mask =
GT_CONTEXT_SWITCH_INTERRUPT << GEN8_VCS2_IRQ_SHIFT; GT_CONTEXT_SWITCH_INTERRUPT << GEN8_VCS2_IRQ_SHIFT;
ring->init = gen8_init_common_ring; ring->init_hw = gen8_init_common_ring;
ring->get_seqno = gen8_get_seqno; ring->get_seqno = gen8_get_seqno;
ring->set_seqno = gen8_set_seqno; ring->set_seqno = gen8_set_seqno;
ring->emit_request = gen8_emit_request; ring->emit_request = gen8_emit_request;
...@@ -1494,7 +1494,7 @@ static int logical_blt_ring_init(struct drm_device *dev) ...@@ -1494,7 +1494,7 @@ static int logical_blt_ring_init(struct drm_device *dev)
ring->irq_keep_mask = ring->irq_keep_mask =
GT_CONTEXT_SWITCH_INTERRUPT << GEN8_BCS_IRQ_SHIFT; GT_CONTEXT_SWITCH_INTERRUPT << GEN8_BCS_IRQ_SHIFT;
ring->init = gen8_init_common_ring; ring->init_hw = gen8_init_common_ring;
ring->get_seqno = gen8_get_seqno; ring->get_seqno = gen8_get_seqno;
ring->set_seqno = gen8_set_seqno; ring->set_seqno = gen8_set_seqno;
ring->emit_request = gen8_emit_request; ring->emit_request = gen8_emit_request;
...@@ -1519,7 +1519,7 @@ static int logical_vebox_ring_init(struct drm_device *dev) ...@@ -1519,7 +1519,7 @@ static int logical_vebox_ring_init(struct drm_device *dev)
ring->irq_keep_mask = ring->irq_keep_mask =
GT_CONTEXT_SWITCH_INTERRUPT << GEN8_VECS_IRQ_SHIFT; GT_CONTEXT_SWITCH_INTERRUPT << GEN8_VECS_IRQ_SHIFT;
ring->init = gen8_init_common_ring; ring->init_hw = gen8_init_common_ring;
ring->get_seqno = gen8_get_seqno; ring->get_seqno = gen8_get_seqno;
ring->set_seqno = gen8_set_seqno; ring->set_seqno = gen8_set_seqno;
ring->emit_request = gen8_emit_request; ring->emit_request = gen8_emit_request;
......
...@@ -1865,7 +1865,7 @@ static int intel_init_ring_buffer(struct drm_device *dev, ...@@ -1865,7 +1865,7 @@ static int intel_init_ring_buffer(struct drm_device *dev,
if (ret) if (ret)
goto error; goto error;
ret = ring->init(ring); ret = ring->init_hw(ring);
if (ret) if (ret)
goto error; goto error;
...@@ -2437,7 +2437,7 @@ int intel_init_render_ring_buffer(struct drm_device *dev) ...@@ -2437,7 +2437,7 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
ring->dispatch_execbuffer = i830_dispatch_execbuffer; ring->dispatch_execbuffer = i830_dispatch_execbuffer;
else else
ring->dispatch_execbuffer = i915_dispatch_execbuffer; ring->dispatch_execbuffer = i915_dispatch_execbuffer;
ring->init = init_render_ring; ring->init_hw = init_render_ring;
ring->cleanup = render_ring_cleanup; ring->cleanup = render_ring_cleanup;
/* Workaround batchbuffer to combat CS tlb bug. */ /* Workaround batchbuffer to combat CS tlb bug. */
...@@ -2530,7 +2530,7 @@ int intel_init_bsd_ring_buffer(struct drm_device *dev) ...@@ -2530,7 +2530,7 @@ int intel_init_bsd_ring_buffer(struct drm_device *dev)
} }
ring->dispatch_execbuffer = i965_dispatch_execbuffer; ring->dispatch_execbuffer = i965_dispatch_execbuffer;
} }
ring->init = init_ring_common; ring->init_hw = init_ring_common;
return intel_init_ring_buffer(dev, ring); return intel_init_ring_buffer(dev, ring);
} }
...@@ -2569,7 +2569,7 @@ int intel_init_bsd2_ring_buffer(struct drm_device *dev) ...@@ -2569,7 +2569,7 @@ int intel_init_bsd2_ring_buffer(struct drm_device *dev)
ring->semaphore.signal = gen8_xcs_signal; ring->semaphore.signal = gen8_xcs_signal;
GEN8_RING_SEMAPHORE_INIT; GEN8_RING_SEMAPHORE_INIT;
} }
ring->init = init_ring_common; ring->init_hw = init_ring_common;
return intel_init_ring_buffer(dev, ring); return intel_init_ring_buffer(dev, ring);
} }
...@@ -2626,7 +2626,7 @@ int intel_init_blt_ring_buffer(struct drm_device *dev) ...@@ -2626,7 +2626,7 @@ int intel_init_blt_ring_buffer(struct drm_device *dev)
ring->semaphore.mbox.signal[VCS2] = GEN6_NOSYNC; ring->semaphore.mbox.signal[VCS2] = GEN6_NOSYNC;
} }
} }
ring->init = init_ring_common; ring->init_hw = init_ring_common;
return intel_init_ring_buffer(dev, ring); return intel_init_ring_buffer(dev, ring);
} }
...@@ -2677,7 +2677,7 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev) ...@@ -2677,7 +2677,7 @@ int intel_init_vebox_ring_buffer(struct drm_device *dev)
ring->semaphore.mbox.signal[VCS2] = GEN6_NOSYNC; ring->semaphore.mbox.signal[VCS2] = GEN6_NOSYNC;
} }
} }
ring->init = init_ring_common; ring->init_hw = init_ring_common;
return intel_init_ring_buffer(dev, ring); return intel_init_ring_buffer(dev, ring);
} }
......
...@@ -146,7 +146,7 @@ struct intel_engine_cs { ...@@ -146,7 +146,7 @@ struct intel_engine_cs {
bool __must_check (*irq_get)(struct intel_engine_cs *ring); bool __must_check (*irq_get)(struct intel_engine_cs *ring);
void (*irq_put)(struct intel_engine_cs *ring); void (*irq_put)(struct intel_engine_cs *ring);
int (*init)(struct intel_engine_cs *ring); int (*init_hw)(struct intel_engine_cs *ring);
int (*init_context)(struct intel_engine_cs *ring, int (*init_context)(struct intel_engine_cs *ring,
struct intel_context *ctx); struct intel_context *ctx);
......
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