Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Grzelak" <michal.grzelak@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jani.nikula@intel.com, suraj.kandpal@intel.com,
	"Michał Grzelak" <michal.grzelak@intel.com>
Subject: [PATCH i-g-t v1 6/7] tools/vbt_decode: parse & dump VS/PE-O tables for Snps
Date: Thu,  7 May 2026 03:28:20 +0200	[thread overview]
Message-ID: <20260507012821.527453-7-michal.grzelak@intel.com> (raw)
In-Reply-To: <20260507012821.527453-1-michal.grzelak@intel.com>

Dump VBT #57 tables for Snps. Add a table of strings to store each table
purpose. Show the affected modes on dumping.

Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
 tools/intel_vbt_decode.c | 47 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 6e5fd73473..cf6101f077 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -3478,6 +3478,15 @@ static const char * const vspeo_lt_tables[6] = {
 	"DP 2.1",
 };
 
+static const char * const vspeo_snps_tables[6] = {
+	"DP 1.4 RBR/HBR",
+	"DP 1.4 HBR2/HBR3",
+	"eDP non-HBR3",
+	"eDP HBR3",
+	"DP 1.4",
+	"DP 2.0",
+};
+
 static void dump_vspeo_lt(const struct bdb_vswing_preemph *vspeo)
 {
 	const unsigned int *tables = vspeo->tables;
@@ -3487,7 +3496,8 @@ static void dump_vspeo_lt(const struct bdb_vswing_preemph *vspeo)
 
 	printf("\tNumber of vswing tables: %d\n", vspeo->num_tables);
 	printf("\tNumber of columns: %d\n", vspeo->num_columns);
-	printf("\tNumber of rows: %d\n", num-rows);
+	printf("\tNumber of rows: %d\n", num_rows);
+
 	printf("\tPhy type: LT\n");
 
 	for (int idx = 0; idx < vspeo->num_tables; idx++) {
@@ -3505,6 +3515,33 @@ static void dump_vspeo_lt(const struct bdb_vswing_preemph *vspeo)
 	}
 }
 
+static void dump_vspeo_snps(const struct bdb_vswing_preemph *vspeo)
+{
+	const unsigned int *tables = vspeo->tables;
+	const unsigned int *vals;
+	int num_rows = 16;
+	size_t offset = 0;
+
+	printf("\tNumber of vswing tables: %d\n", vspeo->num_tables);
+	printf("\tNumber of columns: %d\n", vspeo->num_columns);
+	printf("\tNumber of rows: %d\n", num_rows);
+
+	printf("\tPhy type: Snps\n");
+	for (int idx = 0; idx < vspeo->num_tables; idx++) {
+		printf("\tVswing Table #%d (%s):\n", idx+1, vspeo_snps_tables[idx]);
+		for (int row = 0; row < num_rows; row++) {
+			vals = &tables[offset];
+
+			printf("\t\t%s: ", vspeo_levels[row]);
+			printf("vswing: 0x%08x, ", vals[0]);
+			printf("pre-cursor: 0x%08x, ", vals[1]);
+			printf("post-cursor: 0x%08x\n", vals[2]);
+
+			offset += vspeo->num_columns;
+		}
+	}
+}
+
 static void dump_vswing_preemphasis(struct context *context,
 				    const struct bdb_block *block)
 {
@@ -3513,6 +3550,14 @@ static void dump_vswing_preemphasis(struct context *context,
 
 	if (strstr(sgt, "NOVALAKE")) {
 		dump_vspeo_lt(vspeo);
+	} else if (strstr(sgt, "PANTHERLAKE")) {
+		dump_vspeo_snps(vspeo);
+	} else if (strstr(sgt, "BATTLEMAGE")) {
+		dump_vspeo_snps(vspeo);
+	} else if (strstr(sgt, "LUNARLAKE")) {
+		dump_vspeo_snps(vspeo);
+	} else if (strstr(sgt, "METEORLAKE")) {
+		dump_vspeo_snps(vspeo);
 	} else {
 		printf("platform not supported\n");
 	}
-- 
2.45.2


  parent reply	other threads:[~2026-05-07  1:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  1:28 [PATCH i-g-t v1 0/7] Vswing/Preemphasis Override decoding Michał Grzelak
2026-05-07  1:28 ` [PATCH i-g-t v1 1/7] tools/vbt_decode: fix tables' offset reading Michał Grzelak
2026-05-07  1:28 ` [PATCH i-g-t v1 2/7] tools/vbt_decode: vary number of rows wrt VBT #57 Michał Grzelak
2026-05-07  1:28 ` [PATCH i-g-t v1 3/7] tools/vbt_decode: rename VBT#57 related vars Michał Grzelak
2026-05-07  1:28 ` [PATCH i-g-t v1 4/7] tools/vbt_decode: nuke get_device_id() Michał Grzelak
2026-05-07  1:28 ` [PATCH i-g-t v1 5/7] tools/vbt_decode: parse & dump VS/PE-O tables for LT Michał Grzelak
2026-05-07  1:28 ` Michał Grzelak [this message]
2026-05-07  1:28 ` [PATCH i-g-t v1 7/7] tools/vbt_decode: parse & dump VS/PE-O tables for JSL Michał Grzelak
2026-05-07  5:55 ` ✓ Xe.CI.BAT: success for Vswing/Preemphasis Override decoding Patchwork
2026-05-07  5:57 ` ✓ i915.CI.BAT: " Patchwork
2026-05-07 14:41 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-07 15:19 ` ✗ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260507012821.527453-7-michal.grzelak@intel.com \
    --to=michal.grzelak@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=suraj.kandpal@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox