diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2023-09-30 14:13:25 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2024-04-18 14:03:39 +0300 |
commit | ed408e18c7644ddfc43842cb8f82e2f80ce3b66a (patch) | |
tree | a4e36c3c4945f0afb1b0fa570eea77f656dd7438 | |
parent | bd4089dc75b3eab5b9decebe6ea1864eb18263b0 (diff) |
tools/intel_vbt_decode: Extract default_algorithm()
Extract default_algorithm() for later use in decoding
other blocks.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r-- | tools/intel_vbt_decode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c index 2b0847a79..247154709 100644 --- a/tools/intel_vbt_decode.c +++ b/tools/intel_vbt_decode.c @@ -1487,6 +1487,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) { @@ -1507,7 +1512,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); |