Bug#549588: [PATCH] Re: Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-24 Thread Eric

This bug has been fixed in Ubuntu  with the following patches.

mesa (7.6.0-1ubuntu3) karmic; urgency=low

 * Add 109_revert-dma-reuse.patch: Fix assertion failure leading to crash
   on kwin when compositing is enabled.  This reverts commit 284a7af27.
   (LP: #446578)

-- Bryce Harrington br...@ubuntu.com  Tue, 13 Oct 2009 00:52:32 -0700

mesa (7.6.0-1ubuntu2) karmic; urgency=low

 * Add 108_fix_scissors_regression.patch: Fix window drawing regression
   in Kwin on older Radeon hardware.
   (LP: #446425)

-- Bryce Harrington br...@ubuntu.com  Fri, 09 Oct 2009 14:12:44 -0700

108_fix_scissors_regression.patch has already been committed in mesa 
upstream.

109_revert-dma-reuse.patch has not.

I have tested these patches on my own system and can confirm that it 
solves the
KDE crashes and graphics corruption issues on my Dell laptop with a 
Radeon RS690 GPU.


-- Eric


commit 194ede4bf97547ce8a61587ede0b0a5054955783
Author: Alex Deucher alexdeuc...@gmail.com
Date:   Fri Oct 9 15:44:32 2009 -0400

radeon: fix scissor regression

fixes fdo bug 24248

diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 124469b..98f116d 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -1269,11 +1269,15 @@ void r700SetScissor(context_t *context) //---
 		return;
 	}
 	if (context-radeon.state.scissor.enabled) {
-		/* r600 has exclusive scissors */
 		x1 = context-radeon.state.scissor.rect.x1;
 		y1 = context-radeon.state.scissor.rect.y1;
-		x2 = context-radeon.state.scissor.rect.x2 + 1;
-		y2 = context-radeon.state.scissor.rect.y2 + 1;
+		x2 = context-radeon.state.scissor.rect.x2;
+		y2 = context-radeon.state.scissor.rect.y2;
+		/* r600 has exclusive BR scissors */
+		if (context-radeon.radeonScreen-kernel_mm) {
+			x2++;
+			y2++;
+		}
 	} else {
 		if (context-radeon.radeonScreen-driScreen-dri2.enabled) {
 			x1 = 0;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 9817ff8..8032cbc 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -229,16 +229,15 @@ void radeonUpdateScissor( GLcontext *ctx )
 	}
 	if (!rmesa-radeonScreen-kernel_mm) {
 	   /* Fix scissors for dri 1 */
-
 	   __DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa);
 	   x1 += dPriv-x;
-	   x2 += dPriv-x;
+	   x2 += dPriv-x + 1;
 	   min_x += dPriv-x;
-	   max_x += dPriv-x;
+	   max_x += dPriv-x + 1;
 	   y1 += dPriv-y;
-	   y2 += dPriv-y;
+	   y2 += dPriv-y + 1;
 	   min_y += dPriv-y;
-	   max_y += dPriv-y;
+	   max_y += dPriv-y + 1;
 	}
 
 	rmesa-state.scissor.rect.x1 = CLAMP(x1,  min_x, max_x);
diff -Nurp mesa-7.6-revert-dma-reuse-patched/src/mesa/drivers/dri/r200/radeon_dma.c mesa-7.6-revert-dma-reuse-working/src/mesa/drivers/dri/r200/radeon_dma.c
--- mesa-7.6-revert-dma-reuse-patched/src/mesa/drivers/dri/r200/radeon_dma.c	2009-10-08 17:00:00.0 -0700
+++ mesa-7.6-revert-dma-reuse-working/src/mesa/drivers/dri/r200/radeon_dma.c	2009-10-08 17:01:37.0 -0700
@@ -207,6 +207,7 @@ again_alloc:
 		   counter on unused buffers for later freeing them from
 		   begin of list */
 		dma_bo = last_elem(rmesa-dma.free);
+		assert(dma_bo-bo-cref == 1);
 		remove_from_list(dma_bo);
 		insert_at_head(rmesa-dma.reserved, dma_bo);
 	}
@@ -306,10 +307,6 @@ static int radeon_bo_is_idle(struct rade
 		WARN_ONCE(Your libdrm or kernel doesn't have support for busy query.\n
 			This may cause small performance drop for you.\n);
 	}
-	/* Protect against bug in legacy bo handling that causes bos stay
-	 * referenced even after they should be freed */
-	if (bo-cref != 1)
-		return 0;
 	return ret != -EBUSY;
 }
 
@@ -346,9 +343,7 @@ void radeonReleaseDmaRegions(radeonConte
 	foreach_s(dma_bo, temp, rmesa-dma.wait) {
 		if (dma_bo-expire_counter == time) {
 			WARN_ONCE(Leaking dma buffer object!\n);
-			/* force free of buffer so we don't realy start
-			 * leaking stuff now*/
-			while ((dma_bo-bo = radeon_bo_unref(dma_bo-bo))) {}
+			radeon_bo_unref(dma_bo-bo);
 			remove_from_list(dma_bo);
 			FREE(dma_bo);
 			continue;
diff -Nurp mesa-7.6-revert-dma-reuse-patched/src/mesa/drivers/dri/r300/radeon_dma.c mesa-7.6-revert-dma-reuse-working/src/mesa/drivers/dri/r300/radeon_dma.c
--- mesa-7.6-revert-dma-reuse-patched/src/mesa/drivers/dri/r300/radeon_dma.c	2009-10-08 17:00:00.0 -0700
+++ mesa-7.6-revert-dma-reuse-working/src/mesa/drivers/dri/r300/radeon_dma.c	2009-10-08 17:01:37.0 -0700
@@ -207,6 +207,7 @@ again_alloc:
 		   counter on unused buffers for later freeing them from
 		   begin of list */
 		dma_bo = last_elem(rmesa-dma.free);
+		assert(dma_bo-bo-cref == 1);
 		remove_from_list(dma_bo);
 		insert_at_head(rmesa-dma.reserved, dma_bo);
 	}
@@ -306,10 +307,6 @@ static int radeon_bo_is_idle(struct rade
 		WARN_ONCE(Your libdrm or kernel doesn't have support for busy query.\n
 			This may cause small performance 

Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-21 Thread Julien Cristau
On Wed, Oct 21, 2009 at 20:15:27 +0300, Modestas Vainius wrote:

 The bug is a regression which causes Xserver crash (which by itself
 might mean data loss).

No, it doesn't mean that at all.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-21 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 severity 549588 grave
Bug #549588 [libgl1-mesa-dri] xserver-xorg-core: Loading glx module causes X 
server to crash
Bug #550691 [libgl1-mesa-dri] xserver-xorg-core: after start mouse pointer 
leaves trail and xorg crashes shortly afterward
Severity set to 'grave' from 'important'

Severity set to 'grave' from 'important'

 tags 549588 upstream
Bug #549588 [libgl1-mesa-dri] xserver-xorg-core: Loading glx module causes X 
server to crash
Bug #550691 [libgl1-mesa-dri] xserver-xorg-core: after start mouse pointer 
leaves trail and xorg crashes shortly afterward
Added tag(s) upstream.
Added tag(s) upstream.
 retitle 549588 regression: DRI crashes Xserver with many radeon cards
Bug #549588 [libgl1-mesa-dri] xserver-xorg-core: Loading glx module causes X 
server to crash
Bug #550691 [libgl1-mesa-dri] xserver-xorg-core: after start mouse pointer 
leaves trail and xorg crashes shortly afterward
Changed Bug title to 'regression: DRI crashes Xserver with many radeon cards' 
from 'xserver-xorg-core: Loading glx module causes X server to crash'
Changed Bug title to 'regression: DRI crashes Xserver with many radeon cards' 
from 'xserver-xorg-core: after start mouse pointer leaves trail and xorg 
crashes shortly afterward'
 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-21 Thread Modestas Vainius
severity 549588 grave
tags 549588 upstream
retitle 549588 regression: DRI crashes Xserver with many radeon cards
thanks

Hello,

On trečiadienis 14 Spalis 2009 18:17:56 ender wrote:
 
  On Mon, 2009-10-05 at 13:18 +0200, Julien Cristau wrote:
   On Sun, Oct  4, 2009 at 17:30:33 -0400, Arnout Boelens wrote:
X: radeon_bo_legacy.c:207: legacy_is_pending: Assertion
`bo_legacy-is_pending = bo-cref' failed.
  
   I failed to notice this one, Michel says It's a known bug which was
   reported upstream a while ago.
 
  See above.
 

All you need to do is to revert a single commit (see upstream bug report, see 
ubuntu bug) to fix this random, but very common crash. This bug affects KDE 
very painfully due to its default settings [1]. It is rather unfortunate, that 
upstream does not seem to care. But then it comes the time for Debian 
maintainers to act.

The bug is a regression which causes Xserver crash (which by itself might mean 
data loss). Therefore, up'ing the severity to grave.

1. https://bugs.freedesktop.org/show_bug.cgi?id=24131#c12

-- 
Modestas Vainius modes...@vainius.eu


signature.asc
Description: This is a digitally signed message part.


Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-21 Thread Modestas Vainius
Hello,

On trečiadienis 21 Spalis 2009 20:27:02 Julien Cristau wrote:
 On Wed, Oct 21, 2009 at 20:15:27 +0300, Modestas Vainius wrote:
  The bug is a regression which causes Xserver crash (which by itself
  might mean data loss).
 
 No, it doesn't mean that at all.

Yeah yeah, depends on what is open and how much unsaved data is there. But if 
this wasn't a regression, grave severity would probably be unjustified even if 
it makes default KDE setup on most radeon cards almost unusable.

-- 
Modestas Vainius modes...@vainius.eu


signature.asc
Description: This is a digitally signed message part.


Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-05 Thread Julien Cristau
On Sun, Oct  4, 2009 at 17:30:33 -0400, Arnout Boelens wrote:

 X: radeon_bo_legacy.c:207: legacy_is_pending: Assertion 
 `bo_legacy-is_pending = bo-cref' failed.
 
I failed to notice this one, Michel says It's a known bug which was
reported upstream a while ago.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-05 Thread Michel Dänzer
reassign 549588 libgl1-mesa-dri 7.6-1
forwarded 549588 https://bugs.freedesktop.org/show_bug.cgi?id=24131
kthxbye

On Mon, 2009-10-05 at 13:18 +0200, Julien Cristau wrote: 
 On Sun, Oct  4, 2009 at 17:30:33 -0400, Arnout Boelens wrote:
 
  X: radeon_bo_legacy.c:207: legacy_is_pending: Assertion 
  `bo_legacy-is_pending = bo-cref' failed.
  
 I failed to notice this one, Michel says It's a known bug which was
 reported upstream a while ago.

See above.


-- 
Earthling Michel Dänzer   |http://www.vmware.com
Libre software enthusiast |  Debian, X and DRI developer



--
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-05 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 reassign 549588 libgl1-mesa-dri 7.6-1
Bug #549588 [xserver-xorg-core] xserver-xorg-core: Loading glx module causes X 
server to crash
Bug reassigned from package 'xserver-xorg-core' to 'libgl1-mesa-dri'.
Bug No longer marked as found in versions xorg-server/2:1.6.4-2.
Bug #549588 [libgl1-mesa-dri] xserver-xorg-core: Loading glx module causes X 
server to crash
There is no source info for the package 'libgl1-mesa-dri' at version '7.6-1' 
with architecture ''
Unable to make a source version for version '7.6-1'
Bug Marked as found in versions 7.6-1.
 forwarded 549588 https://bugs.freedesktop.org/show_bug.cgi?id=24131
Bug #549588 [libgl1-mesa-dri] xserver-xorg-core: Loading glx module causes X 
server to crash
Set Bug forwarded-to-address to 
'https://bugs.freedesktop.org/show_bug.cgi?id=24131'.
 kthxbye
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-05 Thread Arnout Boelens
On Monday 05 October 2009 08:50:47 Michel Dänzer wrote:
 reassign 549588 libgl1-mesa-dri 7.6-1
 forwarded 549588 https://bugs.freedesktop.org/show_bug.cgi?id=24131
 kthxbye

Thanks,

Arnout

 On Mon, 2009-10-05 at 13:18 +0200, Julien Cristau wrote:
  On Sun, Oct  4, 2009 at 17:30:33 -0400, Arnout Boelens wrote:
   X: radeon_bo_legacy.c:207: legacy_is_pending: Assertion
   `bo_legacy-is_pending = bo-cref' failed.
 
  I failed to notice this one, Michel says It's a known bug which was
  reported upstream a while ago.
 
 See above.


smime.p7s
Description: S/MIME cryptographic signature


Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-04 Thread Julien Cristau
On Sun, Oct  4, 2009 at 11:34:40 -0400, Arnout Boelens wrote:

 Without disabling the glx module, with both the radeon and the radeonHD 
 driver,
 my X server crashes about 1 minute after logging in. Adding the below module
 section to xorg.conf prevents the x server from crashing, but also means I do
 not have any 3D acceleration..
 
Please send the log corresponding to that crash.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#549588: xserver-xorg-core: Loading glx module causes X server to crash

2009-10-04 Thread Julien Cristau
On Sun, Oct  4, 2009 at 17:30:33 -0400, Arnout Boelens wrote:

 On Sunday 04 October 2009 12:57:18 Julien Cristau wrote:
  On Sun, Oct  4, 2009 at 11:34:40 -0400, Arnout Boelens wrote:
   Without disabling the glx module, with both the radeon and the radeonHD
   driver, my X server crashes about 1 minute after logging in. Adding the
   below module section to xorg.conf prevents the x server from crashing,
   but also means I do not have any 3D acceleration..
  
  Please send the log corresponding to that crash.
 
 See attachment
 
Looks like the X server is shutting down normally, no crash...

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org