aboutsummaryrefslogtreecommitdiffstats
path: root/monitor-parse-edid
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2010-01-03 07:58:16 +0000
committerAnssi Hannula <anssi@mandriva.org>2010-01-03 07:58:16 +0000
commitff26001d9377b12b822b574dc19fdbc2a8114585 (patch)
treeed80bbf1c160fc8f87614f942e0b5a54e6b70bcb /monitor-parse-edid
parentfa54b1366d911acec7c889a6f38617ab92d0a8b5 (diff)
downloadmonitor-edid-ff26001d9377b12b822b574dc19fdbc2a8114585.tar
monitor-edid-ff26001d9377b12b822b574dc19fdbc2a8114585.tar.gz
monitor-edid-ff26001d9377b12b822b574dc19fdbc2a8114585.tar.bz2
monitor-edid-ff26001d9377b12b822b574dc19fdbc2a8114585.tar.xz
monitor-edid-ff26001d9377b12b822b574dc19fdbc2a8114585.zip
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
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-xmonitor-parse-edid9
1 files changed, 7 insertions, 2 deletions
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, " : '',