[Intel-gfx] [PATCH igt] tools/intel_reg: Add reading and writing registers through engine
Chris Wilson
chris at chris-wilson.co.uk
Mon Jan 8 14:24:16 UTC 2018
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.nikula at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> CC: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at 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 <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list