Re: [PATCH igt] tools/intel_reg: Add reading and writing registers through engine

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

 



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@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> CC: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> ---
> +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@xxxxxxxxxxxxxxxxxx>
-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