[igt-dev] [PATCH i-g-t] lib/igt_edid_template: Fix parenthesis for vertical pulse coding

Paul Kocialkowski paul.kocialkowski at bootlin.com
Thu Jan 3 16:54:48 UTC 2019


Add missing parenthesis in the macro coding the vertical pulse high
bits. Without them, the shift takes precedence over the logical and
operation, which is not how these bits should be coded according to
the spec.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
---
 lib/igt_edid_template.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_edid_template.h b/lib/igt_edid_template.h
index de421e080a88..8dbd19caea4c 100644
--- a/lib/igt_edid_template.h
+++ b/lib/igt_edid_template.h
@@ -8,7 +8,7 @@
 #define op(ho, hp, vo, vp) ((ho) & 0xff), ((hp) & 0xff), \
 		(((vo) & 0xf) << 4) | ((vp) & 0xf), \
 		(((ho) & 0x300) >> 2) | (((hp) & 0x300) >> 4) \
-		| (((vo) & 0x30) >> 2) | ((vp) & 0x30 >> 4)
+		| (((vo) & 0x30) >> 2) | (((vp) & 0x30) >> 4)
 
 static unsigned char EDID_NAME[EDID_LENGTH] = {
 	0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, /* header */
-- 
2.20.1



More information about the igt-dev mailing list