diff options
Diffstat (limited to 'extra/xorg-server')
-rw-r--r-- | extra/xorg-server/PKGBUILD | 7 | ||||
-rw-r--r-- | extra/xorg-server/loongson.patch | 56 |
2 files changed, 62 insertions, 1 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 77ce16d88..398e39971 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel') pkgver=1.14.1 pkgrel=1 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') license=('custom') url="http://xorg.freedesktop.org" makedepends=('pixman' 'libx11' 'mesa' 'mesa-libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' @@ -22,6 +22,7 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 xvfb-run xvfb-run.1 10-quirks.conf + loongson.patch git-fixes.patch) sha256sums=('a5adb02571efb7d7459dde83286a3adb77dfd1a52a7348e75d2dc72d6f8d28aa' '66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162' @@ -31,6 +32,7 @@ sha256sums=('a5adb02571efb7d7459dde83286a3adb77dfd1a52a7348e75d2dc72d6f8d28aa' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' '94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166' + 'c1081681093cd56003f77e1bf4febc3e6bb84a1bde95292fbe19e8c461a7d207' 'd0832cc16b5e6c1dee2959055a4b327f5c87e2a67b5f427d654663057207b2c1') build() { @@ -42,6 +44,9 @@ build() { # Use unofficial imedia SiS driver for supported SiS devices patch -Np0 -i "${srcdir}/autoconfig-sis.patch" + # Based on http://lists.freedesktop.org/archives/xorg-devel/2011-October/026249.html + patch -Np1 -i "${srcdir}/loongson.patch" + # https://bugs.freedesktop.org/show_bug.cgi?id=59825 - fixes crash with vboxvideo patch -Np1 -i "${srcdir}/bug59825.patch" diff --git a/extra/xorg-server/loongson.patch b/extra/xorg-server/loongson.patch new file mode 100644 index 000000000..632753873 --- /dev/null +++ b/extra/xorg-server/loongson.patch @@ -0,0 +1,56 @@ +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__) + #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.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; + } + ++#elif defined(__mips__) ++ ++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__) + |