[PATCH i-g-t 16/27] tools/intel_vbt_decode: Decode block 24 (SDVO LVDS PnP ID)

Ville Syrjala ville.syrjala at linux.intel.com
Fri Jun 7 13:57:47 UTC 2024


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Decode VBT block 24 (SDVO LVDS PnP ID). Just a set of four
PnP IDs (one for each SDVO panel type).

Example output from CST:
BDB block 24 (40 bytes, min 40 bytes) - SDVO LVDS PnP ID:
        0000: 18 28 00 36 7f 03 00 01  00 00 00 00 0c 36 7f 05
        0010: 00 02 00 00 00 00 0c 36  7f 01 90 03 00 00 00 00
        0020: 0c 36 7f 06 00 04 00 00  00 00 0c

        SDVO Panel 0
                  Mfg name: MS_ (0x7f36)
                  Product code: 3
                  Serial: 1
                  Mfg week: 0
                  Mfg year: 2002
        ...
        SDVO Panel 3 (*)
                  Mfg name: MS_ (0x7f36)
                  Product code: 6
                  Serial: 4
                  Mfg week: 0
                  Mfg year: 2002

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tools/intel_vbt_decode.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 1bbbcf499f6e..54b25f6d2418 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -354,6 +354,8 @@ static size_t block_min_size(const struct context *context, int section_id)
 		return sizeof(struct bdb_sdvo_lvds_options);
 	case BDB_SDVO_LVDS_DTD:
 		return sizeof(struct bdb_sdvo_lvds_dtd);
+	case BDB_SDVO_LVDS_PNP_ID:
+		return sizeof(struct bdb_sdvo_lvds_pnp_id);
 	case BDB_EDP:
 		return sizeof(struct bdb_edp);
 	case BDB_DISPLAY_SELECT_IVB:
@@ -2587,6 +2589,17 @@ static void dump_sdvo_lvds_dtd(struct context *context,
 	}
 }
 
+static void dump_sdvo_lvds_pnp_id(struct context *context,
+				  const struct bdb_block *block)
+{
+	const struct bdb_sdvo_lvds_pnp_id *t = block_data(block);
+
+	for (int n = 0; n < ARRAY_SIZE(t->pnp_id); n++) {
+		printf("\tSDVO Panel %d%s\n", n, sdvo_panel_str(context, n));
+		dump_pnp_id(&t->pnp_id[n]);
+	}
+}
+
 static void dump_sdvo_lvds_options(struct context *context,
 				   const struct bdb_block *block)
 {
@@ -3428,6 +3441,11 @@ struct dumper dumpers[] = {
 		.name = "SDVO LVDS DTD",
 		.dump = dump_sdvo_lvds_dtd,
 	},
+	{
+		.id = BDB_SDVO_LVDS_PNP_ID,
+		.name = "SDVO LVDS PnP ID",
+		.dump = dump_sdvo_lvds_pnp_id
+	},
 	{
 		.id = BDB_EDP,
 		.name = "eDP block",
-- 
2.44.2



More information about the igt-dev mailing list