Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/2] intel_reg: Reorder commands and annotate ones needing reg spec
@ 2024-04-26 15:33 Lucas De Marchi
  2024-04-26 15:33 ` [PATCH i-g-t 2/2] intel_reg: Move decoding behind an option Lucas De Marchi
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Lucas De Marchi @ 2024-04-26 15:33 UTC (permalink / raw)
  To: igt-dev; +Cc: Jani Nikula, Lucas De Marchi

Group together the commands that operate with a reg spec and annotate
those that will implicitly enable a future --decode option.

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,
 	},
 };
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-29 13:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH i-g-t 1/2] " Jani Nikula
2024-04-29 13:31   ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox