From f4898b409376803c9a9dd8475bdd5576ff1cc59d Mon Sep 17 00:00:00 2001 From: Luc Verhaegen Date: Tue, 31 Jan 2006 14:49:43 +0000 Subject: [PATCH] Further bug #5386 fixes: Fix some problems with the EDID code: Some bitoffsets were wrong. Unknown Detailed Sections weren't handled properly and defaulted to Detailed Timing. --- ChangeLog | 10 ++++++++++ hw/xfree86/ddc/edid.h | 5 +++-- hw/xfree86/ddc/interpret_edid.c | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84ba343b3..c02dfb08d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-01-31 Luc Verhaegen + + * hw/xfree86/ddc/edid.h: + * hw/xfree86/ddc/interpret_edid.c: (get_dt_md_section): + + Further bug #5386 fixes: Fix some problems with the EDID code: + Some bitoffsets were wrong. + Unknown Detailed Sections weren't handled properly and defaulted to + Detailed Timing. + 2006-01-31 Luc Verhaegen * hw/xfree86/utils/cvt/.cvsignore: diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index f7e7a76ba..9182fbdb0 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -227,9 +227,9 @@ #define STEREO _STEREO(c) #define _STEREO1(x) (x[17] & 0x1) #define STEREO1 _STEREO(c) -#define _SYNC_T(x) ((x[17] & 0x18) >> 4) +#define _SYNC_T(x) ((x[17] & 0x18) >> 3) #define SYNC_T _SYNC_T(c) -#define _MISC(x) ((x[17] & 0x06) >> 2) +#define _MISC(x) ((x[17] & 0x06) >> 1) #define MISC _MISC(c) #define _MONITOR_DESC_TYPE(x) x[3] @@ -411,6 +411,7 @@ struct detailed_timings { #define DS_WHITE_P 0xFB #define DS_STD_TIMINGS 0xFA #define DS_DUMMY 0x10 +#define DS_UNKOWN 0x100 /* type is an int */ struct monitor_ranges { int min_v; diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 3e41276a2..59dae6cf3 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -174,6 +174,9 @@ get_dt_md_section(Uchar *c, struct edid_version *ver, case ADD_DUMMY: det_mon[i].type = DS_DUMMY; break; + default: + det_mon[i].type = DS_UNKOWN; + break; } } else { det_mon[i].type = DT;