[PATCH i-g-t 1/2] intel-gfx-fw-info: Hide raw dump behind a flag
Lucas De Marchi
lucas.demarchi at intel.com
Tue Aug 13 15:21:40 UTC 2024
Usually the decoded part is the useful one. Hide the raw dump.
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
tools/intel-gfx-fw-info | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/intel-gfx-fw-info b/tools/intel-gfx-fw-info
index 5eb733120..c0d9b00ac 100755
--- a/tools/intel-gfx-fw-info
+++ b/tools/intel-gfx-fw-info
@@ -149,6 +149,9 @@ def parse_args(argv: typing.List[str]) -> argparse.Namespace:
description = "Dump GuC/HuC firmware header"
parser = argparse.ArgumentParser(prog="intel-gfx-fw-info", description=description)
+ parser.add_argument("-x", "--raw", action="store_true",
+ help="Also print raw header content")
+
parser.add_argument("filename", help="GuC/HuC firmware file")
return parser.parse_args(argv)
@@ -173,8 +176,10 @@ def main(argv: typing.List[str]) -> int:
return 1
print(*fw.decode(), sep="\n")
- print("raw dump:", end="")
- cstruct.dumpstruct(fw.fw, color=sys.stdout.isatty())
+
+ if args.raw:
+ print("raw dump:", end="")
+ cstruct.dumpstruct(fw.fw, color=sys.stdout.isatty())
return 0
--
2.43.0
More information about the igt-dev
mailing list