From ff26001d9377b12b822b574dc19fdbc2a8114585 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 3 Jan 2010 07:58:16 +0000 Subject: monitor-parse-edid: add comment "Monitor preferred modeline" only for the modeline the monitor reports as preferred, and add "Monitor supported modeline" comment for the other modelines --- NEWS | 3 +++ monitor-parse-edid | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d7ebb3c..df0871b 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ parameters (at least Fujitsu-Siemens Myrica VQ32-1T testcase) o ignore 1x1 modes (at least Nokia Valuegraph 447w testcase) o add support for standard timing descriptors in monitor descriptors + o add comment "Monitor preferred modeline" only for the modeline the + monitor reports as preferred, and add "Monitor supported modeline" + comment for the other modelines Version 2.5 - 18 October 2009, by Anssi Hannula diff --git a/monitor-parse-edid b/monitor-parse-edid index 72978c3..2e823e4 100755 --- a/monitor-parse-edid +++ b/monitor-parse-edid @@ -465,6 +465,10 @@ sub parse_edid { $edid{ratio_name} = ratio_name($edid{max_size_horizontal}, $edid{max_size_vertical}, 'cm'); $edid{ratio_precision} = 'cm'; } + + if ($edid{feature_support}->{has_preferred_timing} && $edid{detailed_timings}[0]) { + $edid{detailed_timings}[0]->{preferred} = 1; + } foreach my $h (@{$edid{detailed_timings}}) { @@ -516,8 +520,9 @@ sub parse_edid { my $horizontal_total = $h->{horizontal_active} + $h->{horizontal_blanking}; my $vertical_total = $h->{vertical_active} + $h->{vertical_blanking}; - $h->{ModeLine_comment} = sprintf qq(# Monitor %s modeline (%.1f Hz vsync, %.1f kHz hsync, %sratio %s%s)), - $h->{source} eq 'cea_vdb' ? "supported CEA" : "preferred", + $h->{ModeLine_comment} = sprintf qq(# Monitor %s%s modeline (%.1f Hz vsync, %.1f kHz hsync, %sratio %s%s)), + $h->{preferred} ? "preferred" : "supported", + $h->{source} eq 'cea_vdb' ? " CEA" : '', $h->{pixel_clock} / $horizontal_total / $vertical_total * 1000 * 1000 * ($h->{interlaced} ? 2 : 1), $h->{pixel_clock} / $horizontal_total * 1000, $h->{interlaced} ? "interlaced, " : '', -- cgit v1.2.1