From 8e94f3ad67536c26a4ba19aa4da5a5b8a3609386 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 30 Jan 2008 14:50:25 +0000 Subject: * First attempt at detecting services.xserver.videoDriver. svn path=/nixos/trunk/; revision=10408 --- installer/nixos-hardware-scan.pl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'installer/nixos-hardware-scan.pl') diff --git a/installer/nixos-hardware-scan.pl b/installer/nixos-hardware-scan.pl index 4c704862ae8..e96b5b44ee4 100644 --- a/installer/nixos-hardware-scan.pl +++ b/installer/nixos-hardware-scan.pl @@ -51,6 +51,7 @@ push @kernelModules, "kvm-amd" if hasCPUFeature "svm"; # However, some are needed in the initrd to boot the system. my $enableIntel2200BGFirmware = "false"; +my $videoDriver = "vesa"; sub pciCheck { my $path = shift; @@ -92,6 +93,26 @@ sub pciCheck { $enableIntel2200BGFirmware = "true" if $vendor eq "0x8086" && ($device eq "0x1043" || $device eq "0x104f" || $device eq "0x4220" || $device eq "0x4221" || $device eq "0x4223" || $device eq "0x4224"); + + # Hm, can we extract the PCI ids supported by X drivers somehow? + # cf. http://www.calel.org/pci-devices/xorg-device-list.html + $videoDriver = "i810" if $vendor eq "0x8086" && + ($device eq "0x1132" || + $device eq "0x2572" || + $device eq "0x2592" || + $device eq "0x2772" || + $device eq "0x2776" || + $device eq "0x2782" || + $device eq "0x2792" || + $device eq "0x2792" || + $device eq "0x27a2" || + $device eq "0x27a6" || + $device eq "0x3582" || + $device eq "0x7121" || + $device eq "0x7123" || + $device eq "0x7125" || + $device eq "0x7128" + ); } foreach my $path (glob "/sys/bus/pci/devices/*") { @@ -184,5 +205,13 @@ print <