[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: r1233 - in trunk/debian: . local patches



Author: branden
Date: 2004-04-11 19:40:32 -0500 (Sun, 11 Apr 2004)
New Revision: 1233

Added:
   trunk/debian/patches/104_sparc_fix_GL_library.diff
Modified:
   trunk/debian/changelog
   trunk/debian/local/xdm.options
Log:
Improve explanation of why #241539 is fixed.


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-04-12 00:18:02 UTC (rev 1232)
+++ trunk/debian/changelog	2004-04-12 00:40:32 UTC (rev 1233)
@@ -137,13 +137,15 @@
     directly.
 
   * Improve xfs package's maintainer scripts:
+    + Always start the daemon on package install (as opposed to upgrade).
+      (Closes: #241539)
     + Replace xfs "upgrade" flag file with two distinct ones, "install" and
       "daemon-not-stopped".  Create install flag file when preinst script is
       invoked with "install" argument; remove in postinst, and in postrm when
       invoked with "abort-install" or "abort-upgrade" argument.  Create
       "daemon-not-stopped" flag file in prerm script if the daemon is not
       stopped with invoke-rc.d; remove in postinst, and in postrm when invoked
-      with "abort-upgrade" argument.  (Closes: #241539)
+      with "abort-upgrade" argument.
     + Duplicate the postinst's daemon logic in the postrm when invoked with
       the "abort-upgrade" argument; this way the daemon is restarted if it was
       stopped for upgrade, but the upgrade failed.

Modified: trunk/debian/local/xdm.options
===================================================================
--- trunk/debian/local/xdm.options	2004-04-12 00:18:02 UTC (rev 1232)
+++ trunk/debian/local/xdm.options	2004-04-12 00:40:32 UTC (rev 1233)
@@ -1,8 +1,9 @@
-# /etc/X11/xdm.options
+# $Id$
 #
 # configuration options for xdm
 # See xdm.options(5) for an explanation of the available options.
 
 no-ignore-nologin
 no-restart-on-upgrade
+no-start-on-install
 use-sessreg


Property changes on: trunk/debian/local/xdm.options
___________________________________________________________________
Name: svn:keywords
   + Id

Added: trunk/debian/patches/104_sparc_fix_GL_library.diff
===================================================================
--- trunk/debian/patches/104_sparc_fix_GL_library.diff	2004-04-12 00:18:02 UTC (rev 1232)
+++ trunk/debian/patches/104_sparc_fix_GL_library.diff	2004-04-12 00:40:32 UTC (rev 1233)
@@ -0,0 +1,135 @@
+$Id$
+
+As XFree86 puts it:
+
+  Fix sparc asm glapi initialisation in libGL when using indirect rendering
+  (GLX) (Bugzilla #923, Ferris McCormick).
+
+Also see Debian #241331.
+
+This was adapted from revision 1.22 of xc/lib/GL/glx/glxext.c in XFree86
+CVS.
+
+This patch by Ferris McCormick.
+
+--- xc/lib/GL/glx/glxext.c~	2004-04-11 19:24:43.000000000 -0500
++++ xc/lib/GL/glx/glxext.c	2004-04-11 19:27:35.000000000 -0500
+@@ -58,6 +58,37 @@
+ void __glXDumpDrawBuffer(__GLXcontext *ctx);
+ #endif
+ 
++#ifdef USE_SPARC_ASM
++/*
++ * This is where our dispatch table's bounds are.
++ * And the static mesa_init is taken directly from
++ * Mesa's 'sparc.c' initializer.
++ *
++ * We need something like this here, because this version
++ * of openGL/glx never initializes a Mesa context, and so
++ * the address of the dispatch table pointer never gets stuffed
++ * into the dispatch jump table otherwise.
++ *
++ * It matters only on SPARC, and only if you are using assembler
++ * code instead of C-code indirect dispatch.
++ *
++ * -- FEM, 04.xii.03
++ */
++extern unsigned int _mesa_sparc_glapi_begin;
++extern unsigned int _mesa_sparc_glapi_end;
++extern void __glapi_sparc_icache_flush(unsigned int *);
++static void _glx_mesa_init_sparc_glapi_relocs(void);
++static int _mesa_sparc_needs_init = 1;
++#define INIT_MESA_SPARC { \
++    if(_mesa_sparc_needs_init) { \
++      _glx_mesa_init_sparc_glapi_relocs(); \
++      _mesa_sparc_needs_init = 0; \
++  } \
++}
++#else
++#define INIT_MESA_SPARC
++#endif
++
+ /*
+ ** We setup some dummy structures here so that the API can be used
+ ** even if no context is current.
+@@ -489,6 +520,7 @@
+     }
+ #endif
+ 
++    INIT_MESA_SPARC
+     /* The one and only long long lock */
+     __glXLock();
+ 
+@@ -603,6 +635,7 @@
+ 
+ 	if (gc->currentDpy == dpy) {
+ 	    /* Use opcode from gc because its right */
++            INIT_MESA_SPARC
+ 	    return gc->majorOpcode;
+ 	} else {
+ 	    /*
+@@ -1029,3 +1062,64 @@
+     }	    
+ }
+ #endif
++
++/*
++ * Used only when we are sparc, using sparc assembler.
++ *
++ */
++
++static void
++_glx_mesa_init_sparc_glapi_relocs(void)
++{
++#ifdef  USE_SPARC_ASM
++	unsigned int *insn_ptr, *end_ptr;
++	unsigned long disp_addr;
++
++	insn_ptr = &_mesa_sparc_glapi_begin;
++	end_ptr = &_mesa_sparc_glapi_end;
++	disp_addr = (unsigned long) &_glapi_Dispatch;
++
++	/*
++	 * Verbatim from Mesa sparc.c.  It's needed because there doesn't
++	 * seem to be a better way to do this:
++	 *
++	 * UNCONDITIONAL_JUMP ( (*_glapi_Dispatch) + entry_offset )
++	 *
++	 * This code is patching in the ADDRESS of the pointer to the
++	 * dispatch table.  Hence, it must be called exactly once, because
++	 * that address is not going to change.
++	 *
++	 * What it points to can change, but Mesa (and hence, we) assume
++	 * that there is only one pointer.
++	 *
++	 */
++	while (insn_ptr < end_ptr) {
++# if ( defined(__sparc_v9__) && ( !defined(__linux__) || defined(__linux_64__) ) )
++/*
++	This code patches for 64-bit addresses.  This had better
++	not happen for Sparc/Linux, no matter what architecture we
++	are building for.  So, don't do this.
++
++	The 'defined(__linux_64__)' is used here as a placeholder for
++	when we do do 64-bit usermode on sparc linux.
++	*/
++		insn_ptr[0] |= (disp_addr >> (32 + 10));
++		insn_ptr[1] |= ((disp_addr & 0xffffffff) >> 10);
++		__glapi_sparc_icache_flush(&insn_ptr[0]);
++		insn_ptr[2] |= ((disp_addr >> 32) & ((1 << 10) - 1));
++		insn_ptr[3] |= (disp_addr & ((1 << 10) - 1));
++		__glapi_sparc_icache_flush(&insn_ptr[2]);
++		insn_ptr += 11;
++# else
++		insn_ptr[0] |= (disp_addr >> 10);
++		insn_ptr[1] |= (disp_addr & ((1 << 10) - 1));
++		__glapi_sparc_icache_flush(&insn_ptr[0]);
++		insn_ptr += 5;
++# endif
++#else
++		/*
++		 * Just no-op
++		 */
++#endif  /* sparc ASM in use */
++	}
++}


Property changes on: trunk/debian/patches/104_sparc_fix_GL_library.diff
___________________________________________________________________
Name: svn:keywords
   + Id



Reply to: