summaryrefslogtreecommitdiff
path: root/hw/xfree86/getconfig/cfg.sample
blob: 8e26fd2e3cb932868a872100a16b173cdcd621c1 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# $XdotOrg$

# Some sample Xorg getconfig rules file.

#
# The line below is the getconfig rules file signature, and must be the
# first non-blank, non-comment line.
#

Xorg Project getconfig rules file.  Version: 1.0

#
# Set the weight for the following rules.  This should be set, otherwise
# the previously set weight will get used, and you have no idea of knowing
# what that might be.
#

$weight = 1000

#
# Rules.  Rules consist of a condition (in perl code) followed by
# a driver name and optionally some additional strings.  The start of a
# rule is indicated by a line with no leading white space.  Subsequent
# lines making up a rule must be indented.  Logical lines may be split
# over multiple physical lines by using the usual continuation '\'.
#
# Rules that are not followed by a driver name may be used to do other
# things, like setting the weight as above.
#

#
# Pre-defined variables include:
#
#   $vendor		PCI vendor ID
#   $device		PCI device ID
#   $revision		PCI revision ID
#   $subsys		PCI subsystem ID
#   $subsysVendor	PCI subsystem vendor ID
#   $class		PCI class
#   $XorgVersion	Xorg version, as a 'v' string.
#
# The Xorg version information is also available as the following:
#
#   $XorgVersionNumeric
#   $XorgVersionMajor
#   $XorgVersionMinor
#   $XorgVersionPatch
#   $XorgVersionSnap
#   

# Define a fake vendor ID for some sample rules.

$novendor = 0x10000
$nodevice = 0x10000

$vendor == $novendor
	nodriver
	Option "xx"
	Videoram 1000

# A rule with continued lines.

$vendor == $novendor && \
$device == $nodevice 
	nodriver2
	Option \
	"yy"

# Increase the weight of the following rules if the Xorg version is 4.3 or
# higher.

$weight++ if ($XorgVersion ge v4.3)

$vendor == $novendor
	nodriver
	Option "yy"

#
# The weight can be changed at any times, and applies to rules that follow
# until changed again.
#

$weight = 100

$vendor == $novendor && $XorgVersion eq v4.3.2.1
	nodriver3

$weight = 600

#
# The following two examples use some real values.
#

# Example: make the default depth 24 for Radeon R200 and RV200 cards.

$vendor == 0x1002 && \
    ($device >= 0x5148 && $device <= 0x514F || \
     $device >= 0x5168 && $device <= 0x516C || \
     $device == 0x4242 || \
     $device >= 0x5157 && device <= 0x5158)
	ati
	Option "DefaultDepth" "24"


# Example: enable DRI for MGA G400

$vendor == 0x102b && $device == 0x0525
	mga
	Option "dri"