diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-02-28 23:06:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-02-28 23:06:31 +0000 |
commit | b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142 (patch) | |
tree | 3de51de387129c058de30ba6b769989e53c61ad3 /perl-install/Xconfig/monitor.pm | |
parent | 1f2d53396dd61b3ee999db70f1b373dd015d0b73 (diff) | |
download | drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar.gz drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar.bz2 drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar.xz drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.zip |
- remove ddcxinfos, replaced by monitor-edid (which is in a separate package)
- add many resolutions (they are structured by aspect ratio for next move)
- put the "Monitor preferred modeline" from EDID in xorg.conf
- for this ModeLine must be exported from the monitor section
- specifying a VendorName|ModelName in auto_inst is valid, don't overwrite it with edid probe
- the strange /dev/zero needed (?) by ddcxinfos is no more needed
- field {size} is now {diagonal_size}, and is no more "corrected"
- add @CVT_ratios and @CVT_vfreqs (unused at the moment)
- Getopt::Long is needed by monitor-parse-edid
Diffstat (limited to 'perl-install/Xconfig/monitor.pm')
-rw-r--r-- | perl-install/Xconfig/monitor.pm | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm index ccd9b4c50..abd141236 100644 --- a/perl-install/Xconfig/monitor.pm +++ b/perl-install/Xconfig/monitor.pm @@ -64,7 +64,7 @@ sub configure_auto_install { put_in_hash($monitor, $auto_install_monitor); } $monitors, $old_X->{monitors} if $old_X->{monitors}; - if (!$monitors->[0]{HorizSync}) { + if (!$monitors->[0]{HorizSync} && !($monitors->[0]{VendorName} && $monitors->[0]{ModelName})) { put_in_hash($monitors->[0], getinfoFromDDC()); } @@ -171,27 +171,23 @@ sub configure_automatic { } sub getinfoFromDDC() { - my ($VideoRam, @l) = any::ddcxinfos() or return; + my ($edid, $vbe) = any::monitor_full_edid() or return; + my $monitor = eval($edid); - my @Modes; - local $_; - while (($_ = shift @l) ne "\n") { - my ($depth, $x, $y) = split; - $depth = int(log($depth) / log(2)) if $depth; - - push @Modes, [ $x, $y, $depth ]; + if ($vbe =~ /Memory: (\d+)k/) { + $monitor->{VideoRam_probed} = $1; + } + $monitor->{ModeLine} = Xconfig::xfree::default_ModeLine(); + foreach (@{$monitor->{detailed_timings} || []}) { + unshift @{$monitor->{ModeLine}}, + { val => $_->{ModeLine}, pre_comment => $_->{ModeLine_comment} . "\n" }; } - my ($h, $v, $size, @_modes) = @l; - { - VideoRam_probed => to_int($VideoRam), - HorizSync => first($h =~ /^(\S*)/), - VertRefresh => first($v =~ /^(\S*)/), - size => to_float($size), - if_($size =~ /EISA ID=(\S*)/, EISA_ID => lc($1), VendorName => "Plug'n Play"), - #- not-used-anymore Modes => \@Modes, - #- not-used-anymore ModeLines => join('', @m), - }; + if ($monitor->{EISA_ID}) { + $monitor->{VendorName} = "Plug'n Play"; + $monitor->{ModelName} = $monitor->{monitor_name}; + } + $monitor; } sub monitors_db() { |