From: Tormod Volden <[email protected]> For instance, the handling of week=0xff or week=0 was not working, as could be seen from the data/sharp-* examples.
Only EDID version 1.4 requires the year to be 2006 or later. Actually, data/sharp-aquos-hdmi reports 1.3 but seems to use month 0xff to flag model year, which is a 1.4 feature. In this case we will display model year, but report non-conformance. Signed-off-by: Tormod Volden <[email protected]> --- edid-decode.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/edid-decode.c b/edid-decode.c index c3e556f..3244ae1 100644 --- a/edid-decode.c +++ b/edid-decode.c @@ -972,18 +972,18 @@ int main(int argc, char **argv) time(&the_time); ptm = localtime(&the_time); - if (edid[0x10] < 55 || edid[0x10] == 0xff) { + if (edid[0x10] < 0x37 || (edid[0x10] == 0xff && claims_one_point_four)) has_valid_week = 1; - if (edid[0x11] > 0x0f) { - if (edid[0x10] == 0xff) { - has_valid_year = 1; - printf("Made week %hd of model year %hd\n", edid[0x10], - edid[0x11]); - } else if (edid[0x11] + 90 <= ptm->tm_year) { - has_valid_year = 1; - printf("Made week %hd of %hd\n", edid[0x10], edid[0x11] + 1990); - } - } + if (edid[0x11] + 90 <= ptm->tm_year) { + /* Year must be 2006 or later from EDID version 1.4 */ + if (edid[0x11] > 0x0f || !claims_one_point_four) + has_valid_year = 1; + if (edid[0x10] == 0xff) + printf("Model year %hd\n", edid[0x11] + 1990); + else if (edid[0x10] == 0) + printf("Manufactured year %hd\n", edid[0x11] + 1990); + else + printf("Manufactured week %hd of %hd\n", edid[0x10], edid[0x11] + 1990); } /* display section */ -- 1.7.5.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
