Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH i-g-t 1/2] intel_reg: Reorder commands and annotate ones needing reg spec
Date: Mon, 29 Apr 2024 12:06:40 +0300	[thread overview]
Message-ID: <87mspc4jxb.fsf@intel.com> (raw)
In-Reply-To: <20240426153352.3209972-1-lucas.demarchi@intel.com>

On Fri, 26 Apr 2024, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> Group together the commands that operate with a reg spec and annotate
> those that will implicitly enable a future --decode option.

The series LGTM,

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Please follow-up with an update to man/intel_reg.rst.

Thanks,
Jani.

>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  tools/intel_reg.c | 24 ++++++++++++++----------
>  1 file changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/tools/intel_reg.c b/tools/intel_reg.c
> index aae5a2395..8f585e4bd 100644
> --- a/tools/intel_reg.c
> +++ b/tools/intel_reg.c
> @@ -967,10 +967,16 @@ struct command {
>  	const char *name;
>  	const char *description;
>  	const char *synopsis;
> +	bool decode;
>  	int (*function)(struct config *config, int argc, char *argv[]);
>  };
>  
>  static const struct command commands[] = {
> +	{
> +		.name = "help",
> +		.function = intel_reg_help,
> +		.description = "show this help",
> +	},
>  	{
>  		.name = "read",
>  		.function = intel_reg_read,
> @@ -983,31 +989,29 @@ static const struct command commands[] = {
>  		.synopsis = "[--post] REGISTER VALUE [REGISTER VALUE ...]",
>  		.description = "write value(s) to specified register(s)",
>  	},
> +	{
> +		.name = "snapshot",
> +		.function = intel_reg_snapshot,
> +		.description = "create a snapshot of the MMIO bar to stdout",
> +	},
>  	{
>  		.name = "dump",
>  		.function = intel_reg_dump,
>  		.description = "dump all known registers",
> +		.decode = true,
>  	},
>  	{
>  		.name = "decode",
>  		.function = intel_reg_decode,
>  		.synopsis = "REGISTER VALUE [REGISTER VALUE ...]",
>  		.description = "decode value(s) for specified register(s)",
> -	},
> -	{
> -		.name = "snapshot",
> -		.function = intel_reg_snapshot,
> -		.description = "create a snapshot of the MMIO bar to stdout",
> +		.decode = true,
>  	},
>  	{
>  		.name = "list",
>  		.function = intel_reg_list,
>  		.description = "list all known register names",
> -	},
> -	{
> -		.name = "help",
> -		.function = intel_reg_help,
> -		.description = "show this help",
> +		.decode = true,
>  	},
>  };

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2024-04-29  9:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 15:33 [PATCH i-g-t 1/2] intel_reg: Reorder commands and annotate ones needing reg spec Lucas De Marchi
2024-04-26 15:33 ` [PATCH i-g-t 2/2] intel_reg: Move decoding behind an option Lucas De Marchi
2024-04-26 17:40 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] intel_reg: Reorder commands and annotate ones needing reg spec Patchwork
2024-04-26 17:57 ` ✓ CI.xeBAT: " Patchwork
2024-04-26 22:47 ` ✗ CI.xeFULL: failure " Patchwork
2024-04-26 23:23 ` ✗ Fi.CI.IGT: " Patchwork
2024-04-29  9:06 ` Jani Nikula [this message]
2024-04-29 13:31   ` [PATCH i-g-t 1/2] " Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mspc4jxb.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox