xserver: Branch 'master' - 7 commits

Dodji Seketeli dodji at kemper.freedesktop.org
Thu Oct 4 05:17:17 PDT 2007


 hw/kdrive/ephyr/ephyr.c     |   15 +++++++++++++++
 hw/kdrive/ephyr/ephyrinit.c |   12 ++++++++----
 hw/kdrive/ephyr/hostx.c     |    3 +++
 hw/kdrive/ephyr/os.c        |    2 ++
 4 files changed, 28 insertions(+), 4 deletions(-)

New commits:
diff-tree 4611f9568cdadf9c00f4b7ca4c77c8c6f07e94f8 (from parents)
Merge: ab11bad54707941eb41be62c025b983760ce3900 3549a1282365e69e70c7c2546cfa7d25923cce31
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 13:07:50 2007 +0200

    updated from 'master'

diff-tree ab11bad54707941eb41be62c025b983760ce3900 (from 06c8977966e76255ce7798f4839ef6e3530264a8)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 13:05:29 2007 +0200

    Xephyr: remove a potential crasher
    
    	* hw/kdrive/ephyr/hostx.c:
    	  (hostx_has_dri): be more defensive.

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 181edd2..b5ffdd0 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -1328,6 +1328,9 @@ hostx_has_dri (void)
     int event_base=0, error_base=0 ;
     Display *dpy=hostx_get_display () ;
 
+    if (!dpy)
+        return FALSE ;
+
     if (!XF86DRIQueryExtension (dpy,
                                 &event_base,
                                 &error_base)) {
diff-tree 06c8977966e76255ce7798f4839ef6e3530264a8 (from ea94f59e9b8824b1a638c63e06ca16f0efd43869)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 13:01:24 2007 +0200

    Xephyr: better handling of the -nodri option
    
            * hw/kdrive/ephyr/ephyr.c:
              (ephyrInitScreen): try and detect when the host has no
              DRI support. In that case, switch to the -nodri behaviour.
              When in the -nodri case, make sure not to skip glx visual
              initialisation.

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 85aab28..f46a89d 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -40,6 +40,10 @@
 #endif /*XEPHYR_DRI*/
 
 extern int KdTsPhyScreen;
+#ifdef GLXEXT
+extern Bool noGlxVisualInit;
+#endif
+
 KdKeyboardInfo *ephyrKbd;
 KdPointerInfo *ephyrMouse;
 EphyrKeySyms ephyrKeySyms;
@@ -628,6 +632,11 @@ ephyrInitScreen (ScreenPtr pScreen)
 #endif /*XV*/
 
 #ifdef XEPHYR_DRI
+  if (!ephyrNoDRI && !hostx_has_dri ()) {
+      EPHYR_LOG ("host x does not support DRI. Disabling DRI forwarding\n") ;
+      ephyrNoDRI = TRUE ;
+      noGlxVisualInit = FALSE ;
+  }
   if (!ephyrNoDRI) {
     ephyrDRIExtensionInit (pScreen) ;
     ephyrHijackGLXExtension () ;
@@ -635,6 +644,12 @@ ephyrInitScreen (ScreenPtr pScreen)
   }
 #endif
 
+#ifdef GLXEXT
+  if (ephyrNoDRI) {
+      noGlxVisualInit = FALSE ;
+  }
+#endif
+
   return TRUE;
 }
 
diff-tree ea94f59e9b8824b1a638c63e06ca16f0efd43869 (from a7f210e6fcda14eae4de64186904c6c676c758ee)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 12:54:26 2007 +0200

    Xephyr: don't disable glx visual init by default
    
            * hw/kdrive/ephyr/ephyrinit.c:
              (ddxProcessArgument): disabling visual init here
              is bad because it gets disabled even when we want
              to use software GL, leading to Xephyr :1 -nodri
              crashing in mesa.

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 5034ba5..6196996 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -148,8 +148,6 @@ ddxProcessArgument (int argc, char **arg
 {
   EPHYR_DBG("mark argv[%d]='%s'", i, argv[i] );
 
-  noGlxVisualInit = TRUE ;
-
   if (!strcmp (argv[i], "-parent"))
     {
       if(i+1 < argc)
diff-tree a7f210e6fcda14eae4de64186904c6c676c758ee (from 5d6eac1251f1e17baa74d0893bb225b775e8ec2e)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 12:51:08 2007 +0200

    Xephyr: fix a compiler warning

diff --git a/hw/kdrive/ephyr/os.c b/hw/kdrive/ephyr/os.c
index b58daae..4bf6e88 100644
--- a/hw/kdrive/ephyr/os.c
+++ b/hw/kdrive/ephyr/os.c
@@ -28,6 +28,8 @@
 #endif
 #include "ephyr.h"
 
+extern void processScreenArg (char *screen_size, char *parent_id) ;
+
 static int
 EphyrInit (void)
 {
diff-tree 5d6eac1251f1e17baa74d0893bb225b775e8ec2e (from 8018733c39c283a931df424dcfd11e7aefbcd8cf)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 12:47:05 2007 +0200

    Xephyr: remove an unused variable

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 4a6a11d..5034ba5 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -118,7 +118,6 @@ void
 processScreenArg (char *screen_size, char *parent_id)
 {
   KdCardInfo   *card;
-  static int card_exists;
 
   InitCard (0);  /*Put each screen on a separate card*/
   card = KdCardInfoLast ();
diff-tree 8018733c39c283a931df424dcfd11e7aefbcd8cf (from 604ebb5a6de372e6a8a96e0ee997db7929126860)
Author: Dodji Seketeli <dodji at openedhand.com>
Date:   Thu Oct 4 12:06:19 2007 +0200

    Xephyr: better compilation without GLX
    
    	* hw/kdrive/ephyr/ephyrinit.c: protect GLX related code with GLXEXT
    	  macro

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index cc7a367..4a6a11d 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -33,9 +33,12 @@ extern Window EphyrPreExistingHostWin;
 extern Bool   EphyrWantGrayScale;
 extern Bool   kdHasPointer;
 extern Bool   kdHasKbd;
+
+#ifdef GLXEXT
 extern Bool   ephyrNoDRI;
-extern Bool   ephyrNoXV;
 extern Bool noGlxVisualInit;
+#endif
+extern Bool   ephyrNoXV;
 
 void processScreenArg (char *screen_size, char *parent_id) ;
 
@@ -102,7 +105,9 @@ ddxUseMsg (void)
   ErrorF("-grayscale           Simulate 8bit grayscale\n");
   ErrorF("-fakexa              Simulate acceleration using software rendering\n");
   ErrorF("-verbosity <level>   Set log verbosity level\n");
+#ifdef GLXEXT
   ErrorF("-nodri               do not use DRI\n");
+#endif
   ErrorF("-noxv                do not use XV\n");
   ErrorF("\n");
 
@@ -206,6 +211,7 @@ ddxProcessArgument (int argc, char **arg
 	  exit(1) ;
 	}
     }
+#ifdef GLXEXT
   else if (!strcmp (argv[i], "-nodri"))
    {
        noGlxVisualInit = FALSE ;
@@ -213,6 +219,7 @@ ddxProcessArgument (int argc, char **arg
        EPHYR_LOG ("no direct rendering enabled\n") ;
        return 1 ;
    }
+#endif
   else if (!strcmp (argv[i], "-noxv"))
    {
        ephyrNoXV = TRUE ;


More information about the xorg-commit mailing list