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

mesa: Changes to 'ubuntu'



 debian/changelog                                                 |   12 
 debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff |  182 ++++++++++
 debian/patches/series                                            |    1 
 3 files changed, 195 insertions(+)

New commits:
commit 55ffb8ebe7a8046a1103e04aca3ab12af21182a8
Author: Bryce Harrington <bryce@bryceharrington.org>
Date:   Mon May 4 12:41:24 2009 -0700

    Patch from mnemo to fix segfault in r300/r400 (LP: #368049)

diff --git a/debian/changelog b/debian/changelog
index 0824c99..06b6b9f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+mesa (7.4-0ubuntu3.1) jaunty-proposed; urgency=low
+
+  * debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff:
+    fix xserver segv triggered by compiz ring switcher plugin for users
+    with r300/r400 radeon chipsets and -ati driver. Patch previously
+    commited to mesa master as c28707b50701b1cf8727be29d61e2d939c6ee58f
+    and also to mesa_7_4_branch as a1ce4efefbb7f796a0a24544a1e893a56848f0c1.
+    Note: it was commited to the 7.4 branch after mesa 7.4.0 release.
+    (LP: #368049)
+
+ -- Martin Olsson <martin@minimum.se>  Mon, 04 May 2009 12:25:29 +0200
+
 mesa (7.4-0ubuntu3) jaunty; urgency=low
 
   * Disable 103_bump_965_texture_limit.diff.  This is suspected to cause X
diff --git a/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff b/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff
index 6d72a52..3900b01 100644
--- a/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff
+++ b/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff
@@ -89,3 +89,94 @@ Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c
  	}
  
  	return !t->border_fallback;
+#
+# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/368049
+# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=17895
+# Patch: http://cgit.freedesktop.org/mesa/mesa/commit/?h=mesa_7_4_branch&id=a1ce4efefbb7f796a0a24544a1e893a56848f0c1
+# Description: fix xserver segv triggered by compiz ring switcher plugin for users
+#   with r300/r400 radeon chipsets and -ati driver. Patch previously
+#   commited to mesa master as c28707b50701b1cf8727be29d61e2d939c6ee58f
+#   and also to mesa_7_4_branch as a1ce4efefbb7f796a0a24544a1e893a56848f0c1.
+#   Note: it was commited to the 7.4 branch after mesa 7.4.0 release.
+#   (LP: #368049)
+#
+
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_context.h
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_context.h	2009-05-04 12:07:48.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_context.h	2009-05-04 12:08:56.000000000 +0200
+@@ -211,7 +211,7 @@
+ };
+ 
+ struct r300_texture_env_state {
+-	r300TexObjPtr texobj;
++	struct gl_texture_object *texobj;
+ 	GLenum format;
+ 	GLenum envMode;
+ };
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_state.c
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_state.c	2009-05-04 12:07:59.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_state.c	2009-05-04 12:08:56.000000000 +0200
+@@ -1487,7 +1487,7 @@
+ #endif
+ 			tmu_mappings[i] = hw_tmu;
+ 
+-			t = r300->state.texture.unit[i].texobj;
++			t = (r300TexObjPtr) r300->state.texture.unit[i].texobj->DriverData;
+ 			/* XXX questionable fix for bug 9170: */
+ 			if (!t)
+ 				continue;
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texmem.c
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_texmem.c	2009-05-04 12:08:07.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_texmem.c	2009-05-04 12:08:56.000000000 +0200
+@@ -44,6 +44,7 @@
+ #include "main/colormac.h"
+ #include "main/macros.h"
+ #include "main/simple_list.h"
++#include "main/texobj.h"
+ #include "radeon_reg.h"		/* gets definition for usleep */
+ #include "r300_context.h"
+ #include "r300_state.h"
+@@ -71,8 +72,8 @@
+ 	}
+ 
+ 	for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
+-		if (rmesa->state.texture.unit[i].texobj == t) {
+-			rmesa->state.texture.unit[i].texobj = NULL;
++		if (rmesa->state.texture.unit[i].texobj == t->base.tObj) {
++			_mesa_reference_texobj(&rmesa->state.texture.unit[i].texobj, NULL);
+ 		}
+ 	}
+ }
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_texstate.c	2009-05-04 12:08:17.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c	2009-05-04 12:08:56.000000000 +0200
+@@ -567,19 +567,20 @@
+ 	/* Update state if this is a different texture object to last
+ 	 * time.
+ 	 */
+-	if (rmesa->state.texture.unit[unit].texobj != t) {
++	if (rmesa->state.texture.unit[unit].texobj != tObj) {
+ 		if (rmesa->state.texture.unit[unit].texobj != NULL) {
++			r300TexObjPtr t_old = (r300TexObjPtr) rmesa->state.texture.unit[unit].texobj->DriverData;
++
+ 			/* The old texture is no longer bound to this texture unit.
+ 			 * Mark it as such.
+ 			 */
+ 
+-			rmesa->state.texture.unit[unit].texobj->base.bound &=
+-			    ~(1 << unit);
++			t_old->base.bound &= ~(1 << unit);
+ 		}
+ 
+-		rmesa->state.texture.unit[unit].texobj = t;
++		_mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, tObj);
+ 		t->base.bound |= (1 << unit);
+-		driUpdateTextureLRU((driTextureObject *) t);	/* XXX: should be locked! */
++		driUpdateTextureLRU(&t->base);	/* XXX: should be locked! */
+ 	}
+ 
+ 	return !t->border_fallback;
diff --git a/debian/patches/series b/debian/patches/series
index 9e646e4..131afdb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
 #103_bump_965_texture_limit.diff
 104_fix_dri2_ext_tfp.diff
 105_glXWaitX_segfaults.patch
+106_compiz_ring_switcher_xorg_segv_on_radeon.diff

commit 789ecb55156c0c11230a845ab7b6aa659927e857
Author: Bryce Harrington <bryce@bryceharrington.org>
Date:   Mon May 4 10:18:08 2009 -0700

    Patch from mnemo to fix crash in R300/R400 cards

diff --git a/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff b/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff
new file mode 100644
index 0000000..6d72a52
--- /dev/null
+++ b/debian/patches/106_compiz_ring_switcher_xorg_segv_on_radeon.diff
@@ -0,0 +1,91 @@
+#
+# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/368049
+# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=17895
+# Patch: http://cgit.freedesktop.org/mesa/mesa/commit/?h=mesa_7_4_branch&id=a1ce4efefbb7f796a0a24544a1e893a56848f0c1
+# Description: fix xserver segv triggered by compiz ring switcher plugin for users
+#   with r300/r400 radeon chipsets and -ati driver. Patch previously
+#   commited to mesa master as c28707b50701b1cf8727be29d61e2d939c6ee58f
+#   and also to mesa_7_4_branch as a1ce4efefbb7f796a0a24544a1e893a56848f0c1.
+#   Note: it was commited to the 7.4 branch after mesa 7.4.0 release.
+#   (LP: #368049)
+#
+
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_context.h
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_context.h	2009-05-04 12:07:48.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_context.h	2009-05-04 12:08:56.000000000 +0200
+@@ -211,7 +211,7 @@
+ };
+ 
+ struct r300_texture_env_state {
+-	r300TexObjPtr texobj;
++	struct gl_texture_object *texobj;
+ 	GLenum format;
+ 	GLenum envMode;
+ };
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_state.c
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_state.c	2009-05-04 12:07:59.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_state.c	2009-05-04 12:08:56.000000000 +0200
+@@ -1487,7 +1487,7 @@
+ #endif
+ 			tmu_mappings[i] = hw_tmu;
+ 
+-			t = r300->state.texture.unit[i].texobj;
++			t = (r300TexObjPtr) r300->state.texture.unit[i].texobj->DriverData;
+ 			/* XXX questionable fix for bug 9170: */
+ 			if (!t)
+ 				continue;
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texmem.c
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_texmem.c	2009-05-04 12:08:07.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_texmem.c	2009-05-04 12:08:56.000000000 +0200
+@@ -44,6 +44,7 @@
+ #include "main/colormac.h"
+ #include "main/macros.h"
+ #include "main/simple_list.h"
++#include "main/texobj.h"
+ #include "radeon_reg.h"		/* gets definition for usleep */
+ #include "r300_context.h"
+ #include "r300_state.h"
+@@ -71,8 +72,8 @@
+ 	}
+ 
+ 	for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
+-		if (rmesa->state.texture.unit[i].texobj == t) {
+-			rmesa->state.texture.unit[i].texobj = NULL;
++		if (rmesa->state.texture.unit[i].texobj == t->base.tObj) {
++			_mesa_reference_texobj(&rmesa->state.texture.unit[i].texobj, NULL);
+ 		}
+ 	}
+ }
+Index: mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c
+===================================================================
+--- mesa-7.4.orig/src/mesa/drivers/dri/r300/r300_texstate.c	2009-05-04 12:08:17.000000000 +0200
++++ mesa-7.4/src/mesa/drivers/dri/r300/r300_texstate.c	2009-05-04 12:08:56.000000000 +0200
+@@ -567,19 +567,20 @@
+ 	/* Update state if this is a different texture object to last
+ 	 * time.
+ 	 */
+-	if (rmesa->state.texture.unit[unit].texobj != t) {
++	if (rmesa->state.texture.unit[unit].texobj != tObj) {
+ 		if (rmesa->state.texture.unit[unit].texobj != NULL) {
++			r300TexObjPtr t_old = (r300TexObjPtr) rmesa->state.texture.unit[unit].texobj->DriverData;
++
+ 			/* The old texture is no longer bound to this texture unit.
+ 			 * Mark it as such.
+ 			 */
+ 
+-			rmesa->state.texture.unit[unit].texobj->base.bound &=
+-			    ~(1 << unit);
++			t_old->base.bound &= ~(1 << unit);
+ 		}
+ 
+-		rmesa->state.texture.unit[unit].texobj = t;
++		_mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, tObj);
+ 		t->base.bound |= (1 << unit);
+-		driUpdateTextureLRU((driTextureObject *) t);	/* XXX: should be locked! */
++		driUpdateTextureLRU(&t->base);	/* XXX: should be locked! */
+ 	}
+ 
+ 	return !t->border_fallback;


Reply to: