[Libdlo] [PATCH] libdlo: fix EDID parsing

Bernie Thompson bernie at plugable.com
Tue Mar 8 09:08:33 PST 2011


Hi Martin,

Thanks so much for submitting these patches!

I've been backed up, but also with udlfb having moved from staging to
mainline in 2.6.38, the proper place to submit patches has changed
from here, to the fbdev list with all the other fbdev drivers.

Can you please re-submit to the list at
http://vger.kernel.org/vger-lists.html#linux-fbdev ?

Both patches look good to my eyes, by the way.

Again, thank you!
Bernie

On Tue, Mar 8, 2011 at 4:15 AM, Martin Decky <martin at decky.cz> wrote:
> 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];
>
> _______________________________________________
> Libdlo mailing list
> Libdlo at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libdlo
>


More information about the Libdlo mailing list