Re: [PATCH 1/4] drm/i915: Move execlists setup out of common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2017-11-28 12:41:27)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Move the execlists specific setup out of intel_engine_setup_common. This
> was supposed to be only for backend agnostic bits. At the same time rename
> it to intel_engine_setup_execlist to follow the setup vs init naming
> convetion we have.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
> +static void
> +intel_engine_setup_execlist(struct intel_engine_cs *engine)
> +{
> +       struct intel_engine_execlists * const execlists = &engine->execlists;
> +
> +       execlists->csb_use_mmio = csb_force_mmio(engine->i915);
> +
> +       execlists->port_mask = 1;
> +       BUILD_BUG_ON_NOT_POWER_OF_2(execlists_num_ports(execlists));
> +       GEM_BUG_ON(execlists_num_ports(execlists) > EXECLIST_MAX_PORTS);
> +
> +       execlists->queue = RB_ROOT;
> +       execlists->first = NULL;
> +}

The only problem here was that we wanted to be sure that some fields
were initialised for the common paths, i.e. so we could iterate over the
queue without worrying first if it was execlists (if it wasn't execlists
the queue would be empty).

Now, I think we could just rely on zero initialisation, but that was the
rationale for it ending up early. Now we could split it between
setup_execlists and init_execlists if we want the pedantry.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux