[Intel-gfx] [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Apr 6 17:48:01 UTC 2017
On 05/04/2017 10:30, Oscar Mateo wrote:
> If we needed to do something different for the init functions, we could
> always look at the instance number to make the distinction.But, in any
> case, the two functions are virtually identical already (please notice
> that BSD2_RING is only used from gen8 onwards).
>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
> drivers/gpu/drm/i915/intel_engine_cs.c | 2 +-
> drivers/gpu/drm/i915/intel_ringbuffer.c | 14 --------------
> drivers/gpu/drm/i915/intel_ringbuffer.h | 1 -
> 3 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index b3d575a..abc0a9c 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -79,7 +79,7 @@
> .mmio_base = GEN8_BSD2_RING_BASE,
> .irq_shift = GEN8_VCS2_IRQ_SHIFT,
> .init_execlists = logical_xcs_ring_init,
> - .init_legacy = intel_init_bsd2_ring_buffer,
> + .init_legacy = intel_init_bsd_ring_buffer,
> },
> [VECS] = {
> .name = "vecs",
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index c98acc2..81eee42 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2175,20 +2175,6 @@ int intel_init_bsd_ring_buffer(struct intel_engine_cs *engine)
> return intel_init_ring_buffer(engine);
> }
>
> -/**
> - * Initialize the second BSD ring (eg. Broadwell GT3, Skylake GT3)
> - */
> -int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine)
> -{
> - struct drm_i915_private *dev_priv = engine->i915;
> -
> - intel_ring_default_vfuncs(dev_priv, engine);
> -
> - engine->emit_flush = gen6_bsd_ring_flush;
> -
> - return intel_init_ring_buffer(engine);
> -}
> -
> int intel_init_blt_ring_buffer(struct intel_engine_cs *engine)
> {
> struct drm_i915_private *dev_priv = engine->i915;
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index 4ab590b..5c1a27f 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -561,7 +561,6 @@ int intel_ring_pin(struct intel_ring *ring,
>
> int intel_init_render_ring_buffer(struct intel_engine_cs *engine);
> int intel_init_bsd_ring_buffer(struct intel_engine_cs *engine);
> -int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine);
> int intel_init_blt_ring_buffer(struct intel_engine_cs *engine);
> int intel_init_vebox_ring_buffer(struct intel_engine_cs *engine);
>
>
Job is not done until there is nothing left to remove! :)
Doesn't depend on anything so could have been first in the series, or
separate, but doesn't matter.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list