[PATCH i-g-t 03/13] tools/intel_vbt_decode: Allow blocks to be named without full decoding

Jani Nikula jani.nikula at intel.com
Thu Apr 11 12:22:21 UTC 2024


On Fri, 22 Mar 2024, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Make it possible to give blocks a name without having to
> implement full decoding.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Good idea!

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


> ---
>  tools/intel_vbt_decode.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index b7cd2b3bfa69..1d1ba46db6e7 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -2672,11 +2672,10 @@ static bool dump_section(struct context *context, int section_id)
>  		}
>  	}
>  
> -	if (dumper && dumper->name)
> -		printf("BDB block %d (%d bytes) - %s:\n", block->id, block->size, dumper->name);
> -	else
> -		printf("BDB block %d (%d bytes) - Unknown, no decoding available:\n",
> -		       block->id, block->size);
> +	printf("BDB block %d (%d bytes) - %s%s:\n",
> +	       block->id, block->size,
> +	       dumper ? dumper->name : "Unknown",
> +	       dumper && !dumper->dump ? ", no decoding available" : "");
>  
>  	if (context->hexdump)
>  		hex_dump_block(block);

-- 
Jani Nikula, Intel


More information about the igt-dev mailing list