Quoting Mika Kuoppala (2018-01-08 14:12:02)
> Add option to specify engine for register read/write operation.
> If engine is specified, use MI_LOAD_REGISTER_IMM and MI_STORE_REGISTER_IMM
> to write and read register using a batch targeted at that engine.
> 
> v2: no MI_NOOP after BBE (Chris)
> v3: use modern engine names (Chris), use global fd
> 
> Cc: Jani Nikula <jani.nik...@intel.com>
> Cc: Chris Wilson <ch...@chris-wilson.co.uk>
> CC: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuopp...@linux.intel.com>
> ---
> +static const struct intel_execution_engine2 *find_engine(const char *name,
> +                                                        bool *secure)
> +{
> +       const struct intel_execution_engine2 *e;
> +
> +       if (strlen(name) < 2)
> +               goto out;
> +
> +       if (name[0] == '-') {
> +               *secure = false;
> +               name++;
> +       } else {
> +               *secure = true;
> +       }
> +
> +       for (e = intel_execution_engines2; e->name; e++) {
> +               if (!strcmp(e->name, name))

strcasecmp() just for ease of use.

Lgtm, 
Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to