summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-05-21 10:20:48 -0400
committerAdam Jackson <ajax@redhat.com>2009-06-11 15:21:11 -0400
commitebca49e0fedcc1c536f1dee7c58cae9903e74fa2 (patch)
tree4786a981ad8ab7d8713832bc194be531013c3b5f
parentc643d24cdeaade8d7839691a3113c4d2d17be61e (diff)
EDID: Be more cautious about finding vendor blocks.
Many old monitors zero-fill the detailed descriptors, so check for that to avoid a useless warning like: (WW) RADEON(0): Unknown vendor-specific block 0 (cherry picked from commit a2c5ee36b21c2ee5c0468f1b251e74c1412dbecb)
-rw-r--r--hw/xfree86/ddc/interpret_edid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index c4d896393..191e900d8 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -284,6 +284,8 @@ get_std_timing_section(Uchar *c, struct std_timings *r,
}
}
+static const unsigned char empty_block[18];
+
static void
get_dt_md_section(Uchar *c, struct edid_version *ver,
struct detailed_monitor_section *det_mon)
@@ -335,10 +337,10 @@ get_dt_md_section(Uchar *c, struct edid_version *ver,
det_mon[i].type = DS_UNKOWN;
break;
}
- if (c[3] <= 0x0F) {
+ if (c[3] <= 0x0F && memcmp(c, empty_block, sizeof(empty_block))) {
det_mon[i].type = DS_VENDOR + c[3];
}
- } else {
+ } else {
det_mon[i].type = DT;
get_detailed_timing_section(c,&det_mon[i].section.d_timings);
}