[Intel-gfx] [PATCH 07/13] drm/i915: Consolidate dispatch_execbuffer vfunc

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 28 11:59:43 UTC 2016


On Mon, Jun 27, 2016 at 03:04:14PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 25 ++++++-------------------
>  1 file changed, 6 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 40a979f1f556..54536f55e90d 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -2881,11 +2881,15 @@ static void intel_ring_default_vfuncs(struct drm_i915_private *dev_priv,
>  	engine->get_seqno = ring_get_seqno;
>  	engine->set_seqno = ring_set_seqno;
>  
> -	if (INTEL_GEN(dev_priv) >= 6) {
> +	if (INTEL_GEN(dev_priv) >= 8) {
> +		engine->dispatch_execbuffer = gen8_ring_dispatch_execbuffer;
> +	} else if (INTEL_GEN(dev_priv) >= 6) {
>  		engine->add_request = gen6_add_request;
>  		engine->irq_seqno_barrier = gen6_seqno_barrier;
> +		engine->dispatch_execbuffer = gen6_ring_dispatch_execbuffer;

Dispatch comes before add_request! A little bit of ocd to try and have
the order in the code match the order in which they are used.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list