CVS commit: [netbsd-6] xsrc/external/mit/xorg-server/dist/hw/xfree86/common

2012-07-12 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Thu Jul 12 19:42:40 UTC 2012

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/common [netbsd-6]:
xf86sbusBus.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #415):
external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c: revision 
1.4
when using dixSetPrivate() and friends it helps to initialize the key before
using it. Now colours on suncg6 look right again and we don't spin or crash
on exit anymore.
probably needs to be pulled into -6


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c:1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c:1.3.2.1
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c:1.3	Tue Aug  2 07:15:03 2011
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86sbusBus.c	Thu Jul 12 19:42:40 2012
@@ -585,7 +585,7 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn
 pScrn-virtualY = psdp-height;
 }
 
-static DevPrivateKeyRec sbusPaletteKeyIndex;
+static DevPrivateKeyRec sbusPaletteKeyIndex = { .initialized = 0 };
 static DevPrivateKey sbusPaletteKey = sbusPaletteKeyIndex;
 typedef struct _sbusCmap {
 sbusDevicePtr psdp;
@@ -603,7 +603,7 @@ static void
 xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
 			LOCO *colors, VisualPtr pVisual)
 {
-int i, index;
+int i, index, ret;
 sbusCmapPtr cmap;
 struct fbcmap fbcmap;
 unsigned char *data = malloc(numColors*3);
@@ -618,7 +618,10 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScr
 for (i = 0; i  numColors; i++) {
 	index = indices[i];
 	if (fbcmap.count  index != fbcmap.index + fbcmap.count) {
-	ioctl (cmap-psdp-fd, FBIOPUTCMAP, fbcmap);
+	ret = ioctl (cmap-psdp-fd, FBIOPUTCMAP, fbcmap);
+	if (ret != 0)
+	xf86Msg(X_ERROR, %s: ioctl(%d, FBIOPUTCMAP): %d %d\n,
+		  __func__, cmap-psdp-fd, ret, errno);
 	fbcmap.count = 0;
 	fbcmap.index = index;
 	}
@@ -626,7 +629,10 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScr
 	fbcmap.green[fbcmap.count] = colors[index].green;
 	fbcmap.blue[fbcmap.count++] = colors[index].blue;
 }
-ioctl (cmap-psdp-fd, FBIOPUTCMAP, fbcmap);
+ret = ioctl (cmap-psdp-fd, FBIOPUTCMAP, fbcmap);
+if (ret != 0)
+xf86Msg(X_ERROR, %s: ioctl(%d, FBIOPUTCMAP): %d %d\n, __func__,
+  cmap-psdp-fd, ret, errno);
 free(data);
 }
 
@@ -655,9 +661,13 @@ xf86SbusHandleColormaps(ScreenPtr pScree
 {
 sbusCmapPtr cmap;
 struct fbcmap fbcmap;
+int ret;
 unsigned char data[2];
 
 cmap = xnfcalloc(1, sizeof(sbusCmapRec));
+if (!dixPrivateKeyRegistered(sbusPaletteKey)) {
+dixRegisterPrivateKey(sbusPaletteKey, PRIVATE_SCREEN, 0);
+}
 dixSetPrivate(pScreen-devPrivates, sbusPaletteKey, cmap);
 cmap-psdp = psdp;
 fbcmap.index = 0;
@@ -665,7 +675,7 @@ xf86SbusHandleColormaps(ScreenPtr pScree
 fbcmap.red = cmap-origRed;
 fbcmap.green = cmap-origGreen;
 fbcmap.blue = cmap-origBlue;
-if (ioctl (psdp-fd, FBIOGETCMAP, fbcmap) = 0)
+if ((ret = ioctl (psdp-fd, FBIOGETCMAP, fbcmap)) = 0)
 	cmap-origCmapValid = TRUE;
 fbcmap.index = 0;
 fbcmap.count = 2;
@@ -679,7 +689,10 @@ xf86SbusHandleColormaps(ScreenPtr pScree
 	data[0] = 0;
 	data[1] = 255;
 }
-ioctl (psdp-fd, FBIOPUTCMAP, fbcmap);
+ret = ioctl (psdp-fd, FBIOPUTCMAP, fbcmap);
+if (ret != 0) 
+xf86Msg(X_ERROR, %s: ioctl(%d, FBIOPUTCMAP): %d %d\n, __func__,
+	  psdp-fd, ret, errno);
 cmap-CloseScreen = pScreen-CloseScreen;
 pScreen-CloseScreen = xf86SbusCmapCloseScreen;
 return xf86HandleColormaps(pScreen, 256, 8,



CVS commit: [netbsd-6] xsrc/external/mit/xorg-server/dist/hw/xfree86/common

2012-06-11 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Jun 11 20:53:14 UTC 2012

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/common [netbsd-6]:
compiler.h

Log Message:
Pull up following revision(s) (requested by abs in ticket #300):
external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile: 
revision 1.33
x11/Xserver/Xserver/Makefile: revision 1.19
x11/Xserver/Makefile.common: revision 1.36
external/mit/xorg/server/xorg-server/Makefile.common: revision 1.25
distrib/sets/lists/xserver/md.vax: revision 1.8
external/mit/xorg/server/drivers/Makefile: revision 1.62
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h: 
revision 1.9
Add vax to the list of non inb() users
Enable wsfb X server on vax. Likely to be keyboard and mouse issues, but
with three additional lines of an ioctl() case in the kernel 'startx' will
display the traditional three xterms
Missed defining XSERVER_XVAX


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.2.1 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h:1.8 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h:1.8.2.1
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h:1.8	Tue Aug  2 07:15:03 2011
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/compiler.h	Mon Jun 11 20:53:14 2012
@@ -1370,7 +1370,7 @@ static __inline__ void stl_u(unsigned lo
 #   else /* ix86 */
 
 #if !defined(__SUNPRO_C)
-#if !defined(FAKEIT)  !defined(__mc68000__)  !defined(__arm__)  !defined(__sh__)  !defined(__hppa__)  !defined(__s390__)  !defined(__m32r__)
+#if !defined(FAKEIT)  !defined(__mc68000__)  !defined(__arm__)  !defined(__sh__)  !defined(__hppa__)  !defined(__s390__)  !defined(__m32r__)  !defined(__vax__)
 # ifdef GCCUSESGAS
 
 /*
@@ -1479,7 +1479,7 @@ inl(unsigned short port)
 
 # endif /* GCCUSESGAS */
 
-#else /* !defined(FAKEIT)  !defined(__mc68000__)   !defined(__arm__)  !defined(__sh__)  !defined(__hppa__)  !defined(__m32r__) */
+#else /* !defined(FAKEIT)  !defined(__mc68000__)   !defined(__arm__)  !defined(__sh__)  !defined(__hppa__)  !defined(__m32r__)  !defined(__vax__) */
 
 static __inline__ void
 outb(unsigned short port, unsigned char val)