diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-04 18:31:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-04 18:31:50 +0000 |
commit | aa3468008cfb0adad5c8ee20b5cb7f32045c4496 (patch) | |
tree | a8d0cdb592cbd44b3ee8289ada8aeddd89b4d469 /lib/Xconfig | |
parent | b028f9b7a39efdc6fafce0b60269432ac299aace (diff) | |
download | drakx-kbd-mouse-x11-aa3468008cfb0adad5c8ee20b5cb7f32045c4496.tar drakx-kbd-mouse-x11-aa3468008cfb0adad5c8ee20b5cb7f32045c4496.tar.gz drakx-kbd-mouse-x11-aa3468008cfb0adad5c8ee20b5cb7f32045c4496.tar.bz2 drakx-kbd-mouse-x11-aa3468008cfb0adad5c8ee20b5cb7f32045c4496.tar.xz drakx-kbd-mouse-x11-aa3468008cfb0adad5c8ee20b5cb7f32045c4496.zip |
(readCardsDB,install_server,handle_FIRMWARE) handle new DRIVER2_NO_FIRMWARE and FIRMWARE keywords
Diffstat (limited to 'lib/Xconfig')
-rw-r--r-- | lib/Xconfig/card.pm | 3 | ||||
-rw-r--r-- | lib/Xconfig/proprietary.pm | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm index 01cb9ea..30a5929 100644 --- a/lib/Xconfig/card.pm +++ b/lib/Xconfig/card.pm @@ -320,6 +320,7 @@ sub install_server { if ($card->{Driver2}) { require Xconfig::proprietary; Xconfig::proprietary::handle_DRIVER2_NO_SSE($card); + Xconfig::proprietary::handle_FIRMWARE($do_pkgs, $card); my @pkgs = Xconfig::proprietary::pkgs_for_Driver2($card->{Driver2}, $do_pkgs); if (@pkgs && (!$o_in || $o_in->ask_yesorno('', formatAlaTeX(N("There is a proprietary driver available for your video card which may support additional features. Do you wish to use it?")), 1))) { @@ -498,6 +499,8 @@ sub readCardsDB { DRIVER2 => sub { $card->{Driver2} = $val }, DRIVER2_NEEDS_SSE => sub { $card->{DRIVER2_NEEDS_SSE} = 1 }, DRIVER2_NO_SSE => sub { $card->{DRIVER2_NO_SSE} = $val }, + DRIVER2_NO_FIRMWARE => sub { $card->{DRIVER2_NO_FIRMWARE} = $val }, + FIRMWARE => sub { $card->{FIRMWARE} = $val }, NEEDVIDEORAM => sub { $card->{needVideoRam} = 1 }, DRI_GLX => sub { $card->{DRI_GLX} = 1 if $card->{Driver} }, DRI_GLX_EXPERIMENTAL => sub { $card->{DRI_GLX_EXPERIMENTAL} = 1 if $card->{Driver} }, diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm index 8fd701f..f4fb0c4 100644 --- a/lib/Xconfig/proprietary.pm +++ b/lib/Xconfig/proprietary.pm @@ -47,6 +47,21 @@ sub handle_DRIVER2_NO_SSE { } } +sub handle_FIRMWARE { + my ($do_pkgs, $card) = @_; + + my $pkg = $card->{FIRMWARE} or return; + + $do_pkgs->is_installed($pkg) || $do_pkgs->install($pkg) and return; + + if ($card->{DRIVER2_NO_FIRMWARE}) { + log::l("$card->{Driver2} need a firmware to work, switching back to $card->{DRIVER2_NO_FIRMWARE}"); + $card->{Driver2} = $card->{DRIVER2_NO_FIRMWARE}; + } else { + log::l("$card->{Driver2} needs a firmware to work smoothly/better (eg: 3D, KMS) but will still work"); + } +} + sub pkgs_for_Driver2 { my ($Driver2, $do_pkgs) = @_; |