summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2015-09-20 16:39:18 +0000
committertnn <tnn@pkgsrc.org>2015-09-20 16:39:18 +0000
commit2fc7c8c47cd11526ac275819230f2fbf2275df9c (patch)
tree8af53c721c6bcb675f7ac57641b135fc707abe5b /x11
parentfecd94665a3889a8c5206edf3b7b5355654be5a0 (diff)
downloadpkgsrc-2fc7c8c47cd11526ac275819230f2fbf2275df9c.tar.gz
backport sparc64 fixes (sync w/ x11/modular-xorg-server)
Diffstat (limited to 'x11')
-rw-r--r--x11/modular-xorg-server112/Makefile7
-rw-r--r--x11/modular-xorg-server112/PLIST3
-rw-r--r--x11/modular-xorg-server112/distinfo8
-rw-r--r--x11/modular-xorg-server112/patches/patch-hw_xfree86_common_compiler.h13
-rw-r--r--x11/modular-xorg-server112/patches/patch-hw_xfree86_common_xf86sbusBus.h24
-rw-r--r--x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bsd_sparc64__video.c26
-rw-r--r--x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_Sbus.c172
-rw-r--r--x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_xf86Sbus.h15
8 files changed, 262 insertions, 6 deletions
diff --git a/x11/modular-xorg-server112/Makefile b/x11/modular-xorg-server112/Makefile
index 43d9391614b..e9d1835089a 100644
--- a/x11/modular-xorg-server112/Makefile
+++ b/x11/modular-xorg-server112/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2015/08/18 07:31:20 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2015/09/20 16:39:18 tnn Exp $
DISTNAME= xorg-server-1.12.4
PKGNAME= modular-${DISTNAME}
@@ -99,6 +99,11 @@ SUNOS_ARCH= sparcv8plus
. endif
.endif
+PLIST_VARS+= sparc
+.if !empty(MACHINE_ARCH:Msparc*)
+PLIST.sparc= yes
+.endif
+
# Workaround for PR#41556.
# Avoid to use bsd_kqueue_apm, force to use bsd_apm instead.
.if ${OPSYS} == "NetBSD"
diff --git a/x11/modular-xorg-server112/PLIST b/x11/modular-xorg-server112/PLIST
index 1faf5cfc1df..e225b4ab5e8 100644
--- a/x11/modular-xorg-server112/PLIST
+++ b/x11/modular-xorg-server112/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2015/04/03 09:46:18 tnn Exp $
+@comment $NetBSD: PLIST,v 1.2 2015/09/20 16:39:18 tnn Exp $
bin/X
bin/Xnest
bin/Xorg
@@ -147,6 +147,7 @@ include/xorg/xf86Priv.h
include/xorg/xf86Privstr.h
include/xorg/xf86RamDac.h
include/xorg/xf86RandR12.h
+${PLIST.sparc}include/xorg/xf86Sbus.h
include/xorg/xf86Rename.h
include/xorg/xf86VGAarbiter.h
include/xorg/xf86Xinput.h
diff --git a/x11/modular-xorg-server112/distinfo b/x11/modular-xorg-server112/distinfo
index 794710321f8..ff3e1692180 100644
--- a/x11/modular-xorg-server112/distinfo
+++ b/x11/modular-xorg-server112/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2015/04/03 09:46:18 tnn Exp $
+$NetBSD: distinfo,v 1.2 2015/09/20 16:39:18 tnn Exp $
SHA1 (xorg-server-1.12.4.tar.bz2) = 6d616874f9c7677bda08dc073c03f83e78fbc585
RMD160 (xorg-server-1.12.4.tar.bz2) = 4907b5dc42efd6b3fb6bf9d64f1441080a6a6983
@@ -43,9 +43,13 @@ SHA1 (patch-glx_singlepix.c) = 72ac42939b37ae0d57fc06453344ca76cdf2c856
SHA1 (patch-glx_singlepixswap.c) = 1e3d54d3082a59d21edd81276980b953efc39ebb
SHA1 (patch-glx_swap__interval.c) = 2ff4e2e7d2793dd8558b04c1f72abfa81998f2c6
SHA1 (patch-glx_unpack.h) = 5ae5c10c93835cb51c08f5dae05c5a5e2afaad98
-SHA1 (patch-hw_xfree86_common_compiler.h) = 88de747715b80b22f448869ab32dce1641bcb6db
+SHA1 (patch-hw_xfree86_common_compiler.h) = 55ddbe73946ca3d3d8c5c398838cbfa60f06af42
+SHA1 (patch-hw_xfree86_common_xf86sbusBus.h) = 9095519b466df814bd8a7bc1decbc186d997c5cd
SHA1 (patch-hw_xfree86_dri2_dri2.c) = 32a8c309f9ae417c99fe81b6a9c3b1f402880981
SHA1 (patch-hw_xfree86_dri2_dri2ext.c) = bc2b57e4bef5ae386d1d3a015c01d243f8880ab4
+SHA1 (patch-hw_xfree86_os-support_bsd_sparc64__video.c) = d85331bbcf14ccae99bd8485aff8055a9f470f27
+SHA1 (patch-hw_xfree86_os-support_bus_Sbus.c) = f4e1d8b6ac917e0310e64409f1e4dd246a6107b3
+SHA1 (patch-hw_xfree86_os-support_bus_xf86Sbus.h) = b05b6c6f7c68bdbfd98b559d9b87a35c229fb946
SHA1 (patch-hw_xfree86_os-support_xf86__OSlib.h) = 7c2760509610b44915da077b22899bef9c338cc1
SHA1 (patch-include_dix.h) = ab0dc2debd87f29c0ac7f971a3cad4850b239c3a
SHA1 (patch-include_regionstr.h) = c6f3e3b263593b622e7087d3ebe2b470cf9526e3
diff --git a/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_compiler.h b/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_compiler.h
index bad74c05208..4cb3c73d6d8 100644
--- a/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_compiler.h
+++ b/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_compiler.h
@@ -1,7 +1,16 @@
-$NetBSD: patch-hw_xfree86_common_compiler.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
+$NetBSD: patch-hw_xfree86_common_compiler.h,v 1.2 2015/09/20 16:39:18 tnn Exp $
---- hw/xfree86/common/compiler.h.orig 2013-05-21 17:33:57.000000000 +0000
+--- hw/xfree86/common/compiler.h.orig 2012-05-17 17:09:03.000000000 +0000
+++ hw/xfree86/common/compiler.h
+@@ -470,7 +470,7 @@ inl(unsigned short port)
+ return ret;
+ }
+
+-#elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
++#elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__sparc__)
+
+ #ifndef ASI_PL
+ #define ASI_PL 0x88
@@ -1392,26 +1392,26 @@ inl(unsigned short port)
static __inline__ void
outb(unsigned short port, unsigned char val)
diff --git a/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_xf86sbusBus.h b/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_xf86sbusBus.h
new file mode 100644
index 00000000000..023b7a461be
--- /dev/null
+++ b/x11/modular-xorg-server112/patches/patch-hw_xfree86_common_xf86sbusBus.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-hw_xfree86_common_xf86sbusBus.h,v 1.1 2015/09/20 16:39:18 tnn Exp $
+
+NetBSD/sparc64 support partially from xsrc.
+
+--- hw/xfree86/common/xf86sbusBus.h.orig 2012-05-17 17:09:03.000000000 +0000
++++ hw/xfree86/common/xf86sbusBus.h
+@@ -39,6 +39,8 @@
+ #define SBUS_DEVICE_FFB 0x000b
+ #define SBUS_DEVICE_GT 0x000c
+ #define SBUS_DEVICE_MGX 0x000d
++#define SBUS_DEVICE_P9100 0x000e
++#define SBUS_DEVICE_AG10E 0x000f
+
+ typedef struct sbus_prom_node {
+ int node;
+@@ -50,7 +52,7 @@ typedef struct sbus_device {
+ int devId;
+ int fbNum;
+ int fd;
+- int width, height;
++ int width, height, size;
+ sbusPromNode node;
+ char *descr;
+ char *device;
diff --git a/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bsd_sparc64__video.c b/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bsd_sparc64__video.c
new file mode 100644
index 00000000000..50eff4a4459
--- /dev/null
+++ b/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bsd_sparc64__video.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-hw_xfree86_os-support_bsd_sparc64__video.c,v 1.1 2015/09/20 16:39:18 tnn Exp $
+
+For some reason we need these symbols to link.
+
+--- hw/xfree86/os-support/bsd/sparc64_video.c.orig 2012-05-17 17:09:03.000000000 +0000
++++ hw/xfree86/os-support/bsd/sparc64_video.c
+@@ -50,6 +50,19 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
+ pVidMem->initialised = TRUE;
+ }
+
++void
++xf86SetTVOut(int mode)
++{
++ return;
++}
++
++void
++xf86SetRGBOut()
++{
++ return;
++}
++
++
+ static pointer
+ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
+ int flags)
diff --git a/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_Sbus.c b/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_Sbus.c
new file mode 100644
index 00000000000..32d05fa60b8
--- /dev/null
+++ b/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_Sbus.c
@@ -0,0 +1,172 @@
+$NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.1 2015/09/20 16:39:18 tnn Exp $
+
+Merge most of netbsdSbus.c from xsrc.
+
+--- hw/xfree86/os-support/bus/Sbus.c.orig 2012-08-19 15:45:54.000000000 +0000
++++ hw/xfree86/os-support/bus/Sbus.c
+@@ -34,6 +34,9 @@
+ #ifdef sun
+ #include <sys/utsname.h>
+ #endif
++#if defined(__NetBSD__) && defined(__sparc__)
++#include <dev/ofw/openfirmio.h>
++#endif
+ #include "xf86.h"
+ #include "xf86Priv.h"
+ #include "xf86_OSlib.h"
+@@ -50,7 +53,6 @@ static int promP1275 = -1;
+
+ #define MAX_PROP 128
+ #define MAX_VAL (4096-128-4)
+-static struct openpromio *promOpio;
+
+ sbusDevicePtr *xf86SbusInfo = NULL;
+
+@@ -68,68 +70,75 @@ struct sbus_devtable sbusDeviceTable[] =
+ {SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"},
+ {SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"},
+ {SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX"},
+- {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX"},
++ {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX or S24"},
+ {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"},
+ {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"},
++ {SBUS_DEVICE_P9100, FBTYPE_P9100, "pnozz", "pnozz", "Weitek P9100"},
++ {SBUS_DEVICE_AG10E, FBTYPE_AG10E, "ag10e", "ag10e", "Fujitsu AG-10e"},
+ {0, 0, NULL}
+ };
+
++static struct ofiocdesc ofio;
++static char of_buf[256];
++
+ int
+ promGetSibling(int node)
+ {
+- promOpio->oprom_size = sizeof(int);
+
+ if (node == -1)
+ return 0;
+- *(int *) promOpio->oprom_array = node;
+- if (ioctl(promFd, OPROMNEXT, promOpio) < 0)
++ if (ioctl(promFd, OFIOCGETNEXT, &node) < 0)
+ return 0;
+- promCurrentNode = *(int *) promOpio->oprom_array;
+- return *(int *) promOpio->oprom_array;
++ promCurrentNode = node;
++ return node;
+ }
+
+ int
+ promGetChild(int node)
+ {
+- promOpio->oprom_size = sizeof(int);
+
+ if (!node || node == -1)
+ return 0;
+- *(int *) promOpio->oprom_array = node;
+- if (ioctl(promFd, OPROMCHILD, promOpio) < 0)
++ if (ioctl(promFd, OFIOCGETCHILD, &node) < 0)
+ return 0;
+- promCurrentNode = *(int *) promOpio->oprom_array;
+- return *(int *) promOpio->oprom_array;
++ promCurrentNode = node;
++ return node;
+ }
+
+ char *
+ promGetProperty(const char *prop, int *lenp)
+ {
+- promOpio->oprom_size = MAX_VAL;
+
+- strcpy(promOpio->oprom_array, prop);
+- if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
++ ofio.of_nodeid = promCurrentNode;
++ ofio.of_name = (char *)prop;
++ ofio.of_namelen = strlen(prop);
++ ofio.of_buf = of_buf;
++ ofio.of_buflen = sizeof(of_buf);
++
++ if (ioctl(promFd, OFIOCGET, &ofio) < 0)
+ return 0;
++
++ of_buf[ofio.of_buflen] = '\0';
++
+ if (lenp)
+- *lenp = promOpio->oprom_size;
+- return promOpio->oprom_array;
++ *lenp = ofio.of_buflen;
++ return of_buf;
+ }
+
+ int
+ promGetBool(const char *prop)
+ {
+- promOpio->oprom_size = 0;
++ ofio.of_nodeid = promCurrentNode;
++ ofio.of_name = (char *)prop;
++ ofio.of_namelen = strlen(prop);
++ ofio.of_buf = of_buf;
++ ofio.of_buflen = sizeof(of_buf);
+
+- *(int *) promOpio->oprom_array = 0;
+- for (;;) {
+- promOpio->oprom_size = MAX_PROP;
+- if (ioctl(promFd, OPROMNXTPROP, promOpio) < 0)
+- return 0;
+- if (!promOpio->oprom_size)
+- return 0;
+- if (!strcmp(promOpio->oprom_array, prop))
+- return 1;
+- }
++ if (ioctl(promFd, OFIOCGET, &ofio) < 0)
++ return 0;
++ if (ofio.of_buflen < 0)
++ return 0;
++ return 1;
+ }
+
+ #define PROM_NODE_SIBLING 0x01
+@@ -180,8 +189,8 @@ promIsP1275(void)
+ promP1275 = TRUE;
+ else
+ promP1275 = FALSE;
+-#elif defined(__FreeBSD__)
+- promP1275 = TRUE;
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
++ promP1275 = TRUE;
+ #else
+ #error Missing promIsP1275() function for this OS
+ #endif
+@@ -198,8 +207,6 @@ sparcPromClose(void)
+ close(promFd);
+ promFd = -1;
+ }
+- free(promOpio);
+- promOpio = NULL;
+ promOpenCount = 0;
+ }
+
+@@ -213,11 +220,6 @@ sparcPromInit(void)
+ promFd = open("/dev/openprom", O_RDONLY, 0);
+ if (promFd == -1)
+ return -1;
+- promOpio = (struct openpromio *) malloc(4096);
+- if (!promOpio) {
+- sparcPromClose();
+- return -1;
+- }
+ promRootNode = promGetSibling(0);
+ if (!promRootNode) {
+ sparcPromClose();
+@@ -399,9 +401,9 @@ sparcPromAssignNodes(void)
+ * were the types of the cards missed. */
+ char buffer[64];
+ int fbNum, devId;
+- static struct {
+- int devId;
+- char *prefix;
++ static const struct {
++ const int devId;
++ const char *prefix;
+ } procFbPrefixes[] = {
+ {SBUS_DEVICE_BW2, "BWtwo"},
+ {SBUS_DEVICE_CG14, "CGfourteen"},
diff --git a/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_xf86Sbus.h b/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_xf86Sbus.h
new file mode 100644
index 00000000000..bbc20642e51
--- /dev/null
+++ b/x11/modular-xorg-server112/patches/patch-hw_xfree86_os-support_bus_xf86Sbus.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_xfree86_os-support_bus_xf86Sbus.h,v 1.1 2015/09/20 16:39:18 tnn Exp $
+
+NetBSD/sparc64 support.
+
+--- hw/xfree86/os-support/bus/xf86Sbus.h.orig 2012-05-17 17:09:03.000000000 +0000
++++ hw/xfree86/os-support/bus/xf86Sbus.h
+@@ -36,6 +36,8 @@
+ #elif defined(SVR4)
+ #include <sys/fbio.h>
+ #include <sys/openpromio.h>
++#elif defined(__NetBSD__) && defined(__sparc64__)
++#include <dev/sun/fbio.h>
+ #elif defined(__OpenBSD__) && defined(__sparc64__)
+ /* XXX */
+ #elif defined(CSRG_BASED)