[PATCH i-g-t 15/27] tools/intel_vbt_decode: Decode block 21 (EFP List)
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Jun 7 13:57:46 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Decode VBT block 21 (EFP List). No specs, but real world data
suggets this just has a bunhc of partial PnP IDs in it.
Example output from ALV:
BDB block 21 (42 bytes, min 2 bytes) - EFP list:
0000: 15 2a 00 0a 04 5a 63 04 54 5a 63 17 75 24 4d 03
0010: 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00
Entry size: 4
Num entries: 10
EFP #1:
Mfg name: VSC (0x635a)
Product code: 21508
EFP #2:
Mfg name: VSC (0x635a)
Product code: 29975
EFP #3:
Mfg name: IBM (0x4d24)
Product code: 6659
EFP #4:
Mfg name: @@@ (0x0)
Product code: 0
...
EFP #10:
Mfg name: @@@ (0x0)
Product code: 0
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tools/intel_vbt_decode.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 49a5da547e7a..1bbbcf499f6e 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -348,6 +348,8 @@ static size_t block_min_size(const struct context *context, int section_id)
return sizeof(struct bdb_display_remove_old);
case BDB_OEM_CUSTOM:
return sizeof(struct bdb_oem_custom);
+ case BDB_EFP_LIST:
+ return sizeof(struct bdb_efp_list);
case BDB_SDVO_LVDS_OPTIONS:
return sizeof(struct bdb_sdvo_lvds_options);
case BDB_SDVO_LVDS_DTD:
@@ -2262,6 +2264,32 @@ static void dump_oem_custom(struct context *context,
}
}
+static void dump_efp_list(struct context *context,
+ const struct bdb_block *block)
+{
+ const struct bdb_efp_list *list = block_data(block);
+
+ printf("\tEntry size: %d\n", list->entry_size);
+ printf("\tNum entries: %d\n", list->num_entries);
+
+ if (sizeof(list->efp[0]) != list->entry_size) {
+ printf("\tEFP struct sizes don't match (expected %zu, got %u), skipping\n",
+ sizeof(list->efp[0]), list->entry_size);
+ return;
+ }
+
+ for (int i = 0; i < list->num_entries; i++) {
+ char mfg[4];
+
+ printf("\tEFP #%d:\n", i + 1);
+ printf("\t\tMfg name: %s (0x%x)\n",
+ decode_pnp_id(list->efp[i].mfg_name, mfg),
+ list->efp[i].mfg_name);
+ printf("\t\tProduct code: %u\n",
+ list->efp[i].product_code);
+ }
+}
+
static void dump_edp(struct context *context,
const struct bdb_block *block)
{
@@ -3385,6 +3413,11 @@ struct dumper dumpers[] = {
.name = "OEM customizable modes",
.dump = dump_oem_custom,
},
+ {
+ .id = BDB_EFP_LIST,
+ .name = "EFP list",
+ .dump = dump_efp_list,
+ },
{
.id = BDB_SDVO_LVDS_OPTIONS,
.name = "SDVO LVDS options block",
--
2.44.2
More information about the igt-dev
mailing list