diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2013-03-19 22:52:42 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2013-03-19 22:52:42 +0100 |
commit | 53d812883b8a2a51b12ccd1b0f05a7753493a176 (patch) | |
tree | 9ca45781e76467450005e020e5372c38fc5d385a /extra/xorg-server | |
parent | e110f2acaf08ab191980831180f44753028a1af6 (diff) |
X fixes for 1.14.
Diffstat (limited to 'extra/xorg-server')
-rw-r--r-- | extra/xorg-server/PKGBUILD | 2 | ||||
-rw-r--r-- | extra/xorg-server/loongson.patch | 83 |
2 files changed, 46 insertions, 39 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 638575a6f..409ee567c 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -32,7 +32,7 @@ sha256sums=('1f5107573252c26439fdd165481765a2c0964e02a2e9fab36e02414d08f30630' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' '94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166' - '966b8c509006e3b7e6ac951c93a760ecbb2cb2ad7a5807fb919f0c4ee5e079a5' + 'c1081681093cd56003f77e1bf4febc3e6bb84a1bde95292fbe19e8c461a7d207' 'd0832cc16b5e6c1dee2959055a4b327f5c87e2a67b5f427d654663057207b2c1') build() { diff --git a/extra/xorg-server/loongson.patch b/extra/xorg-server/loongson.patch index ba4811ccf..632753873 100644 --- a/extra/xorg-server/loongson.patch +++ b/extra/xorg-server/loongson.patch @@ -1,6 +1,6 @@ -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 +diff -ru xorg-server-1.14.0.orig/hw/xfree86/dri/sarea.h xorg-server-1.14.0/hw/xfree86/dri/sarea.h +--- xorg-server-1.14.0.orig/hw/xfree86/dri/sarea.h 2013-03-19 13:50:10.838242935 +0100 ++++ xorg-server-1.14.0/hw/xfree86/dri/sarea.h 2013-03-19 13:50:39.129859642 +0100 @@ -41,6 +41,8 @@ /* SAREA area needs to be at least a page */ #if defined(__alpha__) @@ -10,40 +10,47 @@ diff -ru xorg-server-1.12.1.orig/hw/xfree86/dri/sarea.h xorg-server-1.12.1/hw/xf #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 +diff -ru xorg-server-1.14.0.orig/hw/xfree86/os-support/linux/lnx_video.c xorg-server-1.14.0/hw/xfree86/os-support/linux/lnx_video.c +--- xorg-server-1.14.0.orig/hw/xfree86/os-support/linux/lnx_video.c 2013-03-19 13:50:10.869508709 +0100 ++++ xorg-server-1.14.0/hw/xfree86/os-support/linux/lnx_video.c 2013-03-19 14:02:26.536090562 +0100 +@@ -503,6 +503,40 @@ + ioBase = NULL; + } - 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) ++ ++extern unsigned int IOPortBase; ++ ++static Bool ++hwEnableIO(void) ++{ ++ int fd; ++ ++ 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); ++ ++ return IOPortBase != MAP_FAILED; ++} ++ ++static void ++hwDisableIO(void) ++{ ++ munmap(IOPortBase, 0x20000); ++ IOPortBase = NULL; ++} ++ + #elif defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \ + defined(__alpha__) + |