[Intel-gfx] [PATCH 03/18] drm/i915: Rename backpointer from intel_ringbuffer to intel_engine_cs

Dave Gordon david.s.gordon at intel.com
Wed Jul 20 14:23:52 UTC 2016


On 20/07/16 14:11, Chris Wilson wrote:
> Having ringbuf->ring point to an engine is confusing, so rename it once
> again to ring->engine.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/intel_ringbuffer.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)

Doesn't do what it says in the commit message (which sounded like a good 
idea). This patch actually just renames the function 
intel_init_ring_buffer() to intel_init_engine(). However /most/ of the 
code in that function is to do with initialising a ringbuffer!

.Dave.

> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index ac51e4885046..3cfbfe40f6e8 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2171,7 +2171,7 @@ static void intel_ring_context_unpin(struct i915_gem_context *ctx,
>   	i915_gem_context_put(ctx);
>   }
>
> -static int intel_init_ring_buffer(struct intel_engine_cs *engine)
> +static int intel_init_engine(struct intel_engine_cs *engine)
>   {
>   	struct drm_i915_private *dev_priv = engine->i915;
>   	struct intel_ringbuffer *ringbuf;
> @@ -2868,7 +2868,7 @@ int intel_init_render_ring_buffer(struct intel_engine_cs *engine)
>   	engine->init_hw = init_render_ring;
>   	engine->cleanup = render_ring_cleanup;
>
> -	ret = intel_init_ring_buffer(engine);
> +	ret = intel_init_engine(engine);
>   	if (ret)
>   		return ret;
>
> @@ -2907,7 +2907,7 @@ int intel_init_bsd_ring_buffer(struct intel_engine_cs *engine)
>   			engine->irq_enable_mask = I915_BSD_USER_INTERRUPT;
>   	}
>
> -	return intel_init_ring_buffer(engine);
> +	return intel_init_engine(engine);
>   }
>
>   /**
> @@ -2921,7 +2921,7 @@ int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine)
>
>   	engine->flush = gen6_bsd_ring_flush;
>
> -	return intel_init_ring_buffer(engine);
> +	return intel_init_engine(engine);
>   }
>
>   int intel_init_blt_ring_buffer(struct intel_engine_cs *engine)
> @@ -2934,7 +2934,7 @@ int intel_init_blt_ring_buffer(struct intel_engine_cs *engine)
>   	if (INTEL_GEN(dev_priv) < 8)
>   		engine->irq_enable_mask = GT_BLT_USER_INTERRUPT;
>
> -	return intel_init_ring_buffer(engine);
> +	return intel_init_engine(engine);
>   }
>
>   int intel_init_vebox_ring_buffer(struct intel_engine_cs *engine)
> @@ -2951,7 +2951,7 @@ int intel_init_vebox_ring_buffer(struct intel_engine_cs *engine)
>   		engine->irq_disable = hsw_vebox_irq_disable;
>   	}
>
> -	return intel_init_ring_buffer(engine);
> +	return intel_init_engine(engine);
>   }
>
>   int
>



More information about the Intel-gfx mailing list