[PATCH i-g-t 02/13] tools/intel_vbt_decode: Extract default_algorithm()

Jani Nikula jani.nikula at intel.com
Thu Apr 11 12:20:58 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>
>
> Extract default_algorithm() for later use in decoding
> other blocks.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

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

> ---
>  tools/intel_vbt_decode.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index fd8118772845..b7cd2b3bfa69 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -1460,6 +1460,11 @@ static const char * const lvds_config[] = {
>  	[BDB_DRIVER_EDP] = "Embedded DisplayPort",
>  };
>  
> +static const char *default_algorithm(bool algorithm)
> +{
> +	return algorithm ? "driver default" : "OS default";
> +}
> +
>  static void dump_driver_feature(struct context *context,
>  				const struct bdb_block *block)
>  {
> @@ -1480,7 +1485,7 @@ static void dump_driver_feature(struct context *context,
>  	printf("\tAllow display switching when DVD active: %s\n",
>  	       YESNO(feature->allow_display_switch_dvd));
>  	printf("\tBoot Device Algorithm: %s\n",
> -	       feature->boot_dev_algorithm ? "driver default" : "os default");
> +	       default_algorithm(feature->boot_dev_algorithm));
>  
>  	printf("\tBoot Mode X: %u\n", feature->boot_mode_x);
>  	printf("\tBoot Mode Y: %u\n", feature->boot_mode_y);

-- 
Jani Nikula, Intel


More information about the igt-dev mailing list