diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 14:22:10 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 14:22:10 +0000 |
commit | 2cafc018717865f17566139dd22f293270881b0a (patch) | |
tree | cdaf3e838e29b298e1fd1592ffda11c2291cb2f3 | |
parent | d0c2f736167e9e4f5fde49ce16b89dfa22185d7a (diff) | |
download | monitor-edid-2cafc018717865f17566139dd22f293270881b0a.tar monitor-edid-2cafc018717865f17566139dd22f293270881b0a.tar.gz monitor-edid-2cafc018717865f17566139dd22f293270881b0a.tar.bz2 monitor-edid-2cafc018717865f17566139dd22f293270881b0a.tar.xz monitor-edid-2cafc018717865f17566139dd22f293270881b0a.zip |
monitor-parse-edid:
allow null manufacturer name, instead check that EDID version is 1.x
or 2.x (see Mandriva bug #28857)
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | monitor-parse-edid | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -32,6 +32,8 @@ 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 + o allow null manufacturer name, instead check that EDID version is 1.x + or 2.x (see Mandriva bug #28857) - monitor-edid, monitor-get-edid: o do not get duplicate EDIDs if the same EDID is available via diff --git a/monitor-parse-edid b/monitor-parse-edid index b95dd1f..9acbd9b 100755 --- a/monitor-parse-edid +++ b/monitor-parse-edid @@ -261,8 +261,8 @@ sub get_many_bits { sub check_parsed_edid { my ($edid) = @_; - $edid->{manufacturer_name} ne '@@@' or return 'bad manufacturer_name'; - $edid->{edid_version} != 0xff && $edid->{edid_revision} != 0xff or return 'bad edid_version'; + $edid->{edid_version} >= 1 && $edid->{edid_version} <= 2 or return 'bad edid_version'; + $edid->{edid_revision} != 0xff or return 'bad edid_revision'; if ($edid->{monitor_range}) { $edid->{monitor_range}{horizontal_min} && @@ -327,6 +327,7 @@ sub parse_edid { } elsif ($field eq 'manufacturer_name') { my $h = get_many_bits($v, 'manufacturer_name'); $v = join('', map { chr(ord('A') + $h->{$_} - 1) } 1 .. 3); + $v = "" if $v eq "@@@"; } elsif ($field eq 'video_input_definition') { $v = get_many_bits($v, 'video_input_definition'); } elsif ($field eq 'feature_support') { @@ -454,7 +455,7 @@ sub parse_edid { } $edid{max_size_precision} = 'cm'; - $edid{EISA_ID} = $edid{manufacturer_name} . sprintf('%04x', $edid{product_code}) if $edid{product_code}; + $edid{EISA_ID} = $edid{manufacturer_name} . sprintf('%04x', $edid{product_code}) if $edid{product_code} && $edid{manufacturer_name}; if ($edid{monitor_range}) { $edid{HorizSync} = $edid{monitor_range}{horizontal_min} . '-' . $edid{monitor_range}{horizontal_max}; |