diff options
author | Jani Nikula <jani.nikula@intel.com> | 2017-09-21 16:44:55 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2017-10-20 16:15:19 +0300 |
commit | 7e4cd23d4767be71316c4113c209b5ea049fc6ba (patch) | |
tree | bfa557aed2da1b13b5ee373b37614f63b7e61ee2 /tools | |
parent | ee7a0fe41c0425fddd5d7a613152907827cc92d7 (diff) |
tools/intel_vbt_decode: abstract DSI bridge type dump
Cleaner than having it inline.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/intel_vbt_decode.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c index 0f7e2daf..69cf1e4c 100644 --- a/tools/intel_vbt_decode.c +++ b/tools/intel_vbt_decode.c @@ -384,6 +384,20 @@ static const char *dvo_port(uint8_t type) return "unknown"; } +static const char *mipi_bridge_type(uint8_t type) +{ + switch (type) { + case 1: + return "ASUS"; + case 2: + return "Toshiba"; + case 3: + return "Renesas"; + default: + return "unknown"; + } +} + static void dump_child_device(struct context *context, const struct child_device_config *child) { @@ -440,21 +454,8 @@ static void dump_child_device(struct context *context, printf("\t\tSDVO stall signal available: %s\n", YESNO(efp->sdvo_stall)); printf("\t\tPipe capabilities: 0x%02x\n", efp->pipe_cap); printf("\t\tDVO wiring: 0x%02x\n", efp->dvo_wiring); - printf("\t\tMIPI bridge type:"); - switch (efp->mipi_bridge_type) { - case 1: - printf("ASUS\n"); - break; - case 2: - printf("Toshiba\n"); - break; - case 3: - printf("Renesas\n"); - break; - default: - printf("(unknown value %d)\n", efp->mipi_bridge_type); - break; - } + printf("\t\tMIPI bridge type: %02x (%s)\n", efp->mipi_bridge_type, + mipi_bridge_type(efp->mipi_bridge_type)); printf("\t\tDevice class extendsion: 0x%02x\n", efp->extended_type); printf("\t\tDVO function: 0x%02x\n", efp->dvo_function); } |