1
0
xorg-x11-server/u_aarch64-support.patch

61 lines
2.7 KiB
Diff

Subject: Basic support for aarch64
Author: Andreas Schwab <schwab@suse.de>
Index: xorg-server-1.13.2/hw/xfree86/os-support/linux/lnx_video.c
===================================================================
--- xorg-server-1.13.2.orig/hw/xfree86/os-support/linux/lnx_video.c
+++ xorg-server-1.13.2/hw/xfree86/os-support/linux/lnx_video.c
@@ -58,7 +58,8 @@ static Bool ExtendedEnabled = FALSE;
!defined(__sparc__) && \
!defined(__mips__) && \
!defined(__nds32__) && \
- !defined(__arm__)
+ !defined(__arm__) && \
+ !defined(__aarch64__)
/*
* Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
@@ -511,7 +512,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(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) && !defined(__nds32__) && !defined(__aarch64__)
if (ioperm(0, 1024, 1) || iopl(3)) {
if (errno == ENODEV)
ErrorF("xf86EnableIOPorts: no I/O ports found\n");
@@ -540,7 +541,7 @@ xf86DisableIO(void)
#if defined(__powerpc__)
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(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) && !defined(__nds32__) && !defined(__aarch64__)
iopl(0);
ioperm(0, 1024, 0);
#endif
Index: xorg-server-1.13.2/include/servermd.h
===================================================================
--- xorg-server-1.13.2.orig/include/servermd.h
+++ xorg-server-1.13.2/include/servermd.h
@@ -286,6 +286,20 @@ SOFTWARE.
#define GLYPHPADBYTES 4
#endif /* linux/s390 */
+#ifdef __aarch64__
+
+#ifdef __AARCH64EL__
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+#ifdef __AARCH64EB__
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#endif
+#define GLYPHPADBYTES 4
+
+#endif /* __aarch64__ */
+
/* size of buffer to use with GetImage, measured in bytes. There's obviously
* a trade-off between the amount of heap used and the number of times the
* ddx routine has to be called.