~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/xfree86/getconfig/cfg.sample

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $DHD: xc/programs/Xserver/hw/xfree86/getconfig/cfg.sample,v 1.2 2003/09/23 05:12:07 dawes Exp $
 
2
 
 
3
# Some sample Xorg getconfig rules file.
 
4
 
 
5
#
 
6
# The line below is the getconfig rules file signature, and must be the
 
7
# first non-blank, non-comment line.
 
8
#
 
9
 
 
10
Xorg Project getconfig rules file.  Version: 1.0
 
11
 
 
12
#
 
13
# Set the weight for the following rules.  This should be set, otherwise
 
14
# the previously set weight will get used, and you have no idea of knowing
 
15
# what that might be.
 
16
#
 
17
 
 
18
$weight = 1000
 
19
 
 
20
#
 
21
# Rules.  Rules consist of a condition (in perl code) followed by
 
22
# a driver name and optionally some additional strings.  The start of a
 
23
# rule is indicated by a line with no leading white space.  Subsequent
 
24
# lines making up a rule must be indented.  Logical lines may be split
 
25
# over multiple physical lines by using the usual continuation '\'.
 
26
#
 
27
# Rules that are not followed by a driver name may be used to do other
 
28
# things, like setting the weight as above.
 
29
#
 
30
 
 
31
#
 
32
# Pre-defined variables include:
 
33
#
 
34
#   $vendor             PCI vendor ID
 
35
#   $device             PCI device ID
 
36
#   $revision           PCI revision ID
 
37
#   $subsys             PCI subsystem ID
 
38
#   $subsysVendor       PCI subsystem vendor ID
 
39
#   $class              PCI class
 
40
#   $XorgVersion        Xorg version, as a 'v' string.
 
41
#
 
42
# The Xorg version information is also available as the following:
 
43
#
 
44
#   $XorgVersionNumeric
 
45
#   $XorgVersionMajor
 
46
#   $XorgVersionMinor
 
47
#   $XorgVersionPatch
 
48
#   $XorgVersionSnap
 
49
#   
 
50
 
 
51
# Define a fake vendor ID for some sample rules.
 
52
 
 
53
$novendor = 0x10000
 
54
$nodevice = 0x10000
 
55
 
 
56
$vendor == $novendor
 
57
        nodriver
 
58
        Option "xx"
 
59
        Videoram 1000
 
60
 
 
61
# A rule with continued lines.
 
62
 
 
63
$vendor == $novendor && \
 
64
$device == $nodevice 
 
65
        nodriver2
 
66
        Option \
 
67
        "yy"
 
68
 
 
69
# Increase the weight of the following rules if the Xorg version is 4.3 or
 
70
# higher.
 
71
 
 
72
$weight++ if ($XorgVersion ge v4.3)
 
73
 
 
74
$vendor == $novendor
 
75
        nodriver
 
76
        Option "yy"
 
77
 
 
78
#
 
79
# The weight can be changed at any times, and applies to rules that follow
 
80
# until changed again.
 
81
#
 
82
 
 
83
$weight = 100
 
84
 
 
85
$vendor == $novendor && $XorgVersion eq v4.3.2.1
 
86
        nodriver3
 
87
 
 
88
$weight = 600
 
89
 
 
90
#
 
91
# The following two examples use some real values.
 
92
#
 
93
 
 
94
# Example: make the default depth 24 for Radeon R200 and RV200 cards.
 
95
 
 
96
$vendor == 0x1002 && \
 
97
    ($device >= 0x5148 && $device <= 0x514F || \
 
98
     $device >= 0x5168 && $device <= 0x516C || \
 
99
     $device == 0x4242 || \
 
100
     $device >= 0x5157 && device <= 0x5158)
 
101
        ati
 
102
        Option "DefaultDepth" "24"
 
103
 
 
104
 
 
105
# Example: enable DRI for MGA G400
 
106
 
 
107
$vendor == 0x102b && $device == 0x0525
 
108
        mga
 
109
        Option "dri"
 
110