summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/card.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/Xconfig/card.pm')
-rw-r--r--perl-install/Xconfig/card.pm224
1 files changed, 187 insertions, 37 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 7c858589b..3a528ad26 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -9,6 +9,9 @@ use common;
use log;
+my $force_xf4 = 1;
+
+
my %VideoRams = (
256 => N_("256 kB"),
512 => N_("512 kB"),
@@ -21,22 +24,75 @@ my %VideoRams = (
65536 => N_("64 MB or more"),
);
+our %serversdriver = arch() =~ /^sparc/ ? (
+ 'Mach64' => "accel",
+ '3DLabs' => "accel",
+ 'Sun' => "fbdev",
+ 'Sun24' => "fbdev",
+ 'SunMono' => "fbdev",
+ 'VGA16' => "vga16",
+ 'FBDev' => "fbdev",
+) : (
+ 'SVGA' => "svga",
+ 'S3' => "accel",
+ 'Mach32' => "accel",
+ 'Mach8' => "accel",
+ '8514' => "accel",
+ 'P9000' => "accel",
+ 'AGX' => "accel",
+ 'W32' => "accel",
+ 'Mach64' => "accel",
+ 'I128' => "accel",
+ 'S3V' => "accel",
+ '3DLabs' => "accel",
+ 'VGA16' => "vga16",
+ 'FBDev' => "fbdev",
+);
+my @allbutfbservers = grep { arch() =~ /^sparc/ || $serversdriver{$_} ne "fbdev" } keys(%serversdriver);
+my @allservers = keys(%serversdriver);
+
my @xfree4_Drivers = ((arch() =~ /^sparc/ ? qw(sunbw2 suncg14 suncg3 suncg6 sunffb sunleo suntcx) :
qw(apm ark chips cirrus cyrix glide i128 i740 i810 imstt
mga neomagic newport nv rendition r128 radeon vesa
s3 s3virge savage siliconmotion sis tdfx tga trident tseng vmware)),
qw(ati glint vga fbdev));
+my $lib = (arch() =~ /x86_64/) ? "lib64" : "lib";
+
+#- using XF4 if {Driver} && !{prefer_xf3} otherwise using XF3
+#- error if $force_xf4 && !{Driver} || !{Driver} && !{server}
+#- internal error if $force_xf4 && {prefer_xf3} || {prefer_xf3} && !{server}
+
+sub using_xf4 {
+ my ($card) = @_;
+ $card->{Driver} && !$card->{prefer_xf3};
+}
+
+sub server_binary {
+ my ($card) = @_;
+ "/usr/X11R6/bin/" .
+ (using_xf4($card) ? 'XFree86' :
+ $card->{server} =~ /Sun(.*)/ ? "Xsun$1" :
+ $card->{server} eq 'Xpmac' ? 'Xpmac' :
+ "XF86_$card->{server}");
+}
+
sub from_raw_X {
my ($raw_X) = @_;
my $device = $raw_X->get_device or die "no card configured";
+ my ($xfree3_server) = readlink("$::prefix/etc/X11/X") =~ /XF86_(.*)/;
+
my $card = {
- use_DRI_GLX => eval { any { /dri/ } $raw_X->get_modules },
+ use_UTAH_GLX => eval { any { /glx/ } $raw_X->{xfree3}->get_modules },
+ use_DRI_GLX => eval { any { /dri/ } $raw_X->{xfree4}->get_modules },
+ server => $xfree3_server,
+ prefer_xf3 => $xfree3_server && !$force_xf4,
%$device,
};
add_to_card__using_Cards($card, $card->{BoardName});
+ $card->{prog} = server_binary($card);
$card;
}
@@ -51,21 +107,26 @@ sub to_raw_X {
$raw_X->set_devices($card, @{$card->{cards} || []});
- $raw_X->get_ServerLayout->{Xinerama} = { commented => !$card->{Xinerama}, Option => 1 }
+ $raw_X->{xfree4}->get_ServerLayout->{Xinerama} = { commented => !$card->{Xinerama}, Option => 1 }
if defined $card->{Xinerama};
- $raw_X->set_load_module('glx', !$card->{DRI_GLX_SPECIAL}); #- glx for everyone, except proprietary nvidia
- $raw_X->set_load_module('dri', $card->{use_DRI_GLX} && !$card->{DRI_GLX_SPECIAL});
+ $raw_X->{xfree3}->set_load_module('glx-3.so', $card->{use_UTAH_GLX}); #- glx.so may clash with server version 4.
+
+ $raw_X->{xfree4}->set_load_module('glx', !$card->{DRI_GLX_SPECIAL} && $card->{Driver2} ne 'fglrx'); #- glx for everyone, except proprietary nvidia
+ $raw_X->{xfree4}->set_load_module('dri', $card->{use_DRI_GLX} && !$card->{DRI_GLX_SPECIAL});
# This loads the NVIDIA GLX extension module.
# IT IS IMPORTANT TO KEEP NAME AS FULL PATH TO libglx.so ELSE
# IT WILL LOAD XFree86 glx module and the server will crash.
- $raw_X->set_load_module('/usr/X11R6/lib/modules/extensions/libglx.so', $card->{DRI_GLX_SPECIAL});
+ $raw_X->{xfree4}->set_load_module("/usr/X11R6/$lib/modules/extensions/libglx.so", $card->{DRI_GLX_SPECIAL});
+ if ($card->{Driver2} ne 'nvidia') {
+ $raw_X->{xfree4}->set_load_module("/usr/X11R6/$lib/modules/extensions/libglx.a", 1);
+ }
- $raw_X->remove_Section('DRI');
- $raw_X->add_Section('DRI', { Mode => { val => '0666' } }) if $card->{use_DRI_GLX};
+ $raw_X->{xfree4}->remove_Section('DRI');
+ $raw_X->{xfree4}->add_Section('DRI', { Mode => { val => '0666' } }) if $card->{use_DRI_GLX};
- $raw_X->remove_load_module('v4l') if $card->{use_DRI_GLX} && $card->{Driver} eq 'r128';
+ $raw_X->{xfree4}->remove_load_module('v4l') if $card->{use_DRI_GLX} && $card->{Driver} eq 'r128';
}
sub default_ATI_fglrx_config() { our $default_ATI_fglrx_config }
@@ -73,7 +134,7 @@ sub default_ATI_fglrx_config() { our $default_ATI_fglrx_config }
sub probe() {
#-for Pixel tests
#- my @c = { driver => 'Card:Matrox Millennium G400 DualHead', description => 'Matrox|Millennium G400 Dual HeadCard' };
- my @c = detect_devices::matching_driver('(Card|Server|Driver):');
+ my @c = detect_devices::matching_driver('^(Card|Server|Driver):');
my @cards = map {
my @l = $_->{description} =~ /(.*?)\|(.*)/;
@@ -83,11 +144,12 @@ sub probe() {
BusID => "PCI:$_->{pci_bus}:$_->{pci_device}:$_->{pci_function}",
};
if ($_->{driver} =~ /Card:(.*)/) { $card->{BoardName} = $1; add_to_card__using_Cards($card, $1) }
+ elsif ($_->{driver} =~ /Server:(.*)/) { $card->{server} = $1 }
elsif ($_->{driver} =~ /Driver:(.*)/) { $card->{Driver} = $1 }
else { internal_error() }
$_->{VideoRam} = 4096 if $_->{Driver} eq 'i810';
- $_->{Options}{UseFBDev} = undef if arch() =~ /ppc/ && $_->{Driver} eq 'r128';
+ $_->{Options_xfree4}{UseFBDev} = undef if arch() =~ /ppc/ && $_->{Driver} eq 'r128';
$card;
} @c;
@@ -141,9 +203,11 @@ sub card_config__not_listed {
);
my $cards = readCardsDB("$ENV{SHARE_PATH}/ldetect-lst/Cards+");
+ my @xf3 = $options->{allowFB} ? @allservers : @allbutfbservers;
my @xf4 = grep { $options->{allowFB} || $_ ne 'fbdev' } @xfree4_Drivers;
my @list = (
(map { 'Vendor|' . $_ } keys %$cards),
+ if_(!$force_xf4, map { 'XFree 3|' . $_ } @xf3),
(map { 'XFree 4|' . $_ } @xf4),
);
@@ -165,6 +229,8 @@ sub card_config__not_listed {
%$card = ();
if ($kind eq 'Vendor') {
add_to_card__using_Cards($card, $s);
+ } elsif ($kind eq 'XFree 3') {
+ $card->{server} = $s;
} else {
$card->{Driver} = $s;
}
@@ -178,9 +244,7 @@ sub multi_head_choose {
my @choices = multi_head_choices('', @cards);
my $tc = $choices[0];
- if ($auto) {
- @choices == 1 or return;
- } else {
+ if (!$auto) {
$tc = $in->ask_from_listf(N("Multi-head configuration"),
N("Your system supports multiple head configuration.
What do you want to do?"), sub { $_[0]{text} }, \@choices) or return;
@@ -197,15 +261,15 @@ sub configure_auto_install {
if ($card->{card_name}) {
#- try to get info from given card_name
add_to_card__using_Cards($card, $card->{card_name});
- undef $card->{card_name} if !$card->{Driver}; #- bad card_name as we can't find the driver
+ undef $card->{card_name} if !$card->{server} && !$card->{Driver}; #- bad card_name as we can't find the server
}
- return if $card->{Driver};
+ return if $card->{server} || $card->{Driver};
}
my @cards = probe();
my ($choice) = multi_head_choices($old_X->{Xinerama}, @cards);
my $card = $choice ? $choice->{code}() : do {
- log::l('no graphic card probed, try providing one using $o->{card}{Driver} or $o->{card}{card_name}. Defaulting...');
+ log::l('no graphic card probed, try providing one using $o->{card}{Driver} or $o->{card}{server} or $o->{card}{card_name}. Defaulting...');
{ Driver => ($options->{allowFB} ? 'fbdev' : 'vesa') };
};
@@ -214,7 +278,7 @@ sub configure_auto_install {
$glx_choice->{code}();
set_glx_restrictions($card);
- install_server($card, $options, $do_pkgs);
+ $card->{prog} = install_server($card, $options, $do_pkgs);
if ($card->{needVideoRam} && !$card->{VideoRam}) {
$card->{VideoRam} = $options->{VideoRam_probed} || 4096;
log::l("argh, I need to know VideoRam! Taking " . ($options->{probed_VideoRam} ? "the probed" : "a default") . " value: VideoRam = $card->{VideoRam}");
@@ -229,7 +293,7 @@ sub configure {
my @cards = probe();
@cards or @cards = {};
- if (!$cards[0]{Driver}) {
+ if (!$cards[0]{server} && !$cards[0]{Driver}) {
if ($options->{allowFB}) {
$cards[0]{Driver} = 'fbdev';
} elsif ($auto) {
@@ -246,11 +310,12 @@ sub configure {
xfree_and_glx_choose($in, $card, $auto) or return;
- eval { install_server($card, $options, $do_pkgs) };
- if ($@) {
+ eval {
+ $card->{prog} = install_server($card, $options, $do_pkgs);
+ } or do {
$in->ask_warn('', N("Can't install XFree package: %s", $@));
goto card_config__not_listed;
- }
+ };
if ($card->{needVideoRam} && !$card->{VideoRam}) {
if ($auto) {
@@ -271,12 +336,12 @@ sub configure {
}
sub install_server {
- my ($card, $_options, $do_pkgs) = @_;
+ my ($card, $options, $do_pkgs) = @_;
- my $prog = "$::prefix/usr/X11R6/bin/XFree86";
+ my $prog = server_binary($card);
my @packages;
- push @packages, 'XFree86-server' if ! -x $prog;
+ push @packages, using_xf4($card) ? 'XFree86-server' : "XFree86-$card->{server}" if ! -x "$::prefix$prog";
#- additional packages to install according available card.
#- add XFree86-libs-DRI here if using DRI (future split of XFree86 TODO)
@@ -285,10 +350,17 @@ sub install_server {
push @packages, 'Glide_V3-DRI' if member($card->{card_name}, 'Voodoo3 (generic)', 'Voodoo Banshee (generic)');
push @packages, 'XFree86-glide-module' if $card->{card_name} =~ /Voodoo/;
}
+ if ($card->{use_UTAH_GLX}) {
+ push @packages, 'Mesa';
+ }
+
+ if ($options->{freedriver}) {
+ delete $card->{Driver2};
+ }
my %proprietary_Driver2 = (
- nvidia => [ 'NVIDIA_kernel', 'NVIDIA_GLX' ], #- using NVIDIA driver (TNT, TN2 and GeForce cards only).
- fglrx => [ 'ATI_kernel', 'ATI_GLX' ], #- using ATI fglrx driver (Radeon, Fire GL cards only).
+ nvidia => [ 'nvidia-kernel', 'nvidia' ], #- using NVIDIA driver (TNT, TN2 and GeForce cards only).
+ fglrx => [ 'ati-kernel', 'ati' ], #- using ATI fglrx driver (Radeon, Fire GL cards only).
);
if (my $rpms_needed = $proprietary_Driver2{$card->{Driver2}}) {
if (my $proprietary_packages = $do_pkgs->check_kernel_module_packages($rpms_needed->[0], $rpms_needed->[1])) {
@@ -297,21 +369,33 @@ sub install_server {
}
$do_pkgs->install(@packages) if @packages;
- -x $prog or die "server not available (should be in $prog)";
+ -x "$::prefix$prog" or die "server $card->{server} is not available (should be in $::prefix$prog)";
#- make sure everything is correct at this point, packages have really been installed
#- and driver and GLX extension is present.
if ($card->{Driver2} eq 'nvidia' &&
- -e "$::prefix/usr/X11R6/lib/modules/drivers/nvidia_drv.o" &&
- -l "$::prefix/usr/X11R6/lib/modules/extensions/libglx.so") {
+ -e "$::prefix/usr/X11R6/$lib/modules/drivers/nvidia_drv.o" &&
+ -l "$::prefix/usr/X11R6/$lib/modules/extensions/libglx.so") {
log::l("Using specific NVIDIA driver and GLX extensions");
$card->{Driver} = 'nvidia';
$card->{DRI_GLX_SPECIAL} = 1;
- $card->{Options}{IgnoreEDID} = 1;
+ $card->{Options_xfree4}{IgnoreEDID} = 1;
}
+ my %driver_to_libgl_config = (
+ nvidia => "/etc/ld.so.conf.d/.conf.nvidia",
+ fglrx => "/etc/ld.so.conf.d/.conf.ati",
+ );
+ if (my $file = $driver_to_libgl_config{$card->{Driver2}}) {
+ if (-e $file) {
+ symlinkf($file, "/etc/ld.so.conf.d/GL.conf");
+ }
+ } else {
+ eval { rm_rf("/etc/ld.so.conf.d/GL.conf") };
+ }
+ system("/sbin/ldconfig") if $::isStandalone;
if ($card->{Driver2} eq 'fglrx' &&
- -e "$::prefix/usr/X11R6/lib/modules/dri/fglrx_dri.so" &&
- -e "$::prefix/usr/X11R6/lib/modules/drivers/fglrx_drv.o") {
+ -e "$::prefix/usr/X11R6/$lib/modules/dri/fglrx_dri.so" &&
+ -e "$::prefix/usr/X11R6/$lib/modules/drivers/fglrx_drv.o") {
log::l("Using specific ATI fglrx and DRI drivers");
$card->{Driver} = 'fglrx';
}
@@ -320,6 +404,8 @@ sub install_server {
require Xconfig::proprietary;
Xconfig::proprietary::install_matrox_hal($::prefix);
}
+
+ $prog;
}
sub xfree_and_glx_choose {
@@ -359,6 +445,7 @@ sub multi_head_choices {
map_index { { Screen => $::i, %$_ } } ($_) x ($_->{MULTI_HEAD} || 1);
} @cards;
+ delete $_->{server} foreach @cards; #- XFree 3 doesn't handle multi head (?)
my $card = shift @cards; #- assume good default.
$card->{cards} = \@cards;
$card->{Xinerama} = $_[0];
@@ -378,19 +465,53 @@ sub multi_head_choices {
#- XFree version available, it would be better to parse available package and get version from it.
sub xfree4_version() { '4.3' }
+sub xfree3_version() { '3.3.6' }
sub xfree_and_glx_choices {
my ($card) = @_;
- my @choices = if_($card->{Driver}, { text => N("XFree %s", xfree4_version()), code => sub {} });
+ my $xf3 = if_($card->{server} && !$force_xf4,
+ { text => N("XFree %s", xfree3_version()), code => sub { $card->{prefer_xf3} = 1 } });
+ my $xf4 = if_($card->{Driver},
+ { text => N("XFree %s", xfree4_version()), code => sub { $card->{prefer_xf3} = 0 } });
+
+ #- no XFree3 with multi-head
+ my @choices = grep { $_ } ($card->{cards} ? $xf4 : $card->{prefer_xf3} ? ($xf3, $xf4) : ($xf4, $xf3));
#- no GLX with Xinerama
return @choices if $card->{Xinerama};
+ #- try to figure if 3D acceleration is supported
+ #- by XFree 3.3 but not XFree 4 then ask user to keep XFree 3.3 ?
+ if ($card->{UTAH_GLX} && !$force_xf4) {
+ my $e = { text => N("XFree %s with 3D hardware acceleration", xfree3_version()),
+ code => sub { $card->{prefer_xf3} = 1; $card->{use_UTAH_GLX} = 1 },
+ more_messages => ($card->{Driver} && !$card->{DRI_GLX} ?
+N("Your card can have 3D hardware acceleration support but only with XFree %s.
+Your card is supported by XFree %s which may have a better support in 2D.", xfree3_version(), xfree4_version()) :
+N("Your card can have 3D hardware acceleration support with XFree %s.", xfree3_version())),
+ };
+ $card->{prefer_xf3} ? unshift(@choices, $e) : push(@choices, $e);
+ }
+
+ #- an expert user may want to try to use an EXPERIMENTAL 3D acceleration, currenlty
+ #- this is with Utah GLX and so, it can provide a way of testing.
+ if ($card->{UTAH_GLX_EXPERIMENTAL} && $::expert && !$force_xf4) {
+ push @choices, { text => N("XFree %s with EXPERIMENTAL 3D hardware acceleration", xfree3_version()),
+ code => sub { $card->{prefer_xf3} = 1; $card->{use_UTAH_GLX} = 1 },
+ more_messages => (using_xf4($card) && !$card->{DRI_GLX} ?
+N("Your card can have 3D hardware acceleration support but only with XFree %s,
+NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.
+Your card is supported by XFree %s which may have a better support in 2D.", xfree3_version(), xfree4_version()) :
+N("Your card can have 3D hardware acceleration support with XFree %s,
+NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", xfree3_version())),
+ };
+ }
+
#- ask the expert or any user on second pass user to enable or not hardware acceleration support.
if ($card->{DRI_GLX}) {
unshift @choices, { text => N("XFree %s with 3D hardware acceleration", xfree4_version()),
- code => sub { $card->{use_DRI_GLX} = 1 },
+ code => sub { $card->{prefer_xf3} = 0; $card->{use_DRI_GLX} = 1 },
more_messages => N("Your card can have 3D hardware acceleration support with XFree %s.", xfree4_version()),
};
}
@@ -398,17 +519,36 @@ sub xfree_and_glx_choices {
#- an expert user may want to try to use an EXPERIMENTAL 3D acceleration.
if ($card->{DRI_GLX_EXPERIMENTAL} && $::expert) {
push @choices, { text => N("XFree %s with EXPERIMENTAL 3D hardware acceleration", xfree4_version()),
- code => sub { $card->{use_DRI_GLX} = 1 },
+ code => sub { $card->{prefer_xf3} = 0; $card->{use_DRI_GLX} = 1 },
more_messages => N("Your card can have 3D hardware acceleration support with XFree %s,
NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", xfree4_version()),
};
}
+
+ if (arch() =~ /ppc/ && $ENV{DISPLAY}) {
+ push @choices, { text => N("Xpmac (installation display driver)"), code => sub {
+ #- HACK: re-allowing XFree 3
+ $force_xf4 = 0;
+ $card->{server} = "Xpmac";
+ $card->{prefer_xf3} = 1;
+ } };
+ }
@choices;
}
sub set_glx_restrictions {
my ($card) = @_;
+ #- hack for ATI Mach64 cards where two options should be used if using Utah-GLX.
+ if (member($card->{card_name}, 'ATI Mach64 Utah', 'ATI Rage Mobility')) {
+ $card->{Options_xfree3}{no_font_cache} = undef if $card->{use_UTAH_GLX};
+ $card->{Options_xfree3}{no_pixmap_cache} = undef if $card->{use_UTAH_GLX};
+ }
+ #- hack for SiS cards where an option should be used if using Utah-GLX.
+ if (member($card->{card_name}, 'SiS 6326', 'SiS 630')) {
+ $card->{Options_xfree3}{no_pixmap_cache} = undef if $card->{use_UTAH_GLX};
+ }
+
#- 3D acceleration configuration for XFree 4 using DRI, this is enabled by default
#- but for some there is a need to specify VideoRam (else it won't run).
if ($card->{use_DRI_GLX}) {
@@ -419,7 +559,7 @@ sub set_glx_restrictions {
#- hack for ATI Rage 128 card using a bttv or peripheral with PCI bus mastering exchange
#- AND using DRI at the same time.
if (member($card->{card_name}, 'ATI Rage 128', 'ATI Rage 128 TVout', 'ATI Rage 128 Mobility')) {
- $card->{Options}{UseCCEFor2D} = bool2text(modules::probe_category('multimedia/tv'));
+ $card->{Options_xfree4}{UseCCEFor2D} = bool2text(modules::probe_category('multimedia/tv'));
}
}
@@ -437,15 +577,21 @@ sub add_to_card__using_Cards {
add2hash($card, $cards->{$name});
$card->{BoardName} = $card->{card_name};
+ delete @$card{'server'} if $force_xf4;
+
+ delete @$card{'UTAH_GLX', 'UTAH_GLX_EXPERIMENTAL'}
+ if $force_xf4 || availableRamMB() > 800; #- no Utah GLX if more than 800 Mb (server, or kernel-enterprise, Utha GLX does not work with latest).
+
$card;
}
#- needed for bad cards not restoring cleanly framebuffer, according to which version of XFree are used.
sub check_bad_card {
my ($card) = @_;
- my $bad_card = $card->{BAD_FB_RESTORE};
+ my $bad_card = using_xf4($card) ? $card->{BAD_FB_RESTORE} : $card->{BAD_FB_RESTORE_XF3};
$bad_card ||= $card->{Driver} eq 'i810' || $card->{Driver} eq 'fbdev';
$bad_card ||= member($card->{Driver}, 'nvidia', 'vmware') if !$::isStandalone; #- avoid testing during install at any price.
+ $bad_card ||= $card->{server} =~ /FBDev|Sun/ if !using_xf4($card);
log::l("the graphics card does not like X in framebuffer") if $bad_card;
@@ -470,13 +616,17 @@ sub readCardsDB {
},
LINE => sub { $val =~ s/^\s*//; $card->{raw_LINES} .= "$val\n" },
CHIPSET => sub { $card->{Chipset} = $val },
+ SERVER => sub { $card->{server} = $val },
DRIVER => sub { $card->{Driver} = $val },
DRIVER2 => sub { $card->{Driver2} = $val },
NEEDVIDEORAM => sub { $card->{needVideoRam} = 1 },
DRI_GLX => sub { $card->{DRI_GLX} = 1 if $card->{Driver} },
+ UTAH_GLX => sub { $card->{UTAH_GLX} = 1 if $card->{server} },
DRI_GLX_EXPERIMENTAL => sub { $card->{DRI_GLX_EXPERIMENTAL} = 1 if $card->{Driver} },
+ UTAH_GLX_EXPERIMENTAL => sub { $card->{UTAH_GLX_EXPERIMENTAL} = 1 if $card->{server} },
MULTI_HEAD => sub { $card->{MULTI_HEAD} = $val if $card->{Driver} },
BAD_FB_RESTORE => sub { $card->{BAD_FB_RESTORE} = 1 },
+ BAD_FB_RESTORE_XF3 => sub { $card->{BAD_FB_RESTORE_XF3} = 1 },
FB_TVOUT => sub { $card->{FB_TVOUT} = 1 },
UNSUPPORTED => sub { delete $card->{Driver} },