Thread (31 messages) 31 messages, 2 authors, 2021-09-27
STALE1724d

[PATCH v2 22/29] edid-decode: DisplayID non-0 filler fixes

From: joevt <hidden>
Date: 2021-09-26 08:34:47
Subsystem: the rest · Maintainer: Linus Torvalds

It's probably not a Product Identification Data Block or any kind of block so data_block should be cleared (so that the block name doesn't appear in the Failures section for this fail).
Output hex data because it might contain interesting data (it's at least known to be not zero).

Signed-off-by: Joe van Tunen <redacted>
---
 parse-displayid-block.cpp | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index 5266bb3..dc2ec7b 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -1745,8 +1745,11 @@ unsigned edid_state::displayid_block(const unsigned version, const unsigned char
 
 		if (!tag && !len) {
 			// A Product Identification Data Block with no payload bytes is not valid - assume this is the end.
+		data_block.clear(); // Probably not a Product Identification Data Block so clear this.
 		if (!memchk(x, length)) {
+			printf("  Filler:\n");
 				fail("Non-0 filler bytes in the DisplayID block.\n");
+			hex_block("    ", x, length);
 			}
 		return length;
 		}
-- 
2.24.3 (Apple Git-128)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help