xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Jun 30 09:24:58 PDT 2010


 configure.ac                     |    3 +++
 hw/kdrive/ephyr/ephyrdriext.c    |    3 ++-
 hw/kdrive/ephyr/ephyrhostvideo.c |   15 ++++++++++-----
 hw/xfree86/modes/xf86Crtc.c      |    5 ++++-
 4 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit 433d0851cd3e61d841ff374ee0a0f052d5907029
Author: Julien Cristau <jcristau at debian.org>
Date:   Fri Jun 25 11:34:44 2010 +0100

    Xephyr: fix Xv adaptor capability tests
    
    Signed-off-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/kdrive/ephyr/ephyrhostvideo.c b/hw/kdrive/ephyr/ephyrhostvideo.c
index 9dde768..600b50f 100644
--- a/hw/kdrive/ephyr/ephyrhostvideo.c
+++ b/hw/kdrive/ephyr/ephyrhostvideo.c
@@ -380,7 +380,8 @@ ephyrHostXVAdaptorHasPutVideo (const EphyrHostXVAdaptor *a_this,
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvInputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvInputMask)) ==
+		    (XvVideoMask | XvInputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -391,7 +392,8 @@ Bool
 ephyrHostXVAdaptorHasGetVideo (const EphyrHostXVAdaptor *a_this,
                                Bool *a_result)
 {
-    if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvOutputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvOutputMask)) ==
+		    (XvVideoMask | XvOutputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -404,7 +406,8 @@ ephyrHostXVAdaptorHasPutStill (const EphyrHostXVAdaptor *a_this,
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvInputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvInputMask)) ==
+		    (XvStillMask | XvInputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -417,7 +420,8 @@ ephyrHostXVAdaptorHasGetStill (const EphyrHostXVAdaptor *a_this,
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvOutputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvOutputMask)) ==
+		    (XvStillMask | XvOutputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
@@ -430,7 +434,8 @@ ephyrHostXVAdaptorHasPutImage (const EphyrHostXVAdaptor *a_this,
 {
     EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
 
-    if (((XvAdaptorInfo*)a_this)->type & XvImageMask && XvInputMask)
+    if ((((XvAdaptorInfo*)a_this)->type & (XvImageMask | XvInputMask)) ==
+		    (XvImageMask | XvInputMask))
         *a_result = TRUE ;
     else
         *a_result = FALSE ;
commit 9626eedebf620559652ffb1fefa82b5d659e57be
Author: Julien Cristau <jcristau at debian.org>
Date:   Thu Jun 24 18:45:11 2010 +0100

    configure: bail if Xephyr was requested but its dependencies are missing
    
    Signed-off-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 4491e90..5c18a12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2073,6 +2073,9 @@ if test "$KDRIVE" = yes; then
     if test "x$XEPHYR" = xauto; then
         XEPHYR=$xephyr
     fi
+    if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then	
+        AC_MSG_ERROR([Xephyr dependencies missing])
+    fi
 
     # Xephyr needs nanosleep() which is in librt on Solaris
     AC_CHECK_FUNC([nanosleep], [],
commit e6531ae9d5bdd37775e921268366fb76056e22d5
Author: Julien Cristau <jcristau at debian.org>
Date:   Thu Jun 24 18:45:10 2010 +0100

    Xephyr: fix memory leak in XF86DRIOpenConnection
    
    The allocated bus id string was not being freed.
    
    Signed-off-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 4041bf5..ce584b0 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -682,7 +682,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client)
 {
     xXF86DRIOpenConnectionReply rep;
     drm_handle_t			hSAREA;
-    char*			busIdString;
+    char*			busIdString = NULL;
     REQUEST(xXF86DRIOpenConnectionReq);
     REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq);
 
@@ -716,6 +716,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client)
     WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep);
     if (rep.busIdStringLength)
         WriteToClient(client, rep.busIdStringLength, busIdString);
+    free(busIdString);
     EPHYR_LOG ("leave\n") ;
     return Success;
 }
commit 390a8466dd1914f4786b811ff8454f6e0c4b6b04
Author: Ville Syrjälä <ville.syrjala at nokia.com>
Date:   Mon Jun 28 23:26:48 2010 +0300

    xfree86/modes: Allow the driver to specify initial rotation
    
    When the "Rotate" option isn't specified allow the driver to specify
    the initial rotation mode. This way the driver can choose to retain
    the same settings that were used by software that was used prior to
    starting X.
    
    Signed-off-by: Ville Syrjälä <ville.syrjala at nokia.com>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 7f6fad3..b2daec7 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -572,8 +572,11 @@ xf86OutputInitialRotation (xf86OutputPtr output)
 						OPTION_ROTATE);
     int	    i;
 
-    if (!rotate_name)
+    if (!rotate_name) {
+	if (output->initial_rotation)
+	    return output->initial_rotation;
 	return RR_Rotate_0;
+    }
     
     for (i = 0; i < 4; i++)
 	if (xf86nameCompare (direction[i], rotate_name) == 0)


More information about the xorg-commit mailing list