summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-base/xorg-server/files')
-rw-r--r--x11-base/xorg-server/files/0001-compiler.h-split-MIPS-and-ARM-code.patch94
-rw-r--r--x11-base/xorg-server/files/0002-compiler.h-change-MIPS-IOPortBase-to-ioBase.patch104
-rw-r--r--x11-base/xorg-server/files/0003-Make-MIPS-use-existing-PowerPC-code-paths-in-lnx_vid.patch78
-rw-r--r--x11-base/xorg-server/files/xdm-setup.initd-12
-rw-r--r--x11-base/xorg-server/files/xdm.confd-4 (renamed from x11-base/xorg-server/files/xdm.confd-3)10
-rw-r--r--x11-base/xorg-server/files/xdm.initd-8 (renamed from x11-base/xorg-server/files/xdm.initd-3)29
-rw-r--r--x11-base/xorg-server/files/xorg-cve-2011-4028+4029.patch22
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.12-disable-acpi.patch11
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch30
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.9.5-loongson.patch53
-rw-r--r--x11-base/xorg-server/files/xorg-server-9999-loongson.patch112
-rw-r--r--x11-base/xorg-server/files/xorg-server-disable-acpi.patch31
-rw-r--r--x11-base/xorg-server/files/xorg-server-loongson-fix-smi-16bpp.patch11
13 files changed, 309 insertions, 278 deletions
diff --git a/x11-base/xorg-server/files/0001-compiler.h-split-MIPS-and-ARM-code.patch b/x11-base/xorg-server/files/0001-compiler.h-split-MIPS-and-ARM-code.patch
new file mode 100644
index 0000000..b858ecb
--- /dev/null
+++ b/x11-base/xorg-server/files/0001-compiler.h-split-MIPS-and-ARM-code.patch
@@ -0,0 +1,94 @@
+From 66482b79cf539e53a522787fce7fdfe74989a0e4 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 10 May 2012 13:11:12 -0400
+Subject: [PATCH 1/3] compiler.h: split MIPS and ARM code
+
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ hw/xfree86/common/compiler.h | 55 ++++++++++++++++++++++++++++++++++++-----
+ 1 files changed, 48 insertions(+), 7 deletions(-)
+
+diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
+index 0abdfb6..27bce92 100644
+--- a/hw/xfree86/common/compiler.h
++++ b/hw/xfree86/common/compiler.h
+@@ -703,12 +703,8 @@ xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+ }
+
+-#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
+-#ifdef __arm32__
+-#define PORT_SIZE long
+-#else
++#elif defined(__mips__)
+ #define PORT_SIZE short
+-#endif
+
+ _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
+
+@@ -754,7 +750,6 @@ inl(unsigned PORT_SIZE port)
+ IOPortBase);
+ }
+
+-#if defined(__mips__)
+ #ifdef linux /* don't mess with other OSs */
+ #if X_BYTE_ORDER == X_BIG_ENDIAN
+ static __inline__ unsigned int
+@@ -780,7 +775,53 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+ }
+ #endif
+ #endif /* !linux */
+-#endif /* __mips__ */
++
++#elif (defined(__arm32__) && !defined(__linux__))
++#define PORT_SIZE long
++
++_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
++
++static __inline__ void
++outb(unsigned PORT_SIZE port, unsigned char val)
++{
++ *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
++ val;
++}
++
++static __inline__ void
++outw(unsigned PORT_SIZE port, unsigned short val)
++{
++ *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
++ val;
++}
++
++static __inline__ void
++outl(unsigned PORT_SIZE port, unsigned int val)
++{
++ *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
++ val;
++}
++
++static __inline__ unsigned int
++inb(unsigned PORT_SIZE port)
++{
++ return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
++ IOPortBase);
++}
++
++static __inline__ unsigned int
++inw(unsigned PORT_SIZE port)
++{
++ return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
++ IOPortBase);
++}
++
++static __inline__ unsigned int
++inl(unsigned PORT_SIZE port)
++{
++ return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
++ IOPortBase);
++}
+
+ #elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__)
+
+--
+1.7.3.4
+
diff --git a/x11-base/xorg-server/files/0002-compiler.h-change-MIPS-IOPortBase-to-ioBase.patch b/x11-base/xorg-server/files/0002-compiler.h-change-MIPS-IOPortBase-to-ioBase.patch
new file mode 100644
index 0000000..a6bee61
--- /dev/null
+++ b/x11-base/xorg-server/files/0002-compiler.h-change-MIPS-IOPortBase-to-ioBase.patch
@@ -0,0 +1,104 @@
+From d83874593b04258cc5b866eb57d4d085eed67fae Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 10 May 2012 13:21:20 -0400
+Subject: [PATCH 2/3] compiler.h: change MIPS IOPortBase to ioBase
+
+This will allow us to use the existing __powerpc__ code paths in
+lnx_video.c.
+
+Also remove unnecessary casts.
+
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ hw/xfree86/common/compiler.h | 33 ++++++++++++------------------
+ hw/xfree86/os-support/linux/lnx_video.c | 5 +++-
+ 2 files changed, 17 insertions(+), 21 deletions(-)
+
+diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
+index 27bce92..9669df9 100644
+--- a/hw/xfree86/common/compiler.h
++++ b/hw/xfree86/common/compiler.h
+@@ -704,50 +704,43 @@ xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
+ }
+
+ #elif defined(__mips__)
+-#define PORT_SIZE short
+
+-_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
++extern _X_EXPORT volatile unsigned char *ioBase;
+
+ static __inline__ void
+-outb(unsigned PORT_SIZE port, unsigned char val)
++outb(unsigned short port, unsigned char val)
+ {
+- *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+- val;
++ *(volatile unsigned char *) (port + (uintptr_t)ioBase) = val;
+ }
+
+ static __inline__ void
+-outw(unsigned PORT_SIZE port, unsigned short val)
++outw(unsigned short port, unsigned short val)
+ {
+- *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+- val;
++ *(volatile unsigned short *) (port + (uintptr_t)ioBase) = val;
+ }
+
+ static __inline__ void
+-outl(unsigned PORT_SIZE port, unsigned int val)
++outl(unsigned short port, unsigned int val)
+ {
+- *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+- val;
++ *(volatile unsigned int *) (port + (uintptr_t)ioBase) = val;
+ }
+
+ static __inline__ unsigned int
+-inb(unsigned PORT_SIZE port)
++inb(unsigned short port)
+ {
+- return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
+- IOPortBase);
++ return *(volatile unsigned char *) (port + (uintptr_t)ioBase);
+ }
+
+ static __inline__ unsigned int
+-inw(unsigned PORT_SIZE port)
++inw(unsigned short port)
+ {
+- return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
+- IOPortBase);
++ return *(volatile unsigned short *) (port + (uintptr_t)ioBase);
+ }
+
+ static __inline__ unsigned int
+-inl(unsigned PORT_SIZE port)
++inl(unsigned short port)
+ {
+- return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
+- IOPortBase);
++ return *(volatile unsigned int *) (port + (uintptr_t)ioBase);
+ }
+
+ #ifdef linux /* don't mess with other OSs */
+diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
+index 3526a21..cd46f97 100644
+--- a/hw/xfree86/os-support/linux/lnx_video.c
++++ b/hw/xfree86/os-support/linux/lnx_video.c
+@@ -472,8 +472,11 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
+ /* I/O Permissions section */
+ /***************************************************************************/
+
+-#if defined(__powerpc__)
++#if defined(__powerpc__) || defined(__mips__)
+ volatile unsigned char *ioBase = NULL;
++#endif
++
++#if defined(__powerpc__)
+
+ #ifndef __NR_pciconfig_iobase
+ #define __NR_pciconfig_iobase 200
+--
+1.7.3.4
+
diff --git a/x11-base/xorg-server/files/0003-Make-MIPS-use-existing-PowerPC-code-paths-in-lnx_vid.patch b/x11-base/xorg-server/files/0003-Make-MIPS-use-existing-PowerPC-code-paths-in-lnx_vid.patch
new file mode 100644
index 0000000..54e7aae
--- /dev/null
+++ b/x11-base/xorg-server/files/0003-Make-MIPS-use-existing-PowerPC-code-paths-in-lnx_vid.patch
@@ -0,0 +1,78 @@
+From a20c36d4ea6ae8c553c81bf3def81591ff91dce6 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 10 May 2012 13:23:12 -0400
+Subject: [PATCH 3/3] Make MIPS use existing PowerPC code paths in lnx_video.c
+
+This allows X to work on the Lemote Yeeloong laptop.
+
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ hw/xfree86/dri/sarea.h | 2 ++
+ hw/xfree86/os-support/linux/lnx_video.c | 14 +++++++++-----
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/hw/xfree86/dri/sarea.h b/hw/xfree86/dri/sarea.h
+index 7a55b49..e3b7763 100644
+--- a/hw/xfree86/dri/sarea.h
++++ b/hw/xfree86/dri/sarea.h
+@@ -41,6 +41,8 @@
+ /* SAREA area needs to be at least a page */
+ #if defined(__alpha__)
+ #define SAREA_MAX 0x2000
++#elif defined(__mips__)
++#define SAREA_MAX 0x4000
+ #elif defined(__ia64__)
+ #define SAREA_MAX 0x10000 /* 64kB */
+ #else
+diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
+index cd46f97..4b228ba 100644
+--- a/hw/xfree86/os-support/linux/lnx_video.c
++++ b/hw/xfree86/os-support/linux/lnx_video.c
+@@ -487,16 +487,20 @@ volatile unsigned char *ioBase = NULL;
+ Bool
+ xf86EnableIO(void)
+ {
+-#if defined(__powerpc__)
++#if defined(__powerpc__) || defined(__mips__)
+ int fd;
+- unsigned int ioBase_phys;
++ unsigned long ioBase_phys;
+ #endif
+
+ if (ExtendedEnabled)
+ return TRUE;
+
++#if defined(__powerpc__) || defined(__mips__)
+ #if defined(__powerpc__)
+ ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
++#elif defined(__mips__)
++ ioBase_phys = 0x1fd00000;
++#endif
+
+ fd = open("/dev/mem", O_RDWR);
+ if (ioBase == NULL) {
+@@ -514,7 +518,7 @@ xf86EnableIO(void)
+ #endif
+ }
+ close(fd);
+-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) && !defined(__nds32__)
++#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) && !defined(__nds32__)
+ if (ioperm(0, 1024, 1) || iopl(3)) {
+ if (errno == ENODEV)
+ ErrorF("xf86EnableIOPorts: no I/O ports found\n");
+@@ -540,10 +544,10 @@ xf86DisableIO(void)
+ {
+ if (!ExtendedEnabled)
+ return;
+-#if defined(__powerpc__)
++#if defined(__powerpc__) || defined(__mips__)
+ munmap(ioBase, 0x20000);
+ ioBase = NULL;
+-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) && !defined(__nds32__)
++#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) && !defined(__nds32__)
+ iopl(0);
+ ioperm(0, 1024, 0);
+ #endif
+--
+1.7.3.4
+
diff --git a/x11-base/xorg-server/files/xdm-setup.initd-1 b/x11-base/xorg-server/files/xdm-setup.initd-1
index 365664e..6ed3922 100644
--- a/x11-base/xorg-server/files/xdm-setup.initd-1
+++ b/x11-base/xorg-server/files/xdm-setup.initd-1
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm-setup.initd-1,v 1.1 2010/04/13 10:07:39 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xinit/files/xdm-setup.initd-1,v 1.5 2009/09/24 17:07:56 williamh Exp $
depend() {
need localmount
diff --git a/x11-base/xorg-server/files/xdm.confd-3 b/x11-base/xorg-server/files/xdm.confd-4
index 9c560bb..c82fece 100644
--- a/x11-base/xorg-server/files/xdm.confd-3
+++ b/x11-base/xorg-server/files/xdm.confd-4
@@ -5,12 +5,6 @@
# in your /etc/inittab file so that you don't get a dead keyboard.
CHECKVT=7
-# What display manager do you use ? [ xdm | gdm | kdm | kdm-4.3 | gpe | entrance ]
+# What display manager do you use ? [ xdm | gdm | kdm | gpe | entrance ]
# NOTE: If this is set in /etc/rc.conf, that setting will override this one.
-#
-# KDE-specific note:
-# - If you are using kdeprefix go with "kdm-4.Y", e.g. "kdm-4.3".
-# You can find possible versions by looking at the directories in /usr/kde/.
-# - Else, if you are using KDE 3 enter "kdm-3.5"
-# - Else, if you are using KDE 4 enter "kdm" without a version
-DISPLAYMANAGER="xdm" \ No newline at end of file
+DISPLAYMANAGER="xdm"
diff --git a/x11-base/xorg-server/files/xdm.initd-3 b/x11-base/xorg-server/files/xdm.initd-8
index ae5f59e..063f88b 100644
--- a/x11-base/xorg-server/files/xdm.initd-3
+++ b/x11-base/xorg-server/files/xdm.initd-8
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm.initd-3,v 1.1 2010/09/28 12:43:19 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm.initd-7,v 1.1 2012/03/20 16:02:51 ssuominen Exp $
# This is here to serve as a note to myself, and future developers.
#
@@ -45,13 +45,15 @@ depend() {
# (#145219 #180163) Could use lirc mouse as input device
# (#70689 comment #92) Start after consolefont to avoid display corruption
# (#291269) Start after quota, since some dm need readable home
+ # (#390609) gdm-3 will fail when dbus is not running
+ # (#366753) starting keymaps after X causes problems
after bootmisc consolefont modules netmount
after readahead-list ypbind autofs openvpn gpm lircmd
- after quota
+ after quota keymaps
before alsasound
# Start before X
- use consolekit xfs
+ use consolekit dbus xfs
}
setup_dm() {
@@ -66,11 +68,7 @@ setup_dm() {
NAME=
case "${MY_XDM}" in
kdm|kde)
- EXE="$(which kdm)"
- PIDFILE=/var/run/kdm.pid
- ;;
- kdm-*)
- EXE="/usr/kde/${MY_XDM#kdm-}/bin/kdm"
+ EXE=/usr/bin/kdm
PIDFILE=/var/run/kdm.pid
;;
entrance*)
@@ -90,9 +88,19 @@ setup_dm() {
EXE=/usr/bin/gpe-dm
PIDFILE=/var/run/gpe-dm.pid
;;
+ lxdm)
+ EXE=/usr/sbin/lxdm-binary
+ PIDFILE=/var/run/lxdm.pid
+ START_STOP_ARGS="--background"
+ ;;
+ lightdm)
+ EXE=/usr/sbin/lightdm
+ PIDFILE=/var/run/lightdm.pid
+ START_STOP_ARGS="--background"
+ ;;
*)
# first find out if there is such executable
- EXE="$(which ${MY_XDM} 2>/dev/null)"
+ EXE="$(command -v ${MY_XDM} 2>/dev/null)"
PIDFILE="/var/run/${MY_XDM}.pid"
# warn user that he is doing sick things if the exe was not found
@@ -141,6 +149,7 @@ start() {
save_options "service" "${EXE}"
save_options "name" "${NAME}"
save_options "pidfile" "${PIDFILE}"
+ save_options "start_stop_args" "${START_STOP_ARGS}"
if [ -n "${CHECKVT-y}" ] ; then
if vtstatic "${CHECKVT:-7}" ; then
diff --git a/x11-base/xorg-server/files/xorg-cve-2011-4028+4029.patch b/x11-base/xorg-server/files/xorg-cve-2011-4028+4029.patch
deleted file mode 100644
index 66e77f6..0000000
--- a/x11-base/xorg-server/files/xorg-cve-2011-4028+4029.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/os/utils.c b/os/utils.c
-index e8ecb71..18ff1ca 100644
---- a/os/utils.c
-+++ b/os/utils.c
-@@ -297,7 +297,7 @@ LockServer(void)
- FatalError("Could not create lock file in %s\n", tmp);
- (void) sprintf(pid_str, "%10ld\n", (long)getpid());
- (void) write(lfd, pid_str, 11);
-- (void) chmod(tmp, 0444);
-+ (void) fchmod(lfd, 0444);
- (void) close(lfd);
-
- /*
-@@ -318,7 +318,7 @@ LockServer(void)
- /*
- * Read the pid from the existing file
- */
-- lfd = open(LockFile, O_RDONLY);
-+ lfd = open(LockFile, O_RDONLY|O_NOFOLLOW);
- if (lfd < 0) {
- unlink(tmp);
- FatalError("Can't read lock file %s\n", LockFile);
diff --git a/x11-base/xorg-server/files/xorg-server-1.12-disable-acpi.patch b/x11-base/xorg-server/files/xorg-server-1.12-disable-acpi.patch
new file mode 100644
index 0000000..df43dbd
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.12-disable-acpi.patch
@@ -0,0 +1,11 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac 2011-10-31 19:40:02.000000000 +0100
++++ b/configure.ac 2011-10-31 19:41:02.372745481 +0100
+@@ -1624,7 +1624,6 @@
+ linux_alpha=yes
+ ;;
+ i*86|amd64*|x86_64*|ia64*)
+- linux_acpi="yes"
+ ;;
+ *)
+ ;;
diff --git a/x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch b/x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch
deleted file mode 100644
index 2b05967..0000000
--- a/x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
-index 74016af..9c296f5 100644
---- a/hw/xfree86/common/xf86pciBus.c
-+++ b/hw/xfree86/common/xf86pciBus.c
-@@ -1118,7 +1118,23 @@ videoPtrToDriverList(struct pci_device *dev,
- break;
- case 0x102b: driverList[0] = "mga"; break;
- case 0x10c8: driverList[0] = "neomagic"; break;
-- case 0x10de: case 0x12d2: driverList[0] = "nv"; break;
-+ case 0x10de: case 0x12d2:
-+ switch (dev->device_id) {
-+ /* NV1 */
-+ case 0x0008:
-+ case 0x0009:
-+ driverList[0] = "vesa";
-+ break;
-+ /* NV3 */
-+ case 0x0018:
-+ case 0x0019:
-+ driverList[0] = "nv";
-+ break;
-+ default:
-+ driverList[0] = "nouveau";
-+ break;
-+ }
-+ break;
- case 0x1106: driverList[0] = "openchrome"; break;
- case 0x1b36: driverList[0] = "qxl"; break;
- case 0x1163: driverList[0] = "rendition"; break;
---
diff --git a/x11-base/xorg-server/files/xorg-server-1.9.5-loongson.patch b/x11-base/xorg-server/files/xorg-server-1.9.5-loongson.patch
deleted file mode 100644
index 4351f28..0000000
--- a/x11-base/xorg-server/files/xorg-server-1.9.5-loongson.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/hw/xfree86/dri/sarea.h b/hw/xfree86/dri/sarea.h
-index 1528cc1..6be12b9 100644
---- a/hw/xfree86/dri/sarea.h
-+++ b/hw/xfree86/dri/sarea.h
-@@ -42,6 +42,8 @@
- /* SAREA area needs to be at least a page */
- #if defined(__alpha__)
- #define SAREA_MAX 0x2000
-+#elif defined(__mips__)
-+#define SAREA_MAX 0x4000
- #elif defined(__ia64__)
- #define SAREA_MAX 0x10000 /* 64kB */
- #else
-diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
-index 688106a..1552860 100644
---- a/hw/xfree86/os-support/linux/lnx_video.c
-+++ b/hw/xfree86/os-support/linux/lnx_video.c
-@@ -505,9 +505,10 @@ _X_EXPORT volatile unsigned char *ioBase = NULL;
- _X_EXPORT Bool
- xf86EnableIO(void)
- {
--#if defined(__powerpc__)
-+#if defined(__powerpc__) || defined(__mips__)
- int fd;
- unsigned int ioBase_phys;
-+ extern unsigned int IOPortBase;
- #endif
-
- if (ExtendedEnabled)
-@@ -532,7 +533,22 @@ xf86EnableIO(void)
- #endif
- }
- close(fd);
--#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
-+#elif defined(__mips__)
-+ fd = open("/dev/mem", O_RDWR);
-+ IOPortBase = (volatile unsigned char *)mmap(0, 0x20000,
-+ PROT_READ | PROT_WRITE, MAP_SHARED, fd,
-+ 0x1fd00000);
-+ if (IOPortBase == MAP_FAILED) {
-+ xf86Msg(X_WARNING,
-+ "xf86EnableIOPorts: Failed to map iobase (%s)\n",
-+ strerror(errno));
-+ return FALSE;
-+ }
-+ close(fd);
-+ xf86Msg(X_WARNING,
-+ "xf86EnableIOPorts: map iobase (%x)\n",
-+ IOPortBase);
-+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
- if (ioperm(0, 1024, 1) || iopl(3)) {
- if (errno == ENODEV)
- ErrorF("xf86EnableIOPorts: no I/O ports found\n");
diff --git a/x11-base/xorg-server/files/xorg-server-9999-loongson.patch b/x11-base/xorg-server/files/xorg-server-9999-loongson.patch
deleted file mode 100644
index cc94cec..0000000
--- a/x11-base/xorg-server/files/xorg-server-9999-loongson.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
-index 2601693..b631ba4 100644
---- a/hw/xfree86/common/compiler.h
-+++ b/hw/xfree86/common/compiler.h
-@@ -866,42 +866,42 @@ static __inline__ void stw_u(unsigned long val, unsigned short *p)
- # define PORT_SIZE short
- # endif
-
--_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
-+_X_EXPORT volatile unsigned char *ioBase; /* Memory mapped I/O port area */
-
- static __inline__ void
- outb(unsigned PORT_SIZE port, unsigned char val)
- {
-- *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
-+ *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+ioBase) = val;
- }
-
- static __inline__ void
- outw(unsigned PORT_SIZE port, unsigned short val)
- {
-- *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
-+ *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+ioBase) = val;
- }
-
- static __inline__ void
- outl(unsigned PORT_SIZE port, unsigned int val)
- {
-- *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;
-+ *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+ioBase) = val;
- }
-
- static __inline__ unsigned int
- inb(unsigned PORT_SIZE port)
- {
-- return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase);
-+ return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+ioBase);
- }
-
- static __inline__ unsigned int
- inw(unsigned PORT_SIZE port)
- {
-- return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+IOPortBase);
-+ return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))+ioBase);
- }
-
- static __inline__ unsigned int
- inl(unsigned PORT_SIZE port)
- {
-- return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+IOPortBase);
-+ return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))+ioBase);
- }
-
-
-diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
-index ed35766..f6df722 100644
---- a/hw/xfree86/os-support/linux/lnx_video.c
-+++ b/hw/xfree86/os-support/linux/lnx_video.c
-@@ -493,7 +493,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
- /* I/O Permissions section */
- /***************************************************************************/
-
--#if defined(__powerpc__)
-+#if defined(__powerpc__) || defined(__mips__)
- volatile unsigned char *ioBase = NULL;
-
- #ifndef __NR_pciconfig_iobase
-@@ -505,7 +505,7 @@ volatile unsigned char *ioBase = NULL;
- Bool
- xf86EnableIO(void)
- {
--#if defined(__powerpc__)
-+#if defined(__powerpc__) || defined(__mips__)
- int fd;
- unsigned int ioBase_phys;
- #endif
-@@ -513,8 +513,12 @@ xf86EnableIO(void)
- if (ExtendedEnabled)
- return TRUE;
-
--#if defined(__powerpc__)
-+#if defined(__powerpc__) || defined(__mips__)
-+#ifdef __powerpc__
- ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
-+#else
-+ ioBase_phys = 0x1fd00000;
-+#endif
-
- fd = open("/dev/mem", O_RDWR);
- if (ioBase == NULL) {
-@@ -532,7 +536,7 @@ xf86EnableIO(void)
- #endif
- }
- close(fd);
--#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
-+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
- if (ioperm(0, 1024, 1) || iopl(3)) {
- if (errno == ENODEV)
- ErrorF("xf86EnableIOPorts: no I/O ports found\n");
-@@ -556,10 +560,10 @@ xf86DisableIO(void)
- {
- if (!ExtendedEnabled)
- return;
--#if defined(__powerpc__)
-+#if defined(__powerpc__) || defined(__mips__)
- munmap(ioBase, 0x20000);
- ioBase = NULL;
--#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__)
-+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__)
- iopl(0);
- ioperm(0, 1024, 0);
- #endif
diff --git a/x11-base/xorg-server/files/xorg-server-disable-acpi.patch b/x11-base/xorg-server/files/xorg-server-disable-acpi.patch
deleted file mode 100644
index cc80e6c..0000000
--- a/x11-base/xorg-server/files/xorg-server-disable-acpi.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From a8079882f1884edc62a9de28af915bd8b65dfbbe Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Wed, 11 Mar 2009 14:02:11 -0400
-Subject: [PATCH] Don't build the ACPI code.
-
-No good can come of this.
----
- configure.ac | 2 --
- 1 files changed, 0 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 72ae67e..04716f8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1269,13 +1269,11 @@ if test "x$XORG" = xyes; then
- case $host_cpu in
- ia64*)
- linux_ia64=yes
-- linux_acpi="yes"
- ;;
- alpha*)
- linux_alpha=yes
- ;;
- i*86|amd64*|x86_64*)
-- linux_acpi="yes"
- ;;
- *)
- ;;
---
-1.6.1.3
-
diff --git a/x11-base/xorg-server/files/xorg-server-loongson-fix-smi-16bpp.patch b/x11-base/xorg-server/files/xorg-server-loongson-fix-smi-16bpp.patch
deleted file mode 100644
index a974b2f..0000000
--- a/x11-base/xorg-server/files/xorg-server-loongson-fix-smi-16bpp.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xorg-server-1.7.3.902/fb/fb.h.orig 2010-02-27 11:45:17.000000000 +0800
-+++ xorg-server-1.7.3.902/fb/fb.h 2010-02-27 10:29:09.000000000 +0800
-@@ -75,7 +75,7 @@
- #define FBPREFIX(x) fb##x
- #define WRITE(ptr, val) (*(ptr) = (val))
- #define READ(ptr) (*(ptr))
--#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
-+#define MEMCPY_WRAPPED(dst, src, size) memmove((dst), (src), (size))
- #define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
-
- #endif