summaryrefslogtreecommitdiff
path: root/config/chroot_local-includes/usr/share/initramfs-tools/scripts/init-top/pcidetect
blob: 743c4a47177c51ec2dbf06130df19180238324bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh

PREREQ=""

prereqs()
{
        echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
        prereqs
        exit 0
        ;;
esac

if [ "$gfx" = "auto" -o "$gfx" = "on" ]; then
lspci -n | while read x class card x
do
 VENDOR=${card%:*}
 DEVICE=${card#*:}
 case $class in
 0300:)
  case $VENDOR in
  1002)
   case $DEVICE in
   6700|6701|6702|6703|6704|6705|6706|6707|6708|6709|6718|6719|671c|671d|6720|6721|6722|6723|6724|6725|6726|6727|6728|6729|6738|6739|6740|6741|6742|6743|6744|6745|6746|6747|6748|6749|6750|6758|6759|6760|6761|6762|6763|6764|6765|6766|6767|6768|6770|6779|6880|6888|6889|688a|688c|688d|6890|6898|6899|689c|689d|689e|68a0|68a1|68a8|68a9|68b0|68b1|68b8|68b9|68ba|68be|68bf|68c0|68c1|68c7|68c8|68c9|68d0|68d1|68d8|68d9|68da|68de|68e0|68e1|68e4|68e5|68e8|68e9|68f0|68f1|68f2|68f8|68f9|68fe|9400|9401|9402|9403|9405|940a|940b|940f|9440|9441|9442|9443|9444|9446|9447|944a|944b|944c|944e|944f|9450|9451|9452|9456|945a|945b|945e|9460|9462|946a|946b|947a|947b|9480|9487|9488|9489|948a|948f|9490|9491|9495|9498|949c|949e|949f|94a0|94a1|94a3|94b1|94b3|94b4|94b5|94c0|94c1|94c3|94c4|94c5|94c6|94c7|94c8|94c9|94cb|94cc|9500|9501|9504|9505|9506|9507|9508|9509|950f|9511|9513|9515|9517|9519|9540|9541|9542|954e|954f|9552|9553|9555|9557|955f|9580|9581|9583|9586|9587|9588|9589|958a|958b|958c|958d|958e|958f|9590|9591|9593|9595|9596|9597|9598|9599|959b|95c0|95c2|95c4|95c5|95c6|95c7|95c9|95cc|95cd|95ce|95cf|9610|9611|9612|9613|9614|9615|9616|9640|9641|9642|9643|9644|9645|9647|9648|9649|964a|964b|964c|964e|964f|9710|9711|9712|9713|9714|9715|9802|9803|9804|9805)
    echo "blacklist radeon" >> /etc/modprobe.d/pcidetect.conf
    echo "fglrx" > /etc/gfxoverlay
    break
    ;;
   esac
   ;;
  10de|12d2)
   case $DEVICE in
   0008|0009|0010|0018|0019) continue;;
   0020|0028|0029|002c|002d|00a0|0100|0101|0103|0150|0151|0152|0153) continue;;
   0110|0111|0112|0113|0170|0171|0172|0173|0174|0175|0176|0177|0178|0179|017a|017c|017d|0181|0182|0183|0185|0188|018a|018b|018c|01a0|01f0|0200|0201|0202|0203|0250|0251|0253|0258|0259|025b|0280|0281|0282|0286|0288|0289|028c) continue;;
   00fa|00fb|00fc|00fd|00fe|0301|0302|0308|0309|0311|0312|0314|031a|031b|031c|0320|0321|0322|0323|0324|0325|0326|0327|0328|032a|032b|032c|032d|0330|0331|0332|0333|0334|0338|033f|0341|0342|0343|0344|0347|0348|034c|034e) continue;;
   *)
    echo "blacklist nouveau" >> /etc/modprobe.d/pcidetect.conf
    echo "nvidia" > /etc/gfxoverlay
    break
    ;;
   esac
   ;;
  esac
 ;;
 esac
done
fi