[igt-dev] [PATCH i-g-t v2 01/17] tools/intel_vbt_decode: Fix mipi sequence block size

Ville Syrjala ville.syrjala at linux.intel.com
Tue Sep 6 12:29:28 UTC 2022


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

The v3+ MIPI sequence block version number and new size
field are considered part of the BDB block header, and thus
not included in the reported size. Bump up the size appropariately
so that we copy the whole block.

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

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index bad6825cfbab..98edeb385635 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -476,6 +476,13 @@ static struct bdb_block *find_section(const struct context *context, int section
 
 	size = get_blocksize(data);
 
+	/*
+	 * Version number and new block size are considered
+	 * part of the header for MIPI sequenece block v3+.
+	 */
+	if (section_id == BDB_MIPI_SEQUENCE && *(const u8*)data >= 3)
+		size += 5;
+
 	/* expect to have the full definition for each block with modern VBTs */
 	if (min_size && size > min_size &&
 	    section_id != BDB_CHILD_DEVICE_TABLE &&
-- 
2.35.1



More information about the igt-dev mailing list