[PATCH i-g-t v2 1/6] tools/intel-gfx-fw-info: Re-format with black

Lucas De Marchi lucas.demarchi at intel.com
Wed Aug 21 12:35:11 UTC 2024


On Wed, Aug 21, 2024 at 01:29:45PM GMT, Kamil Konieczny wrote:
>Hi Lucas,
>On 2024-08-20 at 16:29:23 -0700, Lucas De Marchi wrote:
>> black tools/intel-gfx-fw-info
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>
>This looks almost ok, now
>
>pylint -d C0114,C0103,C0116,C0115 intel-gfx-fw-info
>
>intel-gfx-fw-info:293:4: W0621: Redefining name 'e' from outer scope (line 136) (redefined-outer-name)
>
>Your code has been rated at 9.92/10 (previous run: 7.64/10, +2.28)
>
>Btw running
>./intel-gfx-fw-info -c /lib/firmware/i915/ehl_huc_9.0.0.bin.zst

							     ^^^

>
>I got:
>
>header-type: CSS
>version: 137.147.184
>date: 543-01-b9
>checksum: 3aa76ca9f25d916e64a56267338d37993b8e4e7321856de83d98d14e15ace4ad
>
>Is date an encoded date and time?

it's compressed and this simple script doesn't handle compression (yet)

	$ cp /lib/firmware/i915/ehl_huc_9.0.0.bin.zst .
	$ zstd -d ehl_huc_9.0.0.bin.zst
	$ ./tools/intel-gfx-fw-info ehl_huc_9.0.0.bin
	header-type: CSS
	version: 9.0.0
	date: 2019-08-05

The compression happened not to change the first 4 bytes so it
incorrectly recognized it and applied the CCS parser.  Adding
decompression may be something for another time.

>
>You can add my acked-by with or without a fix for W0621 warning.

For this patch or for the series?

thanks
Lucas De Marchi

>
>Regards,
>Kamil
>
>> ---
>>  tools/intel-gfx-fw-info | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/tools/intel-gfx-fw-info b/tools/intel-gfx-fw-info
>> index b0d41bbae..35555aab5 100755
>> --- a/tools/intel-gfx-fw-info
>> +++ b/tools/intel-gfx-fw-info
>> @@ -150,10 +150,12 @@ def parse_args(argv: typing.List[str]) -> argparse.Namespace:
>>      description = "Dump GuC/HuC firmware information"
>>      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("-c", "--checksum", action="store_true",
>> -                        help="Also print checksum")
>> +    parser.add_argument(
>> +        "-x", "--raw", action="store_true", help="Also print raw header content"
>> +    )
>> +    parser.add_argument(
>> +        "-c", "--checksum", action="store_true", help="Also print checksum"
>> +    )
>>
>>      parser.add_argument("filename", help="GuC/HuC firmware file")
>>
>> --
>> 2.43.0
>>


More information about the igt-dev mailing list