[igt-dev] [PATCH i-g-t 12/14] tools/intel_vbt_decode: Decode AUX CH
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Jul 15 20:25:18 UTC 2022
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Decode the AUX CH to a human readable name.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tools/intel_vbt_decode.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 90ae7c667f16..10db394b3748 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -777,6 +777,29 @@ static const char *dvo_port(uint8_t type)
return "unknown";
}
+static const char *aux_ch_names[] = {
+ [0] = "none",
+ [DP_AUX_A >> 4] = "AUX-A",
+ [DP_AUX_B >> 4] = "AUX-B",
+ [DP_AUX_C >> 4] = "AUX-C",
+ [DP_AUX_D >> 4] = "AUX-D",
+ [DP_AUX_E >> 4] = "AUX-E",
+ [DP_AUX_F >> 4] = "AUX-F",
+ [DP_AUX_G >> 4] = "AUX-G",
+ [DP_AUX_H >> 4] = "AUX-H",
+ [DP_AUX_I >> 4] = "AUX-I",
+};
+
+static const char *aux_ch(uint8_t aux_ch)
+{
+ aux_ch >>= 4;
+
+ if (aux_ch < ARRAY_SIZE(aux_ch_names) && aux_ch_names[aux_ch])
+ return aux_ch_names[aux_ch];
+ else
+ return "unknown";
+}
+
static const char *mipi_bridge_type(uint8_t type)
{
switch (type) {
@@ -973,7 +996,8 @@ static void dump_child_device(struct context *context,
printf("\t\tHDMI compatible? %s\n", YESNO(child->hdmi_support));
printf("\t\tDP compatible? %s\n", YESNO(child->dp_support));
printf("\t\tTMDS compatible? %s\n", YESNO(child->tmds_support));
- printf("\t\tAux channel: 0x%02x\n", child->aux_channel);
+ printf("\t\tAux channel: %s (0x%02x)\n",
+ aux_ch(child->aux_channel), child->aux_channel);
printf("\t\tDongle detect: 0x%02x\n", child->dongle_detect);
}
--
2.35.1
More information about the igt-dev
mailing list