xserver: Branch 'master' - 5 commits

Eric Anholt anholt at kemper.freedesktop.org
Sun Feb 1 09:26:06 PST 2009


 configure.ac                            |    1 +
 glx/glxcmds.c                           |    4 ++++
 hw/kdrive/linux/linux.c                 |    2 +-
 hw/xfree86/modes/xf86Crtc.c             |    3 ---
 hw/xfree86/os-support/bsd/alpha_video.c |    7 ++++++-
 hw/xfree86/os-support/bsd/bsd_ev56.c    |   21 +++++++++++++++------
 6 files changed, 27 insertions(+), 11 deletions(-)

New commits:
commit 66a6fbbfa3a1fd0d91fe61cf2ab299d0e3df46b9
Author: Jim Huang <jserv at kaffe.org>
Date:   Sun Feb 1 09:19:20 2009 -0800

    kdrive: Move a close() to the right place so we don't close(-1) normally.
    
    Bug #18343

diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 258dc7b..79f3fbd 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -91,8 +91,8 @@ LinuxInit (void)
 	{
 	    FatalError("xf86OpenConsole: Cannot find a free VT\n");
 	}
+	close(fd);
     }
-    close(fd);
 
     sprintf(vtname,"/dev/tty%d",vtno); /* /dev/tty1-64 */
 
commit 0055fe66d5f73742cafab868ccdb7a6f36ea1dd5
Author: Manuel Bouyer <bouyer at netbsd.org>
Date:   Sun Feb 1 09:14:19 2009 -0800

    netbsd: Force the use of ev56 instructions for register access on ev56.
    
    This avoids 32-bit access which might affect other registers.  The linux code
    uses gcc flags to get this to happen, but this seems like more of a sure thing.

diff --git a/hw/xfree86/os-support/bsd/bsd_ev56.c b/hw/xfree86/os-support/bsd/bsd_ev56.c
index b214119..31b364d 100644
--- a/hw/xfree86/os-support/bsd/bsd_ev56.c
+++ b/hw/xfree86/os-support/bsd/bsd_ev56.c
@@ -13,6 +13,15 @@
 #include "xf86_OSlib.h"
 #include "xf86OSpriv.h"
 
+#include <machine/bwx.h>
+
+/*
+ * The following functions are used only on EV56 and greater CPUs,
+ * and the assembler requires going to EV56 mode in order to emit
+ * these instructions.
+ */
+__asm(".arch ev56");
+
 int readDense8(pointer Base, register unsigned long Offset);
 int readDense16(pointer Base, register unsigned long Offset);
 int readDense32(pointer Base, register unsigned long Offset);
@@ -33,14 +42,14 @@ int
 readDense8(pointer Base, register unsigned long Offset)
 {
     mem_barrier();
-    return *(volatile CARD8*) ((unsigned long)Base+(Offset));
+    return (alpha_ldbu((pointer)((unsigned long)Base+(Offset))));
 }
 
 int
 readDense16(pointer Base, register unsigned long Offset)
 {
     mem_barrier();
-    return *(volatile CARD16*) ((unsigned long)Base+(Offset));
+    return (alpha_ldwu((pointer)((unsigned long)Base+(Offset))));
 }
 
 int
@@ -53,13 +62,13 @@ readDense32(pointer Base, register unsigned long Offset)
 void
 writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
 {
-    *(volatile CARD8*)((unsigned long)Base+(Offset)) = Value;
+    alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
 }
 
 void
 writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
 {
-    *(volatile CARD16*)((unsigned long)Base + (Offset)) = Value;
+    alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
 }
 
 void
@@ -72,14 +81,14 @@ void
 writeDense8(int Value, pointer Base, register unsigned long Offset)
 {
     write_mem_barrier();
-    *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value;
+    alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
 }
 
 void
 writeDense16(int Value, pointer Base, register unsigned long Offset)
 {
     write_mem_barrier();
-    *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value;
+    alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
 }
 
 void
commit 1375c1b07df114d864a0a06786bc75a3a4f65177
Author: Manuel Bouyer <bouyer at netbsd.org>
Date:   Sun Feb 1 09:12:21 2009 -0800

    netbsd: Fix alpha ev6 support.
    
    Bug #19721

diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index 4b54843..18e1e0b 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -162,10 +162,15 @@ memory_base(void)
 	if (abw_count < 0)
 		init_abw();
 	
-	if (abw_count > 0) {
+	if (abw_count > 1) {
 		xf86Msg(X_INFO, "memory base = %#lx\n", 
 			abw[1].abw_abst.abst_sys_start); /* XXXX */
 		return abw[1].abw_abst.abst_sys_start;
+	} else if (abw_count == 1) {
+		/* assume memory_base == dense_base */
+		xf86Msg(X_INFO, "memory base = %#lx\n",
+			abw[0].abw_abst.abst_sys_start); /* XXXX */
+		return abw[0].abw_abst.abst_sys_start;
 	} else {
 		xf86Msg(X_INFO, "no memory base\n"); /* XXXX */
 		return 0;
commit ad8ffbe7cb50387e6a9cc4a24fea0d9c13b7bfc8
Author: John Hein <jhein at timing.com>
Date:   Fri Jan 30 21:30:35 2009 -0800

    Actually require bigfontproto when it's enabled.  Bug #13710.

diff --git a/configure.ac b/configure.ac
index e27140b..65e2667 100644
--- a/configure.ac
+++ b/configure.ac
@@ -970,6 +970,7 @@ fi
 AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes])
 if test "x$XF86BIGFONT" = xyes; then
 	AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension])
+	REQUIRED_MODULES="$REQUIRED_MODULES xf86bigfontproto"
 fi
 
 AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes])
commit 29b3b88dc744f4919c6709747ddb7baac47486c5
Author: Pierre Willenbrock <pierre at pirsoft.de>
Date:   Fri Jan 30 21:16:48 2009 -0800

    Prevent double unref of glxdrawables
    
    Found by valgrind. Bug #18917.

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index af52672..33954ee 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -146,6 +146,8 @@ __glXContextDestroy(__GLXcontext *context)
 	    __glXUnrefDrawable(context->drawPriv);
 	if (context->readPriv)
 	    __glXUnrefDrawable(context->readPriv);
+	context->drawPriv = NULL;
+	context->readPriv = NULL;
     }
     __glXFlushContextCache();
 }
@@ -621,6 +623,8 @@ DoMakeCurrent(__GLXclientState *cl,
 		__glXUnrefDrawable(prevglxc->drawPriv);
 	    if (prevglxc->readPriv)
 		__glXUnrefDrawable(prevglxc->readPriv);
+	    prevglxc->drawPriv = NULL;
+	    prevglxc->readPriv = NULL;
 	}
     }
 	
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 30308ad..40352b4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3159,9 +3159,6 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
 	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 	xf86CrtcPtr crtc;
 
-	if (!xf86_config)
-	    return FALSE;
-
 	if (xf86_config->num_crtc == 0)
 	    return FALSE;
 	crtc = xf86_config->crtc[0];


More information about the xorg-commit mailing list