diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-18 10:15:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-18 10:15:29 +0000 |
commit | 1f295b1f8bfe64f293a79900161b085a37009dee (patch) | |
tree | 99baa3ffd04db2622bd3a2d7be57215442f733f4 | |
parent | d092a9b069518c454d465169a2f523535abc8e88 (diff) | |
download | drakx-backup-do-not-use-1f295b1f8bfe64f293a79900161b085a37009dee.tar drakx-backup-do-not-use-1f295b1f8bfe64f293a79900161b085a37009dee.tar.gz drakx-backup-do-not-use-1f295b1f8bfe64f293a79900161b085a37009dee.tar.bz2 drakx-backup-do-not-use-1f295b1f8bfe64f293a79900161b085a37009dee.tar.xz drakx-backup-do-not-use-1f295b1f8bfe64f293a79900161b085a37009dee.zip |
- %standard_monitors are now in Cards+, dropping them
- multi head support generalized, now based on Cards+ MULTI_HEAD
- fix some ModeLines being written twice in XF86Config
- remove setting DefaultFbBpp to 32
(since it is the default in all my tests)
-rw-r--r-- | perl-install/Xconfig.pm | 26 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 46 | ||||
-rw-r--r-- | perl-install/Xconfigurator_consts.pm | 18 |
3 files changed, 46 insertions, 44 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index e235e5311..b724f3591 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -275,6 +275,7 @@ sub readCardsDB { UTAH_GLX => sub { $card->{UTAH_GLX} = 1 }, DRI_GLX_EXPERIMENTAL => sub { $card->{DRI_GLX_EXPERIMENTAL} = 1 }, UTAH_GLX_EXPERIMENTAL => sub { $card->{UTAH_GLX_EXPERIMENTAL} = 1 }, + MULTI_HEAD => sub { $card->{MULTI_HEAD} = $val }, UNSUPPORTED => sub { delete $card->{driver} }, #- Obsolete stuff, no existing card still need this @@ -301,4 +302,29 @@ sub readCardsDB { \%cards; } +sub install_matrox_proprietary_hal { + my ($prefix) = @_; + my $tmpdir = "$prefix/root/tmp"; + + my $tar = "mgadrivers-2.0.tgz"; + my $dir_in_tar = "mgadrivers"; + my $dest_dir = "$prefix/usr/X11R6/lib/modules/drivers"; + + #- already installed + return if -e "$dest_dir/mga_hal_drv.o"; + + system("wget -O $tmpdir/$tar ftp://ftp.matrox.com/pub/mga/archive/linux/2002/$tar") if !-e "$tmpdir/$tar"; + system("tar xzC $tmpdir -f $tmpdir/$tar"); + + my $src_dir = "$tmpdir/$dir_in_tar/xfree86/4.2.0/drivers"; + foreach (all($src_dir)) { + my $src = "$src_dir/$_"; + my $dest = "$dest_dir/$_"; + rename $dest, "$dest.non_hal"; + cp_af($src, $dest_dir); + } + rm_rf("$tmpdir/$tar"); + rm_rf("$tmpdir/$dir_in_tar"); +} + 1; diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index d381ea2f6..37c689eff 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -81,11 +81,7 @@ sub readMonitorsDB { } $monitors{"$l{vendor}|$l{type}"} = \%l; } - while (my ($k, $v) = each %Xconfigurator_consts::standard_monitors) { - $monitors{'Generic|' . translate($k)} = $standard_monitors{$k} = - { hsyncrange => $v->[1], vsyncrange => $v->[2] }; - } - \%monitors, \%standard_monitors; + \%monitors; } sub keepOnlyLegalModes { @@ -106,31 +102,38 @@ sub keepOnlyLegalModes { sub cardConfigurationAuto() { my @c = grep { $_->{driver} =~ /(Card|Server|Driver):/ } detect_devices::probeall(); - if (@c >= 2 && $c[0]{driver} eq $c[1]{driver} && $c[0]{driver} eq 'Card:Intel 830') { - shift @c; - } my @cards = map_index { my $card = { identifier => $_->{description} . (@c > 1 && " $::i"), busid => "PCI:$_->{pci_bus}:$_->{pci_device}:$_->{pci_function}", }; - if ($_->{driver} =~ /Card:(.*)/) { $card->{type} = $1 } + if ($_->{driver} =~ /Card:(.*)/) { updateCardAccordingName($card, $1) } elsif ($_->{driver} =~ /Server:(.*)/) { $card->{server} = $1 } elsif ($_->{driver} =~ /Driver:(.*)/) { $card->{driver} = $1 } else { internal_error() } $card; } @c; + + if (@cards >= 2 && $cards[0]{type} eq $cards[1]{type} && $cards[0]{type} eq 'Intel 830') { + shift @cards; + } #- take a default on sparc if nothing has been found. if (arch() =~ /^sparc/ && !@cards) { log::l("Using probe with /proc/fb as nothing has been found!"); local $_ = cat_("/proc/fb"); @cards = { server => /Mach64/ ? "Mach64" : /Permedia2/ ? "3DLabs" : "Sun24" }; } - #- special case for dual head card using only one busid. + #- special case for multi head card using only one busid. @cards = map { - my $dup = member($_->{type}, 'Matrox Millennium G450', 'Matrox Millennium G550') ? 2 : 1; - map { {%$_} } ($_) x $dup; + if ($_->{MULTI_HEAD} && $_->{type} =~ /G[24]00/) { + if ($ENV{MATROX_HAL}) { + $_->{flags}{need_MATROX_HAL} = 1; + } else { + delete $_->{MULTI_HEAD}; + } + } + map { {%$_} } ($_) x ($_->{MULTI_HEAD} || 1); } @cards; #- make sure no type are already used, duplicate both screen @@ -138,7 +141,6 @@ sub cardConfigurationAuto() { if (@cards > 1) { my $card = 1; foreach (@cards) { - updateCardAccordingName($_, $_->{type}) if $_->{type}; $_->{type} = "$_->{type} $card"; $card++; } @@ -190,6 +192,8 @@ sub install_server { $card->{driver} = 'nvidia'; } + Xconfig::install_matrox_proprietary_hal($prefix) if $card->{flags}{need_MATROX_HAL}; + $prog; } @@ -436,7 +440,7 @@ sub monitorConfiguration(;$$) { my $monitor = shift || {}; my $useFB = shift || 0; - my ($monitors, $standard_monitors_) = readMonitorsDB("$ENV{SHARE_PATH}/ldetect-lst/MonitorsDB"); + my $monitors = readMonitorsDB("$ENV{SHARE_PATH}/ldetect-lst/MonitorsDB"); if ($monitor->{EISA_ID}) { log::l("EISA_ID: $monitor->{EISA_ID}"); @@ -466,7 +470,7 @@ that is beyond the capabilities of your monitor: you may damage your monitor. [ { val => \$monitor->{hsyncrange}, list => \@Xconfigurator_consts::hsyncranges, label => _("Horizontal refresh rate"), not_edit => 0 }, { val => \$monitor->{vsyncrange}, list => \@Xconfigurator_consts::vsyncranges, label => _("Vertical refresh rate"), not_edit => 0 } ]); } else { - add2hash($monitor, $monitors->{$monitor->{type}} || $standard_monitors_->{$monitor->{type}}); + add2hash($monitor, $monitors->{$monitor->{type}}); } add2hash($monitor, { type => "monitor1", manual => 1 }); } @@ -1107,11 +1111,6 @@ Section "Module" ); } print G qq( - - SubSection "extmod" - #Option "omit xfree86-dga" - EndSubSection - Load "type1" Load "freetype" EndSection @@ -1135,7 +1134,6 @@ EndSection print F qq( VertRefresh $O->{vsyncrange}\n\n); print G qq( VertRefresh $O->{vsyncrange}\n\n); print F $O->{ModeLines_xf3} if $O->{ModeLines_xf3}; - print F $O->{ModeLines} if $O->{ModeLines}; print G $O->{ModeLines} if $O->{ModeLines}; print F "\nEndSection\n\n\n"; print G "\nEndSection\n\n\n"; @@ -1256,9 +1254,6 @@ Section "Screen" Device "$O->{type}" Monitor "$X->{monitor}{type}" ); - #- hack for DRI with Matrox card at 24 bpp, need another command. - $O->{DRI_GLX} && $O->{identifier} =~ /Matrox.* G[245][05]0/ && $X->{default_depth} == 24 and - print G " DefaultFbBpp 32\n"; #- bpp 32 not handled by XF4 $subscreen->(*G, "svga", min($X->{default_depth}, 24), $O->{depth}); foreach (2..@{$O->{cards} || []}) { @@ -1269,9 +1264,6 @@ Section "Screen" Device "$device" Monitor "monitor$_" ); - #- hack for DRI with Matrox card at 24 bpp, need another command. - $O->{DRI_GLX} && $O->{identifier} =~ /Matrox.* G[245][05]0/ && $X->{default_depth} == 24 and - print G " DefaultFbBpp 32\n"; #- bpp 32 not handled by XF4 $subscreen->(*G, "svga", min($X->{default_depth}, 24), $O->{depth}); } diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm index 79c7c4ca8..63147eb16 100644 --- a/perl-install/Xconfigurator_consts.pm +++ b/perl-install/Xconfigurator_consts.pm @@ -79,6 +79,7 @@ sub bios_vga_modes { 19 => "1280x1024", 20 => "1280x1024", 21 => "1600x1200", + 22 => "1600x1200", ); for (my $i = 0; $i < $l[0]; $i++) { $monitorSize2resolution[$i] = $l[1]; @@ -104,28 +105,11 @@ $good_default_monitor = arch() !~ /ppc/ ? "High Frequency SVGA, 1024x768 at 70 H detect_devices::get_mac_model =~ /^iBook/ ? "iBook 800x600" : "iMac/PowerBook 1024x768"; $low_default_monitor = "Super VGA, 800x600 at 56 Hz"; -%standard_monitors = ( - __("Standard VGA, 640x480 at 60 Hz") => [ '640x480@60', "31.5" , "60" ], - __("Super VGA, 800x600 at 56 Hz") => [ '800x600@56', "31.5-35.1" , "55-60" ], - __("8514 Compatible, 1024x768 at 87 Hz interlaced (no 800x600)") => [ '8514 compatible', "31.5,35.5" , "60,70,87" ], - __("Super VGA, 1024x768 at 87 Hz interlaced, 800x600 at 56 Hz") => [ '1024x768@87i', "31.5,35.15,35.5" , "55-90" ], - __("Extended Super VGA, 800x600 at 60 Hz, 640x480 at 72 Hz") => [ '800x600@60', "31.5-37.9" , "55-90" ], - __("Non-Interlaced SVGA, 1024x768 at 60 Hz, 800x600 at 72 Hz") => [ '1024x768@60', "31.5-48.5" , "55-90" ], - __("High Frequency SVGA, 1024x768 at 70 Hz") => [ '1024x768@70', "31.5-57.0" , "50-90" ], - __("Multi-frequency that can do 1280x1024 at 60 Hz") => [ '1280x1024@60', "31.5-64.3" , "50-90" ], - __("Multi-frequency that can do 1280x1024 at 74 Hz") => [ '1280x1024@74', "31.5-79.0" , "50-100" ], - __("Multi-frequency that can do 1280x1024 at 76 Hz") => [ '1280x1024@76', "31.5-82.0" , "40-100" ], - __("Monitor that can do 1600x1200 at 70 Hz") => [ '1600x1200@70', "31.5-88.0" , "50-120" ], - __("Monitor that can do 1600x1200 at 76 Hz") => [ '1600x1200@76', "31.5-94.0" , "50-160" ], -); - @vsyncranges = ("50-70", "50-90", "50-100", "40-150"); @hsyncranges = ( "31.5", "31.5-35.1", - "31.5, 35.5", - "31.5, 35.15, 35.5", "31.5-37.9", "31.5-48.5", "31.5-57.0", |