diff options
Diffstat (limited to 'extra/xorg-server/loongson.patch')
-rw-r--r-- | extra/xorg-server/loongson.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/extra/xorg-server/loongson.patch b/extra/xorg-server/loongson.patch new file mode 100644 index 000000000..ba4811ccf --- /dev/null +++ b/extra/xorg-server/loongson.patch @@ -0,0 +1,49 @@ +diff -ru xorg-server-1.12.1.orig/hw/xfree86/dri/sarea.h xorg-server-1.12.1/hw/xfree86/dri/sarea.h +--- xorg-server-1.12.1.orig/hw/xfree86/dri/sarea.h 2012-05-17 20:42:38.676378113 +0200 ++++ xorg-server-1.12.1/hw/xfree86/dri/sarea.h 2012-05-17 20:45:49.936966941 +0200 +@@ -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 -ru xorg-server-1.12.1.orig/hw/xfree86/os-support/linux/lnx_video.c xorg-server-1.12.1/hw/xfree86/os-support/linux/lnx_video.c +--- xorg-server-1.12.1.orig/hw/xfree86/os-support/linux/lnx_video.c 2012-05-17 20:42:38.672349775 +0200 ++++ xorg-server-1.12.1/hw/xfree86/os-support/linux/lnx_video.c 2012-05-17 20:47:23.059649687 +0200 +@@ -484,9 +484,10 @@ + Bool + xf86EnableIO(void) + { +-#if defined(__powerpc__) ++#if defined(__powerpc__) || defined(__mips__) + int fd; + unsigned int ioBase_phys; ++ extern unsigned int IOPortBase; + #endif + + if (ExtendedEnabled) +@@ -511,6 +512,21 @@ + #endif + } + close(fd); ++#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(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) && !defined(__nds32__) + if (ioperm(0, 1024, 1) || iopl(3)) { + if (errno == ENODEV) |