[PATCH i-g-t 24/27] tools/intel_vbt_decode: Decode block 57 (Vswing PreEmphasis Table)
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Jun 7 13:57:55 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Decode VBT block 57 (Vswing PreEmphasis Table). The colums of
the tables correspond to specific registers (mapping is platform
specific), the rows correspond to vswing/preemphasis combos, and
the individual table is supposed to selected using platform specific
logic baed on PHY type, link rate, low vswing, etc.
Example outout from TGL:
BDB block 57 (2642 bytes, min 2 bytes) - Vswing Preemph:
0000: 39 52 0a 06 0b 0a 00 00 00 4c 00 00 00 3f 00 00
0010: 00 00 00 00 00 00 00 00 00 98 00 00 00 06 00 00
0020: 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0030: 00 0a 00 00 00 4c 00 00 00 3f 00 00 00 00 00 00
...
0a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0a30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0a40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0a50: 00 00 00 00 00
Number of vswing tables: 6
Number of columns: 11
Vswing Table #1:
V0-P0: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V0-P1: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V0-P2: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V0-P3: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V1-P0: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V1-P1: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V1-P2: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V2-P0: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V2-P1: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
V3-P0: 0x0000000a 0x0000004c 0x0000003f 0x00000000 0x00000000 0x00000098 0x00000006 0x00000001 0x00000000 0x00000000 0x00000000
...
Vswing Table #6:
V0-P0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V0-P1: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V0-P2: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V0-P3: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V1-P0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V1-P1: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V1-P2: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V2-P0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V2-P1: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
V3-P0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tools/intel_vbt_decode.c | 41 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 85f31f449130..58bdba0e96d2 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -418,6 +418,8 @@ static size_t block_min_size(const struct context *context, int section_id)
return sizeof(struct bdb_rgb_palette);
case BDB_COMPRESSION_PARAMETERS:
return sizeof(struct bdb_compression_parameters);
+ case BDB_VSWING_PREEMPH:
+ return sizeof(struct bdb_vswing_preemph);
case BDB_GENERIC_DTD:
/* FIXME check spec */
return sizeof(struct bdb_generic_dtd);
@@ -3413,6 +3415,40 @@ static void dump_compression_parameters(struct context *context,
}
}
+static const char * const vswing_preemph[10] = {
+ "V0-P0",
+ "V0-P1",
+ "V0-P2",
+ "V0-P3",
+ "V1-P0",
+ "V1-P1",
+ "V1-P2",
+ "V2-P0",
+ "V2-P1",
+ "V3-P0",
+};
+
+static void dump_vswing_preemphasis(struct context *context,
+ const struct bdb_block *block)
+{
+ const struct bdb_vswing_preemph *vs = block_data(block);
+
+ printf("\tNumber of vswing tables: %d\n", vs->num_tables);
+ printf("\tNumber of columns: %d\n", vs->num_columns);
+
+ for (int n = 0; n < vs->num_tables; n++) {
+ printf("\tVswing Table #%d:\n", n+1);
+
+ for (int i = 0; i < 10; i++) {
+ printf("\t\t%s: ", vswing_preemph[i]);
+
+ for (int j = 0; j < vs->num_columns; j++)
+ printf(" 0x%08x", vs->tables[n * 10 * vs->num_columns + j]);
+ printf("\n");
+ }
+ }
+}
+
static int get_panel_type_pnpid(const struct context *context,
const char *edid_file)
{
@@ -3761,6 +3797,11 @@ struct dumper dumpers[] = {
.name = "Compression parameters block",
.dump = dump_compression_parameters,
},
+ {
+ .id = BDB_VSWING_PREEMPH,
+ .name = "Vswing Preemph",
+ .dump = dump_vswing_preemphasis,
+ },
};
static void hex_dump_block(const struct bdb_block *block)
--
2.44.2
More information about the igt-dev
mailing list