aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-08 09:33:13 +0200
committermarha <marha@users.sourceforge.net>2012-06-08 09:33:13 +0200
commit990bc3f015a4f8fce2eb918375defcd44980a845 (patch)
tree8e8301f19482b52cc00bd95b4593522cc93267af /xorg-server/hw/xfree86/common
parent1af6fc1b5d93e54d6674de8b5870448b29f139a7 (diff)
downloadvcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.tar.gz
vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.tar.bz2
vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.zip
Used synchronise script to update files
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/.gitignore3
-rw-r--r--xorg-server/hw/xfree86/common/extramodes54
-rw-r--r--xorg-server/hw/xfree86/common/modeline2c.awk186
-rw-r--r--xorg-server/hw/xfree86/common/vesamodes222
-rw-r--r--xorg-server/hw/xfree86/common/xf86.h10
-rw-r--r--xorg-server/hw/xfree86/common/xf86Build.h.in4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.c7
-rw-r--r--xorg-server/hw/xfree86/common/xf86Cursor.c13
-rw-r--r--xorg-server/hw/xfree86/common/xf86DGA.c20
-rw-r--r--xorg-server/hw/xfree86/common/xf86DPMS.c14
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c12
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c23
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Mode.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Module.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86PM.c14
-rw-r--r--xorg-server/hw/xfree86/common/xf86Priv.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86RandR.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiter.c54
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h26
-rw-r--r--xorg-server/hw/xfree86/common/xf86VidMode.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86cmap.c50
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbman.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86sbusBus.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86str.h24
-rw-r--r--xorg-server/hw/xfree86/common/xf86xv.c35
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvmc.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvpriv.h6
28 files changed, 401 insertions, 416 deletions
diff --git a/xorg-server/hw/xfree86/common/.gitignore b/xorg-server/hw/xfree86/common/.gitignore
new file mode 100644
index 000000000..3262e2f37
--- /dev/null
+++ b/xorg-server/hw/xfree86/common/.gitignore
@@ -0,0 +1,3 @@
+# Add & Override for this directory and it's subdirectories
+xf86Build.h
+xf86DefModeSet.c
diff --git a/xorg-server/hw/xfree86/common/extramodes b/xorg-server/hw/xfree86/common/extramodes
index 450502670..fdabb709a 100644
--- a/xorg-server/hw/xfree86/common/extramodes
+++ b/xorg-server/hw/xfree86/common/extramodes
@@ -1,27 +1,27 @@
-//
-// Extra modes to include as default modes in the X server.
-//
-// $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $
-//
-
-# 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz
-ModeLine "832x624" 57.284 832 864 928 1152 624 625 628 667 -Hsync -Vsync
-
-# 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz
-ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
-
-# 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
-ModeLine "1400x1050" 155.8 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync
-
-# 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz
-Modeline "1920x1440" 341.35 1920 2072 2288 2656 1440 1441 1444 1512 -hsync +vsync
-
-# 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz
-Modeline "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -hsync +vsync
-
-# 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz
-Modeline "2048x1536" 340.48 2048 2216 2440 2832 1536 1537 1540 1603 -hsync +vsync
-
-# 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz
-Modeline "2048x1536" 388.04 2048 2216 2440 2832 1536 1537 1540 1612 -hsync +vsync
-
+//
+// Extra modes to include as default modes in the X server.
+//
+// $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $
+//
+
+# 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz
+ModeLine "832x624" 57.284 832 864 928 1152 624 625 628 667 -Hsync -Vsync
+
+# 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz
+ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
+
+# 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
+ModeLine "1400x1050" 155.8 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync
+
+# 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz
+Modeline "1920x1440" 341.35 1920 2072 2288 2656 1440 1441 1444 1512 -hsync +vsync
+
+# 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz
+Modeline "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -hsync +vsync
+
+# 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz
+Modeline "2048x1536" 340.48 2048 2216 2440 2832 1536 1537 1540 1603 -hsync +vsync
+
+# 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz
+Modeline "2048x1536" 388.04 2048 2216 2440 2832 1536 1537 1540 1612 -hsync +vsync
+
diff --git a/xorg-server/hw/xfree86/common/modeline2c.awk b/xorg-server/hw/xfree86/common/modeline2c.awk
index 038e7e935..a85d36c58 100644
--- a/xorg-server/hw/xfree86/common/modeline2c.awk
+++ b/xorg-server/hw/xfree86/common/modeline2c.awk
@@ -1,93 +1,93 @@
-#!/usr/bin/awk -f
-#
-# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
-# All rights reserved.
-#
-# Based on Perl script by Dirk Hohndel.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# ``AS IS'' AND ANY EXPRESS 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 THE
-# COPYRIGHT HOLDERS OR 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.
-#
-# Usage: modeline2c.awk < modefile > xf86DefModeSet.c
-#
-
-BEGIN {
- flagsdict[""] = "0"
-
- flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC"
- flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC"
- flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC"
- flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC"
- flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE"
- flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE"
- flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE"
- flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE"
-
- print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at"
- print " * modeline2c.awk */"
- print ""
- print "/*"
- print " * Author: Joerg Sonnenberger <joerg@NetBSD.org>"
- print " * Based on Perl script from Dirk Hohndel <hohndel@XFree86.Org>"
- print " */"
- print ""
- print "#ifdef HAVE_XORG_CONFIG_H"
- print "#include <xorg-config.h>"
- print "#endif"
- print ""
- print "#include \"xf86.h\""
- print "#include \"xf86Config.h\""
- print "#include \"xf86Priv.h\""
- print "#include \"xf86_OSlib.h\""
- print ""
- print "#include \"globals.h\""
- print ""
- print "#define MODEPREFIX NULL, NULL, NULL, MODE_OK, M_T_DEFAULT"
- print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
- print ""
- print "const DisplayModeRec xf86DefaultModes [] = {"
-
- modeline = "\t{MODEPREFIX,%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
- modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+"
-}
-
-/^[mM][oO][dD][eE][lL][iI][nN][eE]/ {
- flags = $0
- gsub(modeline_data, "", flags)
- flags = tolower(flags)
- printf(modeline, $3 * 1000, $4, $5, $6, $7,
- $8, $9, $10, $11, flagsdict[flags])
- # Half-width double scanned modes
- printf(modeline, $3 * 500, $4/2, $5/2, $6/2, $7/2,
- $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN")
-}
-
-/^#/ {
- print "/*" substr($0, 2) " */"
-}
-
-END {
- print "};"
- printf "const int xf86NumDefaultModes = sizeof(xf86DefaultModes) / sizeof(DisplayModeRec);"
-}
+#!/usr/bin/awk -f
+#
+# Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
+# All rights reserved.
+#
+# Based on Perl script by Dirk Hohndel.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS 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 THE
+# COPYRIGHT HOLDERS OR 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.
+#
+# Usage: modeline2c.awk < modefile > xf86DefModeSet.c
+#
+
+BEGIN {
+ flagsdict[""] = "0"
+
+ flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC"
+ flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC"
+ flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC"
+ flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC"
+ flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE"
+ flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE"
+ flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE"
+ flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE"
+
+ print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at"
+ print " * modeline2c.awk */"
+ print ""
+ print "/*"
+ print " * Author: Joerg Sonnenberger <joerg@NetBSD.org>"
+ print " * Based on Perl script from Dirk Hohndel <hohndel@XFree86.Org>"
+ print " */"
+ print ""
+ print "#ifdef HAVE_XORG_CONFIG_H"
+ print "#include <xorg-config.h>"
+ print "#endif"
+ print ""
+ print "#include \"xf86.h\""
+ print "#include \"xf86Config.h\""
+ print "#include \"xf86Priv.h\""
+ print "#include \"xf86_OSlib.h\""
+ print ""
+ print "#include \"globals.h\""
+ print ""
+ print "#define MODEPREFIX NULL, NULL, NULL, MODE_OK, M_T_DEFAULT"
+ print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0"
+ print ""
+ print "const DisplayModeRec xf86DefaultModes [] = {"
+
+ modeline = "\t{MODEPREFIX,%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n"
+ modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+"
+}
+
+/^[mM][oO][dD][eE][lL][iI][nN][eE]/ {
+ flags = $0
+ gsub(modeline_data, "", flags)
+ flags = tolower(flags)
+ printf(modeline, $3 * 1000, $4, $5, $6, $7,
+ $8, $9, $10, $11, flagsdict[flags])
+ # Half-width double scanned modes
+ printf(modeline, $3 * 500, $4/2, $5/2, $6/2, $7/2,
+ $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN")
+}
+
+/^#/ {
+ print "/*" substr($0, 2) " */"
+}
+
+END {
+ print "};"
+ printf "const int xf86NumDefaultModes = sizeof(xf86DefaultModes) / sizeof(DisplayModeRec);"
+}
diff --git a/xorg-server/hw/xfree86/common/vesamodes b/xorg-server/hw/xfree86/common/vesamodes
index 2bc886276..6644ee6ae 100644
--- a/xorg-server/hw/xfree86/common/vesamodes
+++ b/xorg-server/hw/xfree86/common/vesamodes
@@ -1,111 +1,111 @@
-//
-// Default modes distilled from
-// "VESA and Industry Standards and Guide for Computer Display Monitor
-// Timing", version 1.0, revision 0.8, adopted September 17, 1998.
-//
-// $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.3 1999/11/16 03:28:03 tsi Exp $
-
-
-# 640x350 @ 85Hz (VESA) hsync: 37.9kHz
-ModeLine "640x350" 31.5 640 672 736 832 350 382 385 445 +hsync -vsync
-
-# 640x400 @ 85Hz (VESA) hsync: 37.9kHz
-ModeLine "640x400" 31.5 640 672 736 832 400 401 404 445 -hsync +vsync
-
-# 720x400 @ 85Hz (VESA) hsync: 37.9kHz
-ModeLine "720x400" 35.5 720 756 828 936 400 401 404 446 -hsync +vsync
-
-# 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
-ModeLine "640x480" 25.175 640 656 752 800 480 490 492 525 -hsync -vsync
-
-# 640x480 @ 72Hz (VESA) hsync: 37.9kHz
-ModeLine "640x480" 31.5 640 664 704 832 480 489 492 520 -hsync -vsync
-
-# 640x480 @ 75Hz (VESA) hsync: 37.5kHz
-ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
-
-# 640x480 @ 85Hz (VESA) hsync: 43.3kHz
-ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
-
-# 800x600 @ 56Hz (VESA) hsync: 35.2kHz
-ModeLine "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
-
-# 800x600 @ 60Hz (VESA) hsync: 37.9kHz
-ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
-
-# 800x600 @ 72Hz (VESA) hsync: 48.1kHz
-ModeLine "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
-
-# 800x600 @ 75Hz (VESA) hsync: 46.9kHz
-ModeLine "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
-
-# 800x600 @ 85Hz (VESA) hsync: 53.7kHz
-ModeLine "800x600" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync
-
-# 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz
-ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace
-
-# 1024x768 @ 60Hz (VESA) hsync: 48.4kHz
-ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
-
-# 1024x768 @ 70Hz (VESA) hsync: 56.5kHz
-ModeLine "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
-
-# 1024x768 @ 75Hz (VESA) hsync: 60.0kHz
-ModeLine "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
-
-# 1024x768 @ 85Hz (VESA) hsync: 68.7kHz
-ModeLine "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
-
-# 1152x864 @ 75Hz (VESA) hsync: 67.5kHz
-ModeLine "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
-
-# 1280x960 @ 60Hz (VESA) hsync: 60.0kHz
-ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync
-
-# 1280x960 @ 85Hz (VESA) hsync: 85.9kHz
-ModeLine "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync
-
-# 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz
-ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
-
-# 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz
-ModeLine "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
-
-# 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz
-ModeLine "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync
-
-# 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz
-ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz
-ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz
-ModeLine "1600x1200" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz
-ModeLine "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz
-ModeLine "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
-
-# 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz
-ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync
-
-# 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz
-ModeLine "1792x1344" 261.0 1792 1888 2104 2456 1344 1345 1348 1417 -hsync +vsync
-
-# 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz
-ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync
-
-# 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz
-ModeLine "1856x1392" 288.0 1856 1984 2208 2560 1392 1393 1396 1500 -hsync +vsync
-
-# 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz
-ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync
-
-# 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz
-ModeLine "1920x1440" 297.0 1920 2064 2288 2640 1440 1441 1444 1500 -hsync +vsync
-
-
+//
+// Default modes distilled from
+// "VESA and Industry Standards and Guide for Computer Display Monitor
+// Timing", version 1.0, revision 0.8, adopted September 17, 1998.
+//
+// $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.3 1999/11/16 03:28:03 tsi Exp $
+
+
+# 640x350 @ 85Hz (VESA) hsync: 37.9kHz
+ModeLine "640x350" 31.5 640 672 736 832 350 382 385 445 +hsync -vsync
+
+# 640x400 @ 85Hz (VESA) hsync: 37.9kHz
+ModeLine "640x400" 31.5 640 672 736 832 400 401 404 445 -hsync +vsync
+
+# 720x400 @ 85Hz (VESA) hsync: 37.9kHz
+ModeLine "720x400" 35.5 720 756 828 936 400 401 404 446 -hsync +vsync
+
+# 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
+ModeLine "640x480" 25.175 640 656 752 800 480 490 492 525 -hsync -vsync
+
+# 640x480 @ 72Hz (VESA) hsync: 37.9kHz
+ModeLine "640x480" 31.5 640 664 704 832 480 489 492 520 -hsync -vsync
+
+# 640x480 @ 75Hz (VESA) hsync: 37.5kHz
+ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
+
+# 640x480 @ 85Hz (VESA) hsync: 43.3kHz
+ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
+
+# 800x600 @ 56Hz (VESA) hsync: 35.2kHz
+ModeLine "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
+
+# 800x600 @ 60Hz (VESA) hsync: 37.9kHz
+ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
+
+# 800x600 @ 72Hz (VESA) hsync: 48.1kHz
+ModeLine "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
+
+# 800x600 @ 75Hz (VESA) hsync: 46.9kHz
+ModeLine "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
+
+# 800x600 @ 85Hz (VESA) hsync: 53.7kHz
+ModeLine "800x600" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync
+
+# 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz
+ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace
+
+# 1024x768 @ 60Hz (VESA) hsync: 48.4kHz
+ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
+
+# 1024x768 @ 70Hz (VESA) hsync: 56.5kHz
+ModeLine "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
+
+# 1024x768 @ 75Hz (VESA) hsync: 60.0kHz
+ModeLine "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
+
+# 1024x768 @ 85Hz (VESA) hsync: 68.7kHz
+ModeLine "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
+
+# 1152x864 @ 75Hz (VESA) hsync: 67.5kHz
+ModeLine "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
+
+# 1280x960 @ 60Hz (VESA) hsync: 60.0kHz
+ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync
+
+# 1280x960 @ 85Hz (VESA) hsync: 85.9kHz
+ModeLine "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync
+
+# 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz
+ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
+
+# 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz
+ModeLine "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
+
+# 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz
+ModeLine "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync
+
+# 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz
+ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz
+ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz
+ModeLine "1600x1200" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz
+ModeLine "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz
+ModeLine "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
+
+# 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz
+ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync
+
+# 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz
+ModeLine "1792x1344" 261.0 1792 1888 2104 2456 1344 1345 1348 1417 -hsync +vsync
+
+# 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz
+ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync
+
+# 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz
+ModeLine "1856x1392" 288.0 1856 1984 2208 2560 1392 1393 1396 1500 -hsync +vsync
+
+# 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz
+ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync
+
+# 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz
+ModeLine "1920x1440" 297.0 1920 2064 2288 2640 1440 1441 1444 1500 -hsync +vsync
+
+
diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h
index 0eb000d41..129660d81 100644
--- a/xorg-server/hw/xfree86/common/xf86.h
+++ b/xorg-server/hw/xfree86/common/xf86.h
@@ -244,7 +244,7 @@ extern _X_EXPORT void xf86AddDriver(DriverPtr driver, pointer module,
int flags);
extern _X_EXPORT void xf86DeleteDriver(int drvIndex);
extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
-extern _X_EXPORT void xf86DeleteScreen(int scrnIndex, int flags);
+extern _X_EXPORT void xf86DeleteScreen(ScrnInfoPtr pScrn);
extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void);
extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp,
int pad);
@@ -256,7 +256,7 @@ extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma);
extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y);
extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen);
-extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable);
+extern _X_EXPORT void xf86EnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable);
extern _X_EXPORT void
xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
const char *format, va_list args)
@@ -347,7 +347,7 @@ xf86SetBackingStore(ScreenPtr pScreen);
extern _X_EXPORT void
xf86SetSilkenMouse(ScreenPtr pScreen);
extern _X_EXPORT pointer
-xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name,
+xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, char *port_name,
char **adaptor_name, pointer *adaptor_options);
extern _X_EXPORT void
xf86GetOS(const char **name, int *major, int *minor, int *teeny);
@@ -357,7 +357,7 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
EntityProc enter, EntityProc leave, pointer private);
extern _X_EXPORT Bool
-xf86IsScreenPrimary(int scrnIndex);
+xf86IsScreenPrimary(ScrnInfoPtr pScrn);
extern _X_EXPORT int
xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
int format, unsigned long len, pointer value);
@@ -458,4 +458,6 @@ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
#define XF86_HAS_SCRN_CONV 1 /* define for drivers to use in api compat */
+#define XF86_SCRN_INTERFACE 1 /* define for drivers to use in api compat */
+
#endif /* _XF86_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Build.h.in b/xorg-server/hw/xfree86/common/xf86Build.h.in
index a4f56b0ae..f4af80637 100644
--- a/xorg-server/hw/xfree86/common/xf86Build.h.in
+++ b/xorg-server/hw/xfree86/common/xf86Build.h.in
@@ -1,2 +1,2 @@
-#define BUILD_DATE @BUILD_DATE@
-#define BUILD_TIME @BUILD_TIME@
+#define BUILD_DATE @BUILD_DATE@
+#define BUILD_TIME @BUILD_TIME@
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c
index b8764344b..6c86f5e26 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.c
+++ b/xorg-server/hw/xfree86/common/xf86Bus.c
@@ -179,7 +179,7 @@ xf86BusConfig(void)
xf86Msg(X_ERROR,
"Screen %d deleted because of no matching config section.\n",
i);
- xf86DeleteScreen(i--, 0);
+ xf86DeleteScreen(xf86Screens[i--]);
}
}
@@ -377,13 +377,12 @@ xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex)
}
/*
- * xf86ClearEntitiesForScreen() - called when a screen is deleted
+ * xf86ClearEntityListForScreen() - called when a screen is deleted
* to mark it's entities unused. Called by xf86DeleteScreen().
*/
void
-xf86ClearEntityListForScreen(int scrnIndex)
+xf86ClearEntityListForScreen(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
int i, entityIndex;
if (pScrn->entityList == NULL || pScrn->numEntities == 0)
diff --git a/xorg-server/hw/xfree86/common/xf86Cursor.c b/xorg-server/hw/xfree86/common/xf86Cursor.c
index 61cae6aa7..c01cfd138 100644
--- a/xorg-server/hw/xfree86/common/xf86Cursor.c
+++ b/xorg-server/hw/xfree86/common/xf86Cursor.c
@@ -66,7 +66,7 @@ static Bool xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y);
static void xf86CrossScreen(ScreenPtr pScreen, Bool entering);
static void xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
-static void xf86PointerMoved(int scrnIndex, int x, int y);
+static void xf86PointerMoved(ScrnInfoPtr pScrn, int x, int y);
static miPointerScreenFuncRec xf86PointerScreenFuncs = {
xf86CursorOffScreen,
@@ -135,14 +135,13 @@ xf86SetViewport(ScreenPtr pScreen, int x, int y)
{
ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen);
- (*pScr->PointerMoved) (pScreen->myNum, x, y);
+ (*pScr->PointerMoved) (pScr, x, y);
}
static void
-xf86PointerMoved(int scrnIndex, int x, int y)
+xf86PointerMoved(ScrnInfoPtr pScr, int x, int y)
{
Bool frameChanged = FALSE;
- ScrnInfoPtr pScr = xf86Screens[scrnIndex];
/*
* check wether (x,y) belongs to the visual part of the screen
@@ -173,7 +172,7 @@ xf86PointerMoved(int scrnIndex, int x, int y)
}
if (frameChanged && pScr->AdjustFrame != NULL)
- pScr->AdjustFrame(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
+ pScr->AdjustFrame(pScr, pScr->frameX0, pScr->frameY0);
}
/*
@@ -230,7 +229,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
miPointerGetPosition(dev, &px, &py);
was_blocked = xf86BlockSIGIO();
- Switched = (*pScr->SwitchMode) (pScr->scrnIndex, mode, 0);
+ Switched = (*pScr->SwitchMode) (pScr, mode);
if (Switched) {
pScr->currentMode = mode;
@@ -271,7 +270,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
xf86UnblockSIGIO(was_blocked);
if (pScr->AdjustFrame)
- (*pScr->AdjustFrame) (pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
+ (*pScr->AdjustFrame) (pScr, pScr->frameX0, pScr->frameY0);
/* The original code centered the frame around the cursor if possible.
* Since this is hard to achieve with multiple cursors, we do the following:
diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c
index e0314d86e..64163721f 100644
--- a/xorg-server/hw/xfree86/common/xf86DGA.c
+++ b/xorg-server/hw/xfree86/common/xf86DGA.c
@@ -56,7 +56,7 @@ static DevPrivateKeyRec DGAScreenKeyRec;
#define DGAScreenKeyRegistered dixPrivateKeyRegistered(&DGAScreenKeyRec)
static Bool mieq_installed;
-static Bool DGACloseScreen(int i, ScreenPtr pScreen);
+static Bool DGACloseScreen(ScreenPtr pScreen);
static void DGADestroyColormap(ColormapPtr pmap);
static void DGAInstallColormap(ColormapPtr pmap);
static void DGAUninstallColormap(ColormapPtr pmap);
@@ -235,7 +235,7 @@ FreeMarkedVisuals(ScreenPtr pScreen)
}
static Bool
-DGACloseScreen(int i, ScreenPtr pScreen)
+DGACloseScreen(ScreenPtr pScreen)
{
DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
@@ -256,7 +256,7 @@ DGACloseScreen(int i, ScreenPtr pScreen)
free(pScreenPriv);
- return ((*pScreen->CloseScreen) (i, pScreen));
+ return ((*pScreen->CloseScreen) (pScreen));
}
static void
@@ -323,11 +323,10 @@ DGAUninstallColormap(ColormapPtr pmap)
}
int
-xf86SetDGAMode(int index, int num, DGADevicePtr devRet)
+xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
{
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
DGAScreenPtr pScreenPriv;
- ScrnInfoPtr pScrn;
DGADevicePtr device;
PixmapPtr pPix = NULL;
DGAModePtr pMode = NULL;
@@ -338,7 +337,6 @@ xf86SetDGAMode(int index, int num, DGADevicePtr devRet)
pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen);
if (!pScreenPriv)
return BadValue;
- pScrn = pScreenPriv->pScrn;
if (!num) {
if (pScreenPriv->current) {
@@ -359,7 +357,7 @@ xf86SetDGAMode(int index, int num, DGADevicePtr devRet)
pScreenPriv->savedColormap = NULL;
}
pScreenPriv->dgaColormap = NULL;
- (*pScrn->EnableDisableFBAccess) (index, TRUE);
+ (*pScrn->EnableDisableFBAccess) (pScrn, TRUE);
FreeMarkedVisuals(pScreen);
}
@@ -385,7 +383,7 @@ xf86SetDGAMode(int index, int num, DGADevicePtr devRet)
Bool oldVTSema = pScrn->vtSema;
pScrn->vtSema = FALSE; /* kludge until we rewrite VT switching */
- (*pScrn->EnableDisableFBAccess) (index, FALSE);
+ (*pScrn->EnableDisableFBAccess) (pScrn, FALSE);
pScrn->vtSema = oldVTSema;
}
@@ -564,7 +562,7 @@ DGAShutdown(void)
for (i = 0; i < screenInfo.numScreens; i++) {
pScrn = xf86Screens[i];
- (void) (*pScrn->SetDGAMode) (pScrn->scrnIndex, 0, NULL);
+ (void) (*pScrn->SetDGAMode) (pScrn, 0, NULL);
}
}
@@ -579,7 +577,7 @@ DGASetMode(int index, int num, XDGAModePtr mode, PixmapPtr *pPix)
/* We rely on the extension to check that DGA is available */
- ret = (*pScrn->SetDGAMode) (index, num, &device);
+ ret = (*pScrn->SetDGAMode) (pScrn, num, &device);
if ((ret == Success) && num) {
DGACopyModeInfo(device.mode, mode);
*pPix = device.pPix;
diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c
index 54ad84243..ef4a2c19b 100644
--- a/xorg-server/hw/xfree86/common/xf86DPMS.c
+++ b/xorg-server/hw/xfree86/common/xf86DPMS.c
@@ -49,7 +49,7 @@
#ifdef DPMSExtension
static DevPrivateKeyRec DPMSKeyRec;
static DevPrivateKey DPMSKey;
-static Bool DPMSClose(int i, ScreenPtr pScreen);
+static Bool DPMSClose(ScreenPtr pScreen);
static int DPMSCount = 0;
#endif
@@ -99,10 +99,10 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
#ifdef DPMSExtension
static Bool
-DPMSClose(int i, ScreenPtr pScreen)
+DPMSClose(ScreenPtr pScreen)
{
DPMSPtr pDPMS;
-
+ ScrnInfoPtr pScrn;
/* This shouldn't happen */
if (DPMSKey == NULL)
return FALSE;
@@ -114,20 +114,20 @@ DPMSClose(int i, ScreenPtr pScreen)
return FALSE;
pScreen->CloseScreen = pDPMS->CloseScreen;
-
+ pScrn = xf86ScreenToScrn(pScreen);
/*
* Turn on DPMS when shutting down. If this function can be used
* depends on the order the driver wraps things. If this is called
* after the driver has shut down everything the driver will have
* to deal with this internally.
*/
- if (xf86Screens[i]->vtSema && xf86Screens[i]->DPMSSet) {
- xf86Screens[i]->DPMSSet(xf86Screens[i], DPMSModeOn, 0);
+ if (pScrn->vtSema && pScrn->DPMSSet) {
+ pScrn->DPMSSet(pScrn, DPMSModeOn, 0);
}
if (--DPMSCount == 0)
DPMSKey = NULL;
- return pScreen->CloseScreen(i, pScreen);
+ return pScreen->CloseScreen(pScreen);
}
/*
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index 5896f220c..4fcad4000 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -438,7 +438,7 @@ xf86VTSwitch(void)
for (i = 0; i < xf86NumScreens; i++) {
if (!(dispatchException & DE_TERMINATE))
if (xf86Screens[i]->EnableDisableFBAccess)
- (*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE);
+ (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], FALSE);
}
/*
@@ -459,7 +459,7 @@ xf86VTSwitch(void)
prevSIGIO = xf86BlockSIGIO();
for (i = 0; i < xf86NumScreens; i++)
- xf86Screens[i]->LeaveVT(i, 0);
+ xf86Screens[i]->LeaveVT(xf86Screens[i]);
xf86AccessLeave(); /* We need this here, otherwise */
@@ -471,13 +471,13 @@ xf86VTSwitch(void)
DebugF("xf86VTSwitch: Leave failed\n");
xf86AccessEnter();
for (i = 0; i < xf86NumScreens; i++) {
- if (!xf86Screens[i]->EnterVT(i, 0))
+ if (!xf86Screens[i]->EnterVT(xf86Screens[i]))
FatalError("EnterVT failed for screen %d\n", i);
}
if (!(dispatchException & DE_TERMINATE)) {
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
- (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
+ (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE);
}
}
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
@@ -527,12 +527,12 @@ xf86VTSwitch(void)
xf86AccessEnter();
for (i = 0; i < xf86NumScreens; i++) {
xf86Screens[i]->vtSema = TRUE;
- if (!xf86Screens[i]->EnterVT(i, 0))
+ if (!xf86Screens[i]->EnterVT(xf86Screens[i]))
FatalError("EnterVT failed for screen %d\n", i);
}
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
- (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
+ (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE);
}
/* Turn screen saver off when switching back */
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index fb56a0b17..5ef1dabfb 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -198,24 +198,22 @@ xf86AllocateScreen(DriverPtr drv, int flags)
*/
void
-xf86DeleteScreen(int scrnIndex, int flags)
+xf86DeleteScreen(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn;
int i;
+ int scrnIndex;
/* First check if the screen is valid */
if (xf86NumScreens == 0 || xf86Screens == NULL)
return;
- if (scrnIndex > xf86NumScreens - 1)
- return;
-
- if (!(pScrn = xf86Screens[scrnIndex]))
+ if (!pScrn)
return;
+ scrnIndex = pScrn->scrnIndex;
/* If a FreeScreen function is defined, call it here */
if (pScrn->FreeScreen != NULL)
- pScrn->FreeScreen(scrnIndex, 0);
+ pScrn->FreeScreen(pScrn);
while (pScrn->modes)
xf86DeleteMode(&pScrn->modes, pScrn->modes);
@@ -233,7 +231,7 @@ xf86DeleteScreen(int scrnIndex, int flags)
free(pScrn->privates);
- xf86ClearEntityListForScreen(scrnIndex);
+ xf86ClearEntityListForScreen(pScrn);
free(pScrn);
@@ -1027,9 +1025,8 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen)
* private data, and therefore don't need to access pScrnInfo->vtSema.
*/
void
-xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
+xf86EnableDisableFBAccess(ScrnInfoPtr pScrnInfo, Bool enable)
{
- ScrnInfoPtr pScrnInfo = xf86Screens[scrnIndex];
ScreenPtr pScreen = pScrnInfo->pScreen;
PixmapPtr pspix;
@@ -1651,10 +1648,9 @@ xf86SetSilkenMouse(ScreenPtr pScreen)
/* Wrote this function for the PM2 Xv driver, preliminary. */
pointer
-xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name,
+xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, char *port_name,
char **adaptor_name, pointer *adaptor_options)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
confXvAdaptorPtr adaptor;
int i;
@@ -1726,9 +1722,8 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
}
Bool
-xf86IsScreenPrimary(int scrnIndex)
+xf86IsScreenPrimary(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
int i;
for (i = 0; i < pScrn->numEntities; i++) {
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index ead47ccba..ca6efd44e 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -591,7 +591,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
}
for (i = 0; i < xf86NumScreens; i++)
if (!xf86Screens[i]->configured)
- xf86DeleteScreen(i--, 0);
+ xf86DeleteScreen(xf86Screens[i--]);
/*
* If no screens left, return now.
@@ -1040,7 +1040,7 @@ AbortDDX(enum ExitCode error)
* screen explicitely.
*/
xf86VGAarbiterLock(xf86Screens[i]);
- (xf86Screens[i]->LeaveVT) (i, 0);
+ (xf86Screens[i]->LeaveVT) (xf86Screens[i]);
xf86VGAarbiterUnlock(xf86Screens[i]);
}
}
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c
index ab4d595c7..d80dec892 100644
--- a/xorg-server/hw/xfree86/common/xf86Mode.c
+++ b/xorg-server/hw/xfree86/common/xf86Mode.c
@@ -950,7 +950,7 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
mode->SynthClock /= 2;
}
- status = (*scrp->ValidMode) (scrp->scrnIndex, mode, FALSE,
+ status = (*scrp->ValidMode) (scrp, mode, FALSE,
MODECHECK_INITIAL);
if (status != MODE_OK)
return status;
@@ -1840,7 +1840,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
scrp->virtualX = newVirtX;
scrp->virtualY = newVirtY;
scrp->displayWidth = newLinePitch;
- p->status = (scrp->ValidMode) (scrp->scrnIndex, p, FALSE,
+ p->status = (scrp->ValidMode) (scrp, p, FALSE,
MODECHECK_FINAL);
if (p->status != MODE_OK) {
diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h
index 31f5c6a86..bf56acd05 100644
--- a/xorg-server/hw/xfree86/common/xf86Module.h
+++ b/xorg-server/hw/xfree86/common/xf86Module.h
@@ -82,7 +82,7 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 0)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 0)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(17, 0)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(6, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
diff --git a/xorg-server/hw/xfree86/common/xf86PM.c b/xorg-server/hw/xfree86/common/xf86PM.c
index f69fffa0e..1830640d5 100644
--- a/xorg-server/hw/xfree86/common/xf86PM.c
+++ b/xorg-server/hw/xfree86/common/xf86PM.c
@@ -102,7 +102,7 @@ suspend(pmEvent event, Bool undo)
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
- (*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE);
+ (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], FALSE);
}
pInfo = xf86InputDevs;
while (pInfo) {
@@ -112,9 +112,9 @@ suspend(pmEvent event, Bool undo)
sigio_blocked_for_suspend = xf86BlockSIGIO();
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->PMEvent)
- xf86Screens[i]->PMEvent(i, event, undo);
+ xf86Screens[i]->PMEvent(xf86Screens[i], event, undo);
else {
- xf86Screens[i]->LeaveVT(i, 0);
+ xf86Screens[i]->LeaveVT(xf86Screens[i]);
xf86Screens[i]->vtSema = FALSE;
}
}
@@ -131,16 +131,16 @@ resume(pmEvent event, Bool undo)
xf86AccessEnter();
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->PMEvent)
- xf86Screens[i]->PMEvent(i, event, undo);
+ xf86Screens[i]->PMEvent(xf86Screens[i], event, undo);
else {
xf86Screens[i]->vtSema = TRUE;
- xf86Screens[i]->EnterVT(i, 0);
+ xf86Screens[i]->EnterVT(xf86Screens[i]);
}
}
xf86UnblockSIGIO(sigio_blocked_for_suspend);
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->EnableDisableFBAccess)
- (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
+ (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE);
}
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
pInfo = xf86InputDevs;
@@ -187,7 +187,7 @@ DoApmEvent(pmEvent event, Bool undo)
was_blocked = xf86BlockSIGIO();
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->PMEvent) {
- xf86Screens[i]->PMEvent(i, event, undo);
+ xf86Screens[i]->PMEvent(xf86Screens[i], event, undo);
}
}
xf86UnblockSIGIO(was_blocked);
diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h
index 6c5efeacc..42a3b30f0 100644
--- a/xorg-server/hw/xfree86/common/xf86Priv.h
+++ b/xorg-server/hw/xfree86/common/xf86Priv.h
@@ -114,7 +114,7 @@ extern _X_EXPORT void xf86BusProbe(void);
extern _X_EXPORT void xf86AccessEnter(void);
extern _X_EXPORT void xf86AccessLeave(void);
extern _X_EXPORT void xf86PostProbe(void);
-extern _X_EXPORT void xf86ClearEntityListForScreen(int scrnIndex);
+extern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn);
extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev);
extern _X_EXPORT void xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev);
diff --git a/xorg-server/hw/xfree86/common/xf86RandR.c b/xorg-server/hw/xfree86/common/xf86RandR.c
index b17f601d1..5606bee4b 100644
--- a/xorg-server/hw/xfree86/common/xf86RandR.c
+++ b/xorg-server/hw/xfree86/common/xf86RandR.c
@@ -159,7 +159,7 @@ xf86RandRSetMode(ScreenPtr pScreen,
Bool ret = TRUE;
if (pRoot && scrp->vtSema)
- (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE);
+ (*scrp->EnableDisableFBAccess) (scrp, FALSE);
if (useVirtual) {
scrp->virtualX = randrp->virtualX;
scrp->virtualY = randrp->virtualY;
@@ -220,7 +220,7 @@ xf86RandRSetMode(ScreenPtr pScreen,
xf86SetViewport(pScreen, pScreen->width, pScreen->height);
xf86SetViewport(pScreen, 0, 0);
if (pRoot && scrp->vtSema)
- (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE);
+ (*scrp->EnableDisableFBAccess) (scrp, TRUE);
return ret;
}
@@ -365,7 +365,7 @@ xf86RandRCreateScreenResources(ScreenPtr pScreen)
* Reset size back to original
*/
static Bool
-xf86RandRCloseScreen(int index, ScreenPtr pScreen)
+xf86RandRCloseScreen(ScreenPtr pScreen)
{
ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
@@ -376,7 +376,7 @@ xf86RandRCloseScreen(int index, ScreenPtr pScreen)
pScreen->CloseScreen = randrp->CloseScreen;
free(randrp);
dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL);
- return (*pScreen->CloseScreen) (index, pScreen);
+ return (*pScreen->CloseScreen) (pScreen);
}
Rotation
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
index b9b46f6cd..225fff06e 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
@@ -221,7 +221,7 @@ xf86VGAarbiterWrapFunctions(void)
/* Screen funcs */
static Bool
-VGAarbiterCloseScreen(int i, ScreenPtr pScreen)
+VGAarbiterCloseScreen(ScreenPtr pScreen)
{
Bool val;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
@@ -258,34 +258,30 @@ VGAarbiterCloseScreen(int i, ScreenPtr pScreen)
UNWRAP_SPRITE;
free((pointer) pScreenPriv);
- xf86VGAarbiterLock(xf86Screens[i]);
- val = (*pScreen->CloseScreen) (i, pScreen);
- xf86VGAarbiterUnlock(xf86Screens[i]);
+ xf86VGAarbiterLock(xf86ScreenToScrn(pScreen));
+ val = (*pScreen->CloseScreen) (pScreen);
+ xf86VGAarbiterUnlock(xf86ScreenToScrn(pScreen));
return val;
}
static void
-VGAarbiterBlockHandler(int i,
- pointer blockData, pointer pTimeout, pointer pReadmask)
+VGAarbiterBlockHandler(ScreenPtr pScreen,
+ pointer pTimeout, pointer pReadmask)
{
- ScreenPtr pScreen = screenInfo.screens[i];
-
SCREEN_PROLOG(BlockHandler);
VGAGet(pScreen);
- pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
+ pScreen->BlockHandler(pScreen, pTimeout, pReadmask);
VGAPut();
SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
}
static void
-VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result,
+VGAarbiterWakeupHandler(ScreenPtr pScreen, unsigned long result,
pointer pReadmask)
{
- ScreenPtr pScreen = screenInfo.screens[i];
-
SCREEN_PROLOG(WakeupHandler);
VGAGet(pScreen);
- pScreen->WakeupHandler(i, blockData, result, pReadmask);
+ pScreen->WakeupHandler(pScreen, result, pReadmask);
VGAPut();
SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
}
@@ -466,46 +462,45 @@ VGAarbiterSetCursorPosition(DeviceIntPtr pDev,
}
static void
-VGAarbiterAdjustFrame(int index, int x, int y, int flags)
+VGAarbiterAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
{
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
- (*pScreenPriv->AdjustFrame) (index, x, y, flags);
+ (*pScreenPriv->AdjustFrame) (pScrn, x, y);
VGAPut();
}
static Bool
-VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags)
+VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
{
Bool val;
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
- val = (*pScreenPriv->SwitchMode) (index, mode, flags);
+ val = (*pScreenPriv->SwitchMode) (pScrn, mode);
VGAPut();
return val;
}
static Bool
-VGAarbiterEnterVT(int index, int flags)
+VGAarbiterEnterVT(ScrnInfoPtr pScrn)
{
Bool val;
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
pScrn->EnterVT = pScreenPriv->EnterVT;
- val = (*pScrn->EnterVT) (index, flags);
+ val = (*pScrn->EnterVT) (pScrn);
pScreenPriv->EnterVT = pScrn->EnterVT;
pScrn->EnterVT = VGAarbiterEnterVT;
VGAPut();
@@ -513,32 +508,31 @@ VGAarbiterEnterVT(int index, int flags)
}
static void
-VGAarbiterLeaveVT(int index, int flags)
+VGAarbiterLeaveVT(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
pScrn->LeaveVT = pScreenPriv->LeaveVT;
- (*pScreenPriv->LeaveVT) (index, flags);
+ (*pScreenPriv->LeaveVT) (pScrn);
pScreenPriv->LeaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = VGAarbiterLeaveVT;
VGAPut();
}
static void
-VGAarbiterFreeScreen(int index, int flags)
+VGAarbiterFreeScreen(ScrnInfoPtr pScrn)
{
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
- (*pScreenPriv->FreeScreen) (index, flags);
+ (*pScreenPriv->FreeScreen) (pScrn);
VGAPut();
}
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
index ebc8854d3..ba6edfcc3 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -125,11 +125,11 @@ typedef struct _VGAarbiterScreen {
UnrealizeCursorProcPtr UnrealizeCursor;
RecolorCursorProcPtr RecolorCursor;
SetCursorPositionProcPtr SetCursorPosition;
- void (*AdjustFrame) (int, int, int, int);
- Bool (*SwitchMode) (int, DisplayModePtr, int);
- Bool (*EnterVT) (int, int);
- void (*LeaveVT) (int, int);
- void (*FreeScreen) (int, int);
+ void (*AdjustFrame) (ScrnInfoPtr, int, int);
+ Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr);
+ Bool (*EnterVT) (ScrnInfoPtr);
+ void (*LeaveVT) (ScrnInfoPtr);
+ void (*FreeScreen) (ScrnInfoPtr);
miPointerSpriteFuncPtr miSprite;
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs;
@@ -142,11 +142,11 @@ typedef struct _VGAarbiterGC {
} VGAarbiterGCRec, *VGAarbiterGCPtr;
/* Screen funcs */
-static void VGAarbiterBlockHandler(int i, pointer blockData, pointer pTimeout,
+static void VGAarbiterBlockHandler(ScreenPtr pScreen, pointer pTimeout,
pointer pReadmask);
-static void VGAarbiterWakeupHandler(int i, pointer blockData,
+static void VGAarbiterWakeupHandler(ScreenPtr pScreen,
unsigned long result, pointer pReadmask);
-static Bool VGAarbiterCloseScreen(int i, ScreenPtr pScreen);
+static Bool VGAarbiterCloseScreen(ScreenPtr pScreen);
static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w,
int h, unsigned int format,
unsigned long planemask, char *pdstLine);
@@ -176,11 +176,11 @@ static Bool VGAarbiterDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
static Bool VGAarbiterSetCursorPosition(DeviceIntPtr pDev, ScreenPtr
pScreen, int x, int y,
Bool generateEvent);
-static void VGAarbiterAdjustFrame(int index, int x, int y, int flags);
-static Bool VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags);
-static Bool VGAarbiterEnterVT(int index, int flags);
-static void VGAarbiterLeaveVT(int index, int flags);
-static void VGAarbiterFreeScreen(int index, int flags);
+static void VGAarbiterAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
+static Bool VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
+static Bool VGAarbiterEnterVT(ScrnInfoPtr pScrn);
+static void VGAarbiterLeaveVT(ScrnInfoPtr pScrn);
+static void VGAarbiterFreeScreen(ScrnInfoPtr pScrn);
/* GC funcs */
static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
diff --git a/xorg-server/hw/xfree86/common/xf86VidMode.c b/xorg-server/hw/xfree86/common/xf86VidMode.c
index 13ffe061c..a7d1c25bf 100644
--- a/xorg-server/hw/xfree86/common/xf86VidMode.c
+++ b/xorg-server/hw/xfree86/common/xf86VidMode.c
@@ -50,7 +50,7 @@
static DevPrivateKeyRec VidModeKeyRec;
static DevPrivateKey VidModeKey;
static int VidModeCount = 0;
-static Bool VidModeClose(int i, ScreenPtr pScreen);
+static Bool VidModeClose(ScreenPtr pScreen);
#define VMPTR(p) ((VidModePtr)dixLookupPrivate(&(p)->devPrivates, VidModeKey))
@@ -93,7 +93,7 @@ VidModeExtensionInit(ScreenPtr pScreen)
#ifdef XF86VIDMODE
static Bool
-VidModeClose(int i, ScreenPtr pScreen)
+VidModeClose(ScreenPtr pScreen)
{
VidModePtr pVidMode = VMPTR(pScreen);
@@ -108,7 +108,7 @@ VidModeClose(int i, ScreenPtr pScreen)
dixSetPrivate(&pScreen->devPrivates, VidModeKey, NULL);
VidModeKey = NULL;
}
- return pScreen->CloseScreen(i, pScreen);
+ return pScreen->CloseScreen(pScreen);
}
Bool
@@ -303,7 +303,7 @@ VidModeSetViewPort(int scrnIndex, int x, int y)
pScrn->virtualY - pScrn->currentMode->VDisplay);
pScrn->frameY1 = pScrn->frameY0 + pScrn->currentMode->VDisplay - 1;
if (pScrn->AdjustFrame != NULL)
- (pScrn->AdjustFrame) (scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ (pScrn->AdjustFrame) (pScrn, pScrn->frameX0, pScrn->frameY0);
return TRUE;
}
diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c
index 460fafde3..25f84e579 100644
--- a/xorg-server/hw/xfree86/common/xf86cmap.c
+++ b/xorg-server/hw/xfree86/common/xf86cmap.c
@@ -80,9 +80,9 @@ typedef struct {
DestroyColormapProcPtr DestroyColormap;
InstallColormapProcPtr InstallColormap;
StoreColorsProcPtr StoreColors;
- Bool (*EnterVT) (int, int);
- Bool (*SwitchMode) (int, DisplayModePtr, int);
- int (*SetDGAMode) (int, int, DGADevicePtr);
+ Bool (*EnterVT) (ScrnInfoPtr);
+ Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr);
+ int (*SetDGAMode) (ScrnInfoPtr, int, DGADevicePtr);
xf86ChangeGammaProc *ChangeGamma;
int maxColors;
int sigRGBbits;
@@ -111,17 +111,17 @@ static DevPrivateKeyRec CMapColormapKeyRec;
static void CMapInstallColormap(ColormapPtr);
static void CMapStoreColors(ColormapPtr, int, xColorItem *);
-static Bool CMapCloseScreen(int, ScreenPtr);
+static Bool CMapCloseScreen(ScreenPtr);
static Bool CMapCreateColormap(ColormapPtr);
static void CMapDestroyColormap(ColormapPtr);
-static Bool CMapEnterVT(int, int);
-static Bool CMapSwitchMode(int, DisplayModePtr, int);
+static Bool CMapEnterVT(ScrnInfoPtr);
+static Bool CMapSwitchMode(ScrnInfoPtr, DisplayModePtr);
#ifdef XFreeXDGA
-static int CMapSetDGAMode(int, int, DGADevicePtr);
+static int CMapSetDGAMode(ScrnInfoPtr, int, DGADevicePtr);
#endif
-static int CMapChangeGamma(int, Gamma);
+static int CMapChangeGamma(ScrnInfoPtr, Gamma);
static void ComputeGamma(CMapScreenPtr);
static Bool CMapAllocateColormapPrivate(ColormapPtr);
@@ -241,11 +241,11 @@ xf86HandleColormaps(ScreenPtr pScreen,
/**** Screen functions ****/
static Bool
-CMapCloseScreen(int i, ScreenPtr pScreen)
+CMapCloseScreen(ScreenPtr pScreen)
{
CMapUnwrapScreen(pScreen);
- return (*pScreen->CloseScreen) (i, pScreen);
+ return (*pScreen->CloseScreen) (pScreen);
}
static Bool
@@ -462,16 +462,15 @@ CMapInstallColormap(ColormapPtr pmap)
/**** ScrnInfoRec functions ****/
static Bool
-CMapEnterVT(int index, int flags)
+CMapEnterVT(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
Bool ret;
CMapScreenPtr pScreenPriv =
(CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey);
pScrn->EnterVT = pScreenPriv->EnterVT;
- ret = (*pScreenPriv->EnterVT) (index, flags);
+ ret = (*pScreenPriv->EnterVT) (pScrn);
pScreenPriv->EnterVT = pScrn->EnterVT;
pScrn->EnterVT = CMapEnterVT;
if (ret) {
@@ -483,13 +482,13 @@ CMapEnterVT(int index, int flags)
}
static Bool
-CMapSwitchMode(int index, DisplayModePtr mode, int flags)
+CMapSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
{
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
CMapScreenPtr pScreenPriv =
(CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey);
- if ((*pScreenPriv->SwitchMode) (index, mode, flags)) {
+ if ((*pScreenPriv->SwitchMode) (pScrn, mode)) {
if (GetInstalledmiColormap(pScreen))
CMapReinstallMap(GetInstalledmiColormap(pScreen));
return TRUE;
@@ -499,16 +498,16 @@ CMapSwitchMode(int index, DisplayModePtr mode, int flags)
#ifdef XFreeXDGA
static int
-CMapSetDGAMode(int index, int num, DGADevicePtr dev)
+CMapSetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr dev)
{
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
CMapScreenPtr pScreenPriv =
(CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey);
int ret;
- ret = (*pScreenPriv->SetDGAMode) (index, num, dev);
+ ret = (*pScreenPriv->SetDGAMode) (pScrn, num, dev);
- pScreenPriv->isDGAmode = DGAActive(index);
+ pScreenPriv->isDGAmode = DGAActive(pScrn->scrnIndex);
if (!pScreenPriv->isDGAmode && GetInstalledmiColormap(pScreen)
&& xf86ScreenToScrn(pScreen)->vtSema)
@@ -908,11 +907,10 @@ ComputeGamma(CMapScreenPtr priv)
}
int
-CMapChangeGamma(int index, Gamma gamma)
+CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma)
{
int ret = Success;
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = pScrn->pScreen;
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
CMapColormapPtr pColPriv;
CMapScreenPtr pScreenPriv;
CMapLinkPtr pLink;
@@ -979,7 +977,7 @@ CMapChangeGamma(int index, Gamma gamma)
pScrn->ChangeGamma = pScreenPriv->ChangeGamma;
if (pScrn->ChangeGamma)
- ret = pScrn->ChangeGamma(index, gamma);
+ ret = pScrn->ChangeGamma(pScrn, gamma);
pScrn->ChangeGamma = CMapChangeGamma;
return ret;
@@ -1175,7 +1173,7 @@ xf86ChangeGamma(ScreenPtr pScreen, Gamma gamma)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (pScrn->ChangeGamma)
- return (*pScrn->ChangeGamma) (pScreen->myNum, gamma);
+ return (*pScrn->ChangeGamma) (pScrn, gamma);
return BadImplementation;
}
diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c
index e2db1c354..c2e7bab9f 100644
--- a/xorg-server/hw/xfree86/common/xf86fbman.c
+++ b/xorg-server/hw/xfree86/common/xf86fbman.c
@@ -1149,7 +1149,7 @@ static FBManagerFuncs xf86FBManFuncs = {
};
static Bool
-xf86FBCloseScreen(int i, ScreenPtr pScreen)
+xf86FBCloseScreen(ScreenPtr pScreen)
{
FBLinkPtr pLink, tmp;
FBLinearLinkPtr pLinearLink, tmp2;
@@ -1180,7 +1180,7 @@ xf86FBCloseScreen(int i, ScreenPtr pScreen)
free(offman);
dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, NULL);
- return (*pScreen->CloseScreen) (i, pScreen);
+ return (*pScreen->CloseScreen) (pScreen);
}
Bool
diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.c b/xorg-server/hw/xfree86/common/xf86sbusBus.c
index 27d24f8e1..b6a6b94b3 100644
--- a/xorg-server/hw/xfree86/common/xf86sbusBus.c
+++ b/xorg-server/hw/xfree86/common/xf86sbusBus.c
@@ -667,7 +667,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
}
static Bool
-xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen)
+xf86SbusCmapCloseScreen(ScreenPtr pScreen)
{
sbusCmapPtr cmap;
struct fbcmap fbcmap;
@@ -683,7 +683,7 @@ xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen)
}
pScreen->CloseScreen = cmap->CloseScreen;
free(cmap);
- return (*pScreen->CloseScreen) (i, pScreen);
+ return (*pScreen->CloseScreen) (pScreen);
}
Bool
diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h
index 6294845bc..a1404c3aa 100644
--- a/xorg-server/hw/xfree86/common/xf86str.h
+++ b/xorg-server/hw/xfree86/common/xf86str.h
@@ -630,18 +630,18 @@ typedef struct {
typedef Bool xf86ProbeProc(DriverPtr, int);
typedef Bool xf86PreInitProc(ScrnInfoPtr, int);
-typedef Bool xf86ScreenInitProc(int, ScreenPtr, int, char **);
-typedef Bool xf86SwitchModeProc(int, DisplayModePtr, int);
-typedef void xf86AdjustFrameProc(int, int, int, int);
-typedef Bool xf86EnterVTProc(int, int);
-typedef void xf86LeaveVTProc(int, int);
-typedef void xf86FreeScreenProc(int, int);
-typedef ModeStatus xf86ValidModeProc(int, DisplayModePtr, Bool, int);
-typedef void xf86EnableDisableFBAccessProc(int, Bool);
-typedef int xf86SetDGAModeProc(int, int, DGADevicePtr);
-typedef int xf86ChangeGammaProc(int, Gamma);
-typedef void xf86PointerMovedProc(int, int, int);
-typedef Bool xf86PMEventProc(int, pmEvent, Bool);
+typedef Bool xf86ScreenInitProc(ScreenPtr, int, char **);
+typedef Bool xf86SwitchModeProc(ScrnInfoPtr, DisplayModePtr);
+typedef void xf86AdjustFrameProc(ScrnInfoPtr, int, int);
+typedef Bool xf86EnterVTProc(ScrnInfoPtr);
+typedef void xf86LeaveVTProc(ScrnInfoPtr);
+typedef void xf86FreeScreenProc(ScrnInfoPtr);
+typedef ModeStatus xf86ValidModeProc(ScrnInfoPtr, DisplayModePtr, Bool, int);
+typedef void xf86EnableDisableFBAccessProc(ScrnInfoPtr, Bool);
+typedef int xf86SetDGAModeProc(ScrnInfoPtr, int, DGADevicePtr);
+typedef int xf86ChangeGammaProc(ScrnInfoPtr, Gamma);
+typedef void xf86PointerMovedProc(ScrnInfoPtr, int, int);
+typedef Bool xf86PMEventProc(ScrnInfoPtr, pmEvent, Bool);
typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int);
typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
typedef void xf86SetOverscanProc(ScrnInfoPtr, int);
diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c
index b10034852..1a964d270 100644
--- a/xorg-server/hw/xfree86/common/xf86xv.c
+++ b/xorg-server/hw/xfree86/common/xf86xv.c
@@ -56,7 +56,7 @@
/* XvScreenRec fields */
-static Bool xf86XVCloseScreen(int, ScreenPtr);
+static Bool xf86XVCloseScreen(ScreenPtr);
static int xf86XVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *);
/* XvAdaptorRec fields */
@@ -100,9 +100,9 @@ static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy);
/* ScrnInfoRec functions */
-static Bool xf86XVEnterVT(int, int);
-static void xf86XVLeaveVT(int, int);
-static void xf86XVAdjustFrame(int index, int x, int y, int flags);
+static Bool xf86XVEnterVT(ScrnInfoPtr);
+static void xf86XVLeaveVT(ScrnInfoPtr);
+static void xf86XVAdjustFrame(ScrnInfoPtr, int x, int y);
static void xf86XVModeSet(ScrnInfoPtr pScrn);
/* misc */
@@ -1066,7 +1066,7 @@ xf86XVReputOrStopPort(XvPortRecPrivatePtr pPriv, WindowPtr pWin, Bool visible)
static void
xf86XVReputOrStopAllPorts(ScrnInfoPtr pScrn, Bool onlyChanged)
{
- ScreenPtr pScreen = pScrn->pScreen;
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
XvScreenPtr pxvs = GET_XV_SCREEN(pScreen);
XvAdaptorPtr pa;
int c, i;
@@ -1255,7 +1255,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
/**** Required XvScreenRec fields ****/
static Bool
-xf86XVCloseScreen(int i, ScreenPtr pScreen)
+xf86XVCloseScreen(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
XvScreenPtr pxvs = GET_XV_SCREEN(pScreen);
@@ -1299,15 +1299,14 @@ xf86XVQueryAdaptors(ScreenPtr pScreen,
/**** ScrnInfoRec fields ****/
static Bool
-xf86XVEnterVT(int index, int flags)
+xf86XVEnterVT(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
Bool ret;
pScrn->EnterVT = ScreenPriv->EnterVT;
- ret = (*ScreenPriv->EnterVT) (index, flags);
+ ret = (*ScreenPriv->EnterVT) (pScrn);
ScreenPriv->EnterVT = pScrn->EnterVT;
pScrn->EnterVT = xf86XVEnterVT;
@@ -1318,10 +1317,9 @@ xf86XVEnterVT(int index, int flags)
}
static void
-xf86XVLeaveVT(int index, int flags)
+xf86XVLeaveVT(ScrnInfoPtr pScrn)
{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
XvScreenPtr pxvs = GET_XV_SCREEN(pScreen);
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
XvAdaptorPtr pAdaptor;
@@ -1353,21 +1351,20 @@ xf86XVLeaveVT(int index, int flags)
}
pScrn->LeaveVT = ScreenPriv->LeaveVT;
- (*ScreenPriv->LeaveVT) (index, flags);
+ (*ScreenPriv->LeaveVT) (pScrn);
ScreenPriv->LeaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = xf86XVLeaveVT;
}
static void
-xf86XVAdjustFrame(int index, int x, int y, int flags)
+xf86XVAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
{
- ScrnInfoPtr pScrn = xf86Screens[index];
- ScreenPtr pScreen = pScrn->pScreen;
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
if (ScreenPriv->AdjustFrame) {
pScrn->AdjustFrame = ScreenPriv->AdjustFrame;
- (*pScrn->AdjustFrame) (index, x, y, flags);
+ (*pScrn->AdjustFrame) (pScrn, x, y);
pScrn->AdjustFrame = xf86XVAdjustFrame;
}
@@ -1377,7 +1374,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
static void
xf86XVModeSet(ScrnInfoPtr pScrn)
{
- ScreenPtr pScreen = pScrn->pScreen;
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
XF86XVScreenPtr ScreenPriv;
/* Can be called before pScrn->pScreen is set */
diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.c b/xorg-server/hw/xfree86/common/xf86xvmc.c
index b7da7589a..2e529dd92 100644
--- a/xorg-server/hw/xfree86/common/xf86xvmc.c
+++ b/xorg-server/hw/xfree86/common/xf86xvmc.c
@@ -132,7 +132,7 @@ xf86XvMCDestroySubpicture(XvMCSubpicturePtr pSubpicture)
}
static Bool
-xf86XvMCCloseScreen(int i, ScreenPtr pScreen)
+xf86XvMCCloseScreen(ScreenPtr pScreen)
{
xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pScreen);
@@ -141,7 +141,7 @@ xf86XvMCCloseScreen(int i, ScreenPtr pScreen)
free(pScreenPriv->dixinfo);
free(pScreenPriv);
- return (*pScreen->CloseScreen) (i, pScreen);
+ return (*pScreen->CloseScreen) (pScreen);
}
Bool
diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h
index 289ca5843..e95f959a8 100644
--- a/xorg-server/hw/xfree86/common/xf86xvpriv.h
+++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h
@@ -41,9 +41,9 @@ typedef struct {
ClipNotifyProcPtr ClipNotify;
WindowExposuresProcPtr WindowExposures;
PostValidateTreeProcPtr PostValidateTree;
- void (*AdjustFrame) (int, int, int, int);
- Bool (*EnterVT) (int, int);
- void (*LeaveVT) (int, int);
+ void (*AdjustFrame) (ScrnInfoPtr, int, int);
+ Bool (*EnterVT) (ScrnInfoPtr);
+ void (*LeaveVT) (ScrnInfoPtr);
xf86ModeSetProc *ModeSet;
} XF86XVScreenRec, *XF86XVScreenPtr;