xserver: Branch 'master' - 15 commits

Keith Packard keithp at kemper.freedesktop.org
Thu Feb 24 18:51:57 PST 2011


 hw/dmx/glxProxy/glxcmds.c     |   80 +++++++++++++++++-------------------------
 hw/dmx/glxProxy/glxsingle.c   |    7 ++-
 hw/dmx/glxProxy/glxvendor.c   |    6 +--
 hw/dmx/glxProxy/render2swap.c |   54 ----------------------------
 hw/xfree86/modes/xf86Crtc.c   |   10 ++++-
 include/colormapst.h          |    4 +-
 include/scrnintstr.h          |    2 -
 include/xorg-server.h.in      |    7 ++-
 8 files changed, 57 insertions(+), 113 deletions(-)

New commits:
commit 365ad68fb9f7029550505b7c276a808050cada9c
Merge: 0801afb... 720c895...
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Feb 24 18:49:40 2011 -0800

    Merge remote branch 'ajax/for-keithp'

commit 720c895db9327bbdc32215a67236303d2ceafad4
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Feb 23 13:36:20 2011 -0500

    Add mode field to ConstrainCursorHarder
    
    For Pointer Barriers, the movement mode is important and must be passed
    through.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 9f4fbf3..a9357e8 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -404,7 +404,7 @@ typedef    void (* DeviceCursorCleanupProcPtr)(
         ScreenPtr    /* pScreen */);
 
 typedef void (*ConstrainCursorHarderProcPtr)(
-       DeviceIntPtr, ScreenPtr, int *, int *);
+       DeviceIntPtr, ScreenPtr, int, int *, int *);
 
 typedef struct _Screen {
     int			myNum;	/* index of this instance in Screens[] */
commit a16e282200f84233041e5a565c6363a5a78be525
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Feb 8 15:40:22 2010 -0500

    xfree86: Fix the sdk headers to be multilib-safe
    
    Use _LP64 (verified on gcc and sun compilers) instead of _XSERVER64 in
    internal header usage, and always define _XSERVER64 for modules if _LP64
    is defined.  Prevents differing xorg-server.h between 32 and 64 bit
    packages.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/colormapst.h b/include/colormapst.h
index 0ba5bd0..b597e2c 100644
--- a/include/colormapst.h
+++ b/include/colormapst.h
@@ -103,12 +103,12 @@ typedef struct _ColormapRec
 {
     VisualPtr	pVisual;
     short	class;		/* PseudoColor or DirectColor */
-#if defined(_XSERVER64)
+#if defined(_LP64)
     short	pad0;
     XID		pad1;
 #endif
     XID		mid;		/* client's name for colormap */
-#if defined(_XSERVER64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+#if defined(_LP64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
     XID		pad2;
 #endif
     ScreenPtr	pScreen;	/* screen map is associated with */
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 76cab16..b10b994 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -157,9 +157,6 @@
 /* Name of X server */
 #undef __XSERVERNAME__
 
-/* Define to 1 if unsigned long is 64 bits. */
-#undef _XSERVER64
-
 /* Building vgahw module */
 #undef WITH_VGAHW
 
@@ -187,4 +184,8 @@
 /* X Access Control Extension */
 #undef XACE
 
+#ifdef _LP64
+#define _XSERVER64 1
+#endif
+
 #endif /* _XORG_SERVER_H_ */
commit dc498b433f36af5d2de3065e7c64cdb575385d81
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Feb 8 15:23:04 2010 -0500

    xfree86: If the driver found modes on an output, don't add more
    
    Inferring modes from sync ranges is only valid if the monitor says it's
    valid.  If the monitor says it's valid, then we'll have already added
    those modes during EDID block parse.  If it doesn't, then we should
    believe it.
    
    If there's no EDID for an output, but sync ranges from the config, we'll
    still add default modes as normal.
    
    Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index b5e9dc2..0ae63ba 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1595,7 +1595,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	int		    min_clock = 0;
 	int		    max_clock = 0;
 	double		    clock;
-	Bool		    add_default_modes = xf86ReturnOptValBool(output->options, OPTION_DEFAULT_MODES, TRUE);
+	Bool		    add_default_modes;
 	Bool		    debug_modes = config->debug_modes ||
 					  xf86Initialising;
 	enum det_monrec_source sync_source = sync_default;
@@ -1641,6 +1641,14 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
 	}
 	
 	output_modes = (*output->funcs->get_modes) (output);
+
+	/*
+	 * If the user has a preference, respect it.
+	 * Otherwise, don't second-guess the driver.
+	 */
+	if (!xf86GetOptValBool(output->options, OPTION_DEFAULT_MODES,
+			       &add_default_modes))
+	    add_default_modes = (output_modes == NULL);
 	
 	edid_monitor = output->MonInfo;
 	
commit 303977fbcf9c641b7e19dfde192cef585f5b455c
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:52:49 2011 -0500

    glxproxy: warning fix
    
    glxvendor.c: In function ‘__glXVForwardPipe0WithReply’:
    glxvendor.c:205:10: warning: ‘be_buf’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c
index 1d7b199..0b6ba41 100644
--- a/hw/dmx/glxProxy/glxvendor.c
+++ b/hw/dmx/glxProxy/glxvendor.c
@@ -202,7 +202,7 @@ int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
    xGLXVendorPrivReply be_reply;
     __GLXcontext *glxc;
    int buf_size;
-   char *be_buf;
+   char *be_buf = NULL;
    int   be_buf_size;
    DMXScreenInfo *dmxScreen;
    Display *dpy;
commit 405ad0610d6e2f4606768294b655ac52aee9ae58
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:51:47 2011 -0500

    glxproxy: warning fix
    
    glxvendor.c: In function ‘__glXVForwardAllWithReply’:
    glxvendor.c:284:10: warning: ‘be_buf’ may be used uninitialized in this function
    glxvendor.c:285:10: warning: ‘be_buf_size’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c
index 7ba727d..1d7b199 100644
--- a/hw/dmx/glxProxy/glxvendor.c
+++ b/hw/dmx/glxProxy/glxvendor.c
@@ -281,8 +281,8 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
    xGLXVendorPrivReply be_reply;
     __GLXcontext *glxc;
    int buf_size;
-   char *be_buf;
-   int   be_buf_size;
+   char *be_buf = NULL;
+   int   be_buf_size = 0;
    int from_screen = 0;
    int to_screen = 0;
    int s;
commit a4cd2e0da6415ec1b3b182579bebbe2a41f29d30
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:47:05 2011 -0500

    glxproxy: warning fix
    
    glxsingle.c: In function ‘__glXForwardPipe0WithReply’:
    glxsingle.c:218:10: warning: ‘be_buf’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index cc7b408..33cc612 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -215,7 +215,7 @@ int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
    xGLXSingleReply be_reply;
     __GLXcontext *glxc;
    int buf_size;
-   char *be_buf;
+   char *be_buf = NULL;
    int   be_buf_size;
    DMXScreenInfo *dmxScreen;
    Display *dpy;
commit f928caca6e60215bc9ab423acae5542dfabc9bec
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:45:31 2011 -0500

    glxproxy: warning fix
    
    glxsingle.c: In function ‘__glXForwardAllWithReply’:
    glxsingle.c:300:10: warning: ‘be_buf’ may be used uninitialized in this function
    glxsingle.c:301:10: warning: ‘be_buf_size’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index ae8d65f..cc7b408 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -297,8 +297,8 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
    xGLXSingleReply be_reply;
     __GLXcontext *glxc;
    int buf_size;
-   char *be_buf;
-   int   be_buf_size;
+   char *be_buf = NULL;
+   int   be_buf_size = 0;
    int from_screen = 0;
    int to_screen = 0;
    int s;
commit dad2712c9328e113db4de768a12a8dafa6c177e9
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:44:03 2011 -0500

    glxproxy: warning fix
    
    glxsingle.c: In function ‘__glXDisp_ReadPixels’:
    glxsingle.c:760:11: warning: ‘buf’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c
index 4c473ff..ae8d65f 100644
--- a/hw/dmx/glxProxy/glxsingle.c
+++ b/hw/dmx/glxProxy/glxsingle.c
@@ -811,6 +811,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
     }
     else {
        buf_size = 0;
+       buf = NULL;
     }
 
     if (buf_size > 0) {
commit 4270157bac645550e2c0afe89479c0bfe9d53447
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:38:23 2011 -0500

    glxproxy: warning fix
    
    render2swap.c:264:13: warning: ‘swapArray’ defined but not used
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/render2swap.c b/hw/dmx/glxProxy/render2swap.c
index 5754ff4..81bb501 100644
--- a/hw/dmx/glxProxy/render2swap.c
+++ b/hw/dmx/glxProxy/render2swap.c
@@ -261,60 +261,6 @@ void __glXDispSwap_CallLists(GLbyte *pc)
 
 }
 
-static void swapArray(GLint numVals, GLenum datatype,
-                      GLint stride, GLint numVertexes, GLbyte *pc)
-{
-    int i,j;
-    __GLX_DECLARE_SWAP_VARIABLES;
-
-    switch (datatype) {
-      case GL_BYTE:
-      case GL_UNSIGNED_BYTE:
-	/* don't need to swap */
-	return;
-      case GL_SHORT:
-      case GL_UNSIGNED_SHORT:
-	for (i=0; i<numVertexes; i++) {
-	    GLshort *pVal = (GLshort *) pc;
-	    for (j=0; j<numVals; j++) {
-		__GLX_SWAP_SHORT(&pVal[j]);
-	    }
-	    pc += stride;
-	}
-	break;
-      case GL_INT:
-      case GL_UNSIGNED_INT:
-	for (i=0; i<numVertexes; i++) {
-	    GLint *pVal = (GLint *) pc;
-	    for (j=0; j<numVals; j++) {
-		__GLX_SWAP_INT(&pVal[j]);
-	    }
-	    pc += stride;
-	}
-	break;
-      case GL_FLOAT:
-	for (i=0; i<numVertexes; i++) {
-	    GLfloat *pVal = (GLfloat *) pc;
-	    for (j=0; j<numVals; j++) {
-		__GLX_SWAP_FLOAT(&pVal[j]);
-	    }
-	    pc += stride;
-	}
-	break;
-      case GL_DOUBLE:
-	for (i=0; i<numVertexes; i++) {
-	    GLdouble *pVal = (GLdouble *) pc;
-	    for (j=0; j<numVals; j++) {
-		__GLX_SWAP_DOUBLE(&pVal[j]);
-	    }
-	    pc += stride;
-	}
-	break;
-      default:
-	return;
-    }
-}
-
 void __glXDispSwap_DrawArrays(GLbyte *pc)
 {
     __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *)pc;
commit 5d0910b4fdf99e3239635a01eb2709c32d0e5bb9
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:32:54 2011 -0500

    glxproxy: warning fix
    
    glxcmds.c: In function ‘CreateGLXPixmap’:
    glxcmds.c:1663:20: warning: comparison between pointer and integer
    glxcmds.c:1663:38: warning: comparison between pointer and integer
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 6196540..f79264e 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1660,7 +1660,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
 	return BadMatch;
     }
 
-    if (fbconfigId == NULL && visual == NULL) {
+    if (fbconfigId == 0 && visual == 0) {
 	  return BadValue;
     }
 
commit e1b5d3e5e7f157ab769c40ad2efdc1281c25a03a
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:18:53 2011 -0500

    glxproxy: warning fix
    
    glxcmds.c: In function ‘CreateGLXPixmap’:
    glxcmds.c:1641:22: warning: ‘pGlxScreen’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index d38319a..6196540 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1733,6 +1733,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
     else {
        pVisual = NULL;
        pGlxVisual = NULL;
+       pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum];
     }
 
     pGlxPixmap = (__GLXpixmap *) malloc(sizeof(__GLXpixmap));
commit 3b9de273a94fb68de51238c20c3182396aa41b84
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:07:20 2011 -0500

    glxproxy: warning fix
    
    glxcmds.c: In function ‘CreateContext.clone.6’:
    glxcmds.c:105:19: warning: ‘be_fbconfigId’ may be used uninitialized in this function
    glxcmds.c:104:14: warning: ‘be_vid’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 72ecdea..d38319a 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -101,8 +101,8 @@ static int CreateContext(__GLXclientState *cl,
     int from_screen = screen;
     int to_screen = screen;
     DMXScreenInfo *dmxScreen;
-    VisualID be_vid;
-    GLXFBConfigID be_fbconfigId;
+    VisualID be_vid = 0;
+    GLXFBConfigID be_fbconfigId = 0;
     int num_be_screens;
     Display *dpy;
     
commit 767b93e783a981b4fc926299a85a1a18387e693a
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 14:02:37 2011 -0500

    glxproxy: warning fix
    
    glxcmds.c: In function ‘__glXGetDrawableAttributes’:
    glxcmds.c:3295:8: warning: ‘screen’ may be used uninitialized in this function
    glxcmds.c:3298:8: warning: ‘attribs_size’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index cbefdfa..72ecdea 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3295,27 +3295,23 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
    int screen, rc;
    DMXScreenInfo *dmxScreen;
    CARD32 *attribs = NULL;
-   int attribs_size;
+   int attribs_size = 0;
 #ifdef PANORAMIX
     PanoramiXRes *pXinDraw = NULL;
 #endif
 
    if (drawId != None) {
       rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
-      if (rc == Success) {
-	 if (pDraw->type == DRAWABLE_WINDOW) {
-		WindowPtr pWin = (WindowPtr)pDraw;
-		be_drawable = 0;
-		screen = pWin->drawable.pScreen->myNum;
-
-	 }
-	 else {
-	    /*
-	     ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-	     */
-	    client->errorValue = drawId;
-	    return __glXBadDrawable;
-	 }
+      if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+	 WindowPtr pWin = (WindowPtr)pDraw;
+	 be_drawable = 0;
+	 screen = pWin->drawable.pScreen->myNum;
+      } else {
+	 /*
+	  ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+	  */
+	 client->errorValue = drawId;
+	 return __glXBadDrawable;
       }
 
       if (!pDraw) {
@@ -3353,17 +3349,15 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 	    be_drawable = pGlxPbuffer->be_xids[screen];
 	 }
       }
-
-
-      if (!pDraw) {
-	 /*
-	  ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-	  */
-	 client->errorValue = drawId;
-	 return __glXBadDrawable;
-      }
     }
 
+    if (!pDraw) {
+	/*
+	 ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+	 */
+	client->errorValue = drawId;
+	return __glXBadDrawable;
+   }
 
    /* if the drawable is a window or GLXWindow - 
     * we need to find the base id on the back-end server
commit a391089186cd1063d807bf14a9651e6861b248de
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Feb 8 13:55:23 2011 -0500

    glxproxy: warning fix
    
    glxcmds.c: In function ‘__glXChangeDrawableAttributes’:
    glxcmds.c:3464:8: warning: ‘screen’ may be used uninitialized in this function
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index a58eb35..cbefdfa 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -3466,20 +3466,15 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 
    if (drawId != None) {
       rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
-      if (rc == Success) {
-	 if (pDraw->type == DRAWABLE_WINDOW) {
-		WindowPtr pWin = (WindowPtr)pDraw;
-		be_drawable = 0;
-		screen = pWin->drawable.pScreen->myNum;
-
-	 }
-	 else {
-	    /*
-	     ** Drawable is not a Window , GLXWindow or a GLXPixmap.
-	     */
-	    client->errorValue = drawId;
-	    return __glXBadDrawable;
-	 }
+      if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+	  be_drawable = 0;
+	  screen = pDraw->pScreen->myNum;
+      } else {
+	 /*
+	  ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+	  */
+	 client->errorValue = drawId;
+	 return __glXBadDrawable;
       }
 
       if (!pDraw) {
@@ -3517,17 +3512,15 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
 	    be_drawable = pGlxPbuffer->be_xids[screen];
 	 }
       }
+   }
 
-
-      if (!pDraw) {
+   if (!pDraw) {
 	 /*
 	  ** Drawable is not a Window , GLXWindow or a GLXPixmap.
 	  */
 	 client->errorValue = drawId;
 	 return __glXBadDrawable;
-      }
-    }
-
+   }
 
    /* if the drawable is a window or GLXWindow - 
     * we need to find the base id on the back-end server


More information about the xorg-commit mailing list