Files
xsrc/xfree/xc/programs/Xserver/hw/xfree86/getconfig/cfg.sample
T

158 lines
4.8 KiB
Plaintext

#
# Copyright 2003-2005 by David H. Dawes.
# Copyright 2003-2005 by X-Oz Technologies.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions, and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# 3. The end-user documentation included with the redistribution,
# if any, must include the following acknowledgment: "This product
# includes software developed by X-Oz Technologies
# (http://www.x-oz.com/)." Alternately, this acknowledgment may
# appear in the software itself, if and wherever such third-party
# acknowledgments normally appear.
#
# 4. Except as contained in this notice, the name of X-Oz
# Technologies shall not be used in advertising or otherwise to
# promote the sale, use or other dealings in this Software without
# prior written authorization from X-Oz Technologies.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL X-OZ TECHNOLOGIES OR ITS CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Author: David Dawes <dawes@XFree86.Org>.
#
# $XFree86: xc/programs/Xserver/hw/xfree86/getconfig/cfg.sample,v 1.3 2005/02/01 00:01:16 dawes Exp $
# Some sample XFree86 getconfig rules file.
#
# The line below is the getconfig rules file signature, and must be the
# first non-blank, non-comment line.
#
XFree86 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
# $XFree86Version XFree86 version, as a 'v' string.
#
# The XFree86 version information is also available as the following:
#
# $XFree86VersionNumeric
# $XFree86VersionMajor
# $XFree86VersionMinor
# $XFree86VersionPatch
# $XFree86VersionSnap
#
# 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 XFree86 version is 4.3 or
# higher.
$weight++ if ($XFree86Version ge &vstr(4,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 && $XFree86Version eq &vstr(4,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"