diff options
Diffstat (limited to 'x11-base/xorg-server/files/0003-Make-MIPS-use-existing-PowerPC-code-paths-in-lnx_vid.patch')
-rw-r--r-- | x11-base/xorg-server/files/0003-Make-MIPS-use-existing-PowerPC-code-paths-in-lnx_vid.patch | 78 |
1 files changed, 78 insertions, 0 deletions
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 + |