[Libdlo] [PATCH] libdlo: fix EDID parsing
Martin Decky
martin at decky.cz
Tue Mar 8 04:15:10 PST 2011
From: Martin Decky <martin at decky.cz>
The operations for getting the values of vertical sync offset and width
in libdlo do not respect the EDID specification. These values are 6
bits wide with no extra zero bits in them according to [1].
(Patch sent on 2011-02-13 directly to Bernie Thompson, but he's
probably too busy to deal with it.)
[1] VESA Enhanced Extended Display Identification Data Standard,
Release A, Revision 2, page 34, VESA, Sep 2006
Signed-off-by: Martin Decky <martin at decky.cz>
----
diff -Naurp libdlo.orig/src/dlo_mode.c libdlo/src/dlo_mode.c
--- libdlo.orig/src/dlo_mode.c 2011-02-13 22:28:51.264317328 +0100
+++ libdlo/src/dlo_mode.c 2011-02-13 22:32:05.264625561 +0100
@@ -838,8 +838,8 @@ static dlo_retcode_t unpack_edid_detaile
monitor->vBlanking = ptr[0x06] + ((ptr[0x07] & 0x0F) << 8);
monitor->hSyncOffset = ptr[0x08] + ((ptr[0x0B] & 0xC0) << 2);
monitor->hSyncPulseWidth = ptr[0x09] + ((ptr[0x0B] & 0x30) << 4);
- monitor->vSyncOffset = (ptr[0x0A] >> 4) + ((ptr[0x0B] & 0x0C) << 6);
- monitor->vSyncPulseWidth = (ptr[0x0A] & 0x0F) + ((ptr[0x0B] & 0x03) << 8);
+ monitor->vSyncOffset = (ptr[0x0A] >> 4) + ((ptr[0x0B] & 0x0C) << 2);
+ monitor->vSyncPulseWidth = (ptr[0x0A] & 0x0F) + ((ptr[0x0B] & 0x03) << 4);
monitor->hImageSizeMm = ptr[0x0C] + ((ptr[0x0E] & 0xF0) << 4);
monitor->vImageSizeMm = ptr[0x0D] + ((ptr[0x0E] & 0x0F) << 8);
monitor->hBorder = ptr[0x0F];
More information about the Libdlo
mailing list