diff options
author | Adam Jackson <ajax@redhat.com> | 2009-05-21 10:20:48 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-05-21 10:20:48 -0400 |
commit | a2c5ee36b21c2ee5c0468f1b251e74c1412dbecb (patch) | |
tree | d9afd733b3833360914039ad65b41df7d03c5316 /hw | |
parent | 79138eec1b49cbaca6a16f2bdd8579b5828aeb28 (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
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/ddc/interpret_edid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 3edfd1fb5..bdcc92e64 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -285,6 +285,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) @@ -336,10 +338,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); } |