[PATCH i-g-t 15/20] tools/intel_vbt_decode: Use struct bdb_sdvo_lvds_dtd

Ville Syrjala ville.syrjala at linux.intel.com
Fri May 31 14:23:49 UTC 2024


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

Use the full struct bdb_sdvo_lvds_dtd when dumping out the
SDVO LVDS DTD block.

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

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 95ed97c5f499..167b5751ad16 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -316,8 +316,7 @@ static size_t block_min_size(const struct context *context, int section_id)
 	case BDB_SDVO_LVDS_OPTIONS:
 		return sizeof(struct bdb_sdvo_lvds_options);
 	case BDB_SDVO_LVDS_DTD:
-		/* FIXME? */
-		return 0;
+		return sizeof(struct bdb_sdvo_lvds_dtd);
 	case BDB_EDP:
 		return sizeof(struct bdb_edp);
 	case BDB_LFP_OPTIONS:
@@ -1933,13 +1932,11 @@ static void dump_lfp_power(struct context *context,
 static void dump_sdvo_lvds_dtd(struct context *context,
 			       const struct bdb_block *block)
 {
-	const struct bdb_edid_dtd *dvo_timing = block_data(block);
-	int n, count;
+	const struct bdb_sdvo_lvds_dtd *t = block_data(block);
 
-	count = block->size / sizeof(struct bdb_edid_dtd);
-	for (n = 0; n < count; n++) {
+	for (int n = 0; n < ARRAY_SIZE(t->dtd); n++) {
 		printf("%d:\n", n);
-		print_detail_timing_data(dvo_timing++);
+		print_detail_timing_data(&t->dtd[n]);
 	}
 }
 
-- 
2.44.1



More information about the igt-dev mailing list