Skip to contentSkip to conversation

2.6.37-rc2-git7 regression: wine fails to start

DISCUSSION Jean Delvare 3 participants 11 messages Nov 21, 2010 – Dec 13, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

X.org version is 7.5.

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 11 lines · Jean Delvare

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

Quoted 7 lines

X.org version is 7.5.

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Which exposes a bug in the 3D driver in certain cases. For some reason we get a cb height of 8192 or greater in some cases in the 3D driver. I haven't had time to look into why. You might try r600g for comparison.

Alex

Quoted 8 lines

--
Jean Delvare
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Hi Alex,

Thanks for your fast answer.

Quoted 14 lines · Alex Deucher
Quoted 13 lines · Jean Delvare

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

X.org version is 7.5.

Quoted 8 lines
Quoted 5 lines

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Your guess was correct: after applying the above patch to kernel 2.6.36, I get the same problem.

Quoted 4 lines

Which exposes a bug in the 3D driver in certain cases. For some reason we get a cb height of 8192 or greater in some cases in the 3D driver. I haven't had time to look into why. You might try r600g for comparison.

Not sure how to "try r600g"?

Signature · 1 line
Jean Delvare
#3 lore raw
Quoted 31 lines · Jean Delvare

Hi Alex,

Thanks for your fast answer.

Quoted 14 lines · Alex Deucher
Quoted 13 lines · Jean Delvare

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

X.org version is 7.5.

Quoted 8 lines
Quoted 5 lines

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Your guess was correct: after applying the above patch to kernel 2.6.36, I get the same problem.

Quoted 6 lines
Quoted 4 lines

Which exposes a bug in the 3D driver in certain cases.  For some reason we get a cb height of 8192 or greater in some cases in the 3D driver.  I haven't had time to look into why.  You might try r600g for comparison.

Not sure how to "try r600g"?

It's a newer driver for r6xx+ hardware. Configure mesa
(http://cgit.freedesktop.org/mesa/mesa) with --enable-gallium-r600.

I actually talked to Dave earlier today, and the problem is more likely a command buffer getting flushed at the wrong time leading to a buffer without cb info in it.

Alex

Quoted 4 lines

--
Jean Delvare

#4 lore raw

Hi Alex,

Quoted 13 lines · Alex Deucher
Quoted 12 lines · Jean Delvare
Quoted 2 lines · Alex Deucher

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Your guess was correct: after applying the above patch to kernel 2.6.36, I get the same problem.

Quoted 4 lines

Which exposes a bug in the 3D driver in certain cases.  For some reason we get a cb height of 8192 or greater in some cases in the 3D driver.  I haven't had time to look into why.  You might try r600g for comparison.

Quoted 4 lines
Quoted 1 line

Not sure how to "try r600g"?

It's a newer driver for r6xx+ hardware. Configure mesa
(http://cgit.freedesktop.org/mesa/mesa) with --enable-gallium-r600.

Unfortunately the thing doesn't seem to be willing to build on my system :( It won't find talloc even though it is installed. I don't have more time to spend on this.

Quoted 3 lines

I actually talked to Dave earlier today, and the problem is more likely a command buffer getting flushed at the wrong time leading to a buffer without cb info in it.

I think I'll just wait for you to come up with a fix :) I am in no hurry, I only use wine once in a while. Let me know if I can help with testing.

Signature · 1 line
Jean Delvare
#5 lore raw
In reply to Alex Deucher

Hi Alex, David,

Quoted 20 lines · Alex Deucher
Quoted 11 lines · Jean Delvare

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

Quoted 7 lines

X.org version is 7.5.

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

Quoted 7 lines

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Which exposes a bug in the 3D driver in certain cases. For some reason we get a cb height of 8192 or greater in some cases in the 3D driver. I haven't had time to look into why. You might try r600g for comparison.

Any progress on this? Linus' latest kernel (2.6.37-rc5-git3) still has the problem. And this is a regression, so I don't think you can just ignore it.

Is there a bug opened to track this bug already? I couldn't find one on bugzilla.kernel.org, but maybe I missed it. If there is none, I'll create one.

Signature · 1 line
Jean Delvare
#6 lore raw
Quoted 31 lines · Jean Delvare

Hi Alex, David,

Quoted 20 lines · Alex Deucher
Quoted 11 lines · Jean Delvare

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

Quoted 7 lines

X.org version is 7.5.

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

Quoted 7 lines

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Which exposes a bug in the 3D driver in certain cases.  For some reason we get a cb height of 8192 or greater in some cases in the 3D driver.  I haven't had time to look into why.  You might try r600g for comparison.

Quoted 7 lines

Any progress on this? Linus' latest kernel (2.6.37-rc5-git3) still has the problem. And this is a regression, so I don't think you can just ignore it.

Is there a bug opened to track this bug already? I couldn't find one on bugzilla.kernel.org, but maybe I missed it. If there is none, I'll create one.

Was it not fixed by this commit?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a235e4c9302509ac5956bbbffa22eb5ed9fcdc54
If not, open a bug and attach the dmesg with the error messages.

Alex

#7 lore raw
Quoted 36 lines · Alex Deucher
Quoted 35 lines · Jean Delvare

Hi Alex, David,

Quoted 20 lines · Alex Deucher
Quoted 11 lines · Jean Delvare

Running 2.6.37-rc2-git7 on x86_64, wine fails to start. I get the following error in the kernel logs:

radeon 0000:07:00.0: r600_cs_track_validate_cb offset[0] 0 2095360 4096 too big radeon 0000:07:00.0: r600_packet3_check:1331 invalid cmd stream 484 [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

Hardware is:
07:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] 07:00.1 Audio device: ATI Technologies Inc RV710/730

Quoted 7 lines

X.org version is 7.5.

With kernel 2.6.36, wine works just fine on the same system. Does it ring a bell to anyone? Any clue how to investigate this bug? If not, I can start a bisection.

I can also provide any additional data you need for investigation.

Quoted 7 lines

It's probably this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f30df2fad0c901e74ac9a52a488a54c69a373a41

Which exposes a bug in the 3D driver in certain cases.  For some reason we get a cb height of 8192 or greater in some cases in the 3D driver.  I haven't had time to look into why.  You might try r600g for comparison.

Any progress on this? Linus' latest kernel (2.6.37-rc5-git3) still has the problem. And this is a regression, so I don't think you can just ignore it.

Quoted 8 lines
Quoted 3 lines

Is there a bug opened to track this bug already? I couldn't find one on bugzilla.kernel.org, but maybe I missed it. If there is none, I'll create one.

Was it not fixed by this commit?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a235e4c9302509ac5956bbbffa22eb5ed9fcdc54
If not, open a bug and attach the dmesg with the error messages.

Does the attached patch fix it?

Alex

Quoted 2 lines

Alex

From bf10ef9418009653d50ee0d922332b6c9bce2fdd Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Sun, 12 Dec 2010 23:29:23 -0500
Subject: [PATCH] drm/radeon/kms: disable the r600 cb offset checker for linear surfaces

There are too many strange corner cases triggered in old userspace drivers out there to that it's nearly impossible to not break some obscure app.

---
 drivers/gpu/drm/radeon/r600_cs.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/radeon/r600_cs.c +4 -5
index 0f90fc3..7831e08 100644
@@ -315,11 +315,10 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
 		if (array_mode == V_0280A0_ARRAY_LINEAR_GENERAL) {
 			/* the initial DDX does bad things with the CB size occasionally */
 			/* it rounds up height too far for slice tile max but the BO is smaller */
-			tmp = (height - 7) * 8 * bpe;
-			if ((tmp + track->cb_color_bo_offset[i]) > radeon_bo_size(track->cb_color_bo[i])) {
-				dev_warn(p->dev, "%s offset[%d] %d %d %lu too big\n", __func__, i, track->cb_color_bo_offset[i], tmp, radeon_bo_size(track->cb_color_bo[i]));
-				return -EINVAL;
-			}
+			/* r600c,g also seem to flush at bad times in some apps resulting in
+			 * bogus values here. So for linear just allow anything to avoid breaking
+			 * broken userspace.
+			 */
 		} else {
 			dev_warn(p->dev, "%s offset[%d] %d %d %lu too big\n", __func__, i, track->cb_color_bo_offset[i], tmp, radeon_bo_size(track->cb_color_bo[i]));
 			return -EINVAL;
Signature · 1 line
1.7.1.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

Hi Alex,

Quoted 6 lines · Alex Deucher
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Jean Delvare

Any progress on this? Linus' latest kernel (2.6.37-rc5-git3) still has the problem. And this is a regression, so I don't think you can just ignore it.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Is there a bug opened to track this bug already? I couldn't find one on bugzilla.kernel.org, but maybe I missed it. If there is none, I'll create one.

Was it not fixed by this commit?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a235e4c9302509ac5956bbbffa22eb5ed9fcdc54

Not, it wasn't.

Quoted 3 lines
Quoted 1 line

If not, open a bug and attach the dmesg with the error messages.

Does the attached patch fix it?

Yes it does, thanks!

If you consider that user-space applications failing these tests are broken, maybe you could use printk_once() to let them know? Otherwise I suspect they will never get fixed. I think there's a way to get the name of the faulty process and include it in the message.

Signature · 1 line
Jean Delvare
maintainer
#9 lore raw
Quoted 20 lines · Jean Delvare

Hi Alex,

Quoted 6 lines · Alex Deucher
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Jean Delvare

Any progress on this? Linus' latest kernel (2.6.37-rc5-git3) still has the problem. And this is a regression, so I don't think you can just ignore it.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Is there a bug opened to track this bug already? I couldn't find one on bugzilla.kernel.org, but maybe I missed it. If there is none, I'll create one.

Was it not fixed by this commit?
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a235e4c9302509ac5956bbbffa22eb5ed9fcdc54

Not, it wasn't.

Quoted 2 lines
Quoted 1 line

If not, open a bug and attach the dmesg with the error messages.

Quoted 8 lines
Quoted 1 line

Does the attached patch fix it?

Yes it does, thanks!

If you consider that user-space applications failing these tests are broken, maybe you could use printk_once() to let them know? Otherwise I suspect they will never get fixed. I think there's a way to get the name of the faulty process and include it in the message.

No its a problem with developing GPU drivers, you write some code in userspace that seems correct, it gets rolled out, you later add a new feature like tiling, find a bug in the kernel checker code, realise the userspace code is wrong, and give up and become a farmer.

Dave.

#10 lore raw
Quoted 4 lines · Dave Airlie

No its a problem with developing GPU drivers, you write some code in userspace that seems correct, it gets rolled out, you later add a new feature like tiling, find a bug in the kernel checker code, realise the userspace code is wrong, and give up and become a farmer.

I wish you success in you upcoming endeavour! :D

I know what you mean. The kernel/user-space interface is sometimes very difficult to live with.

Signature · 1 line
Jean Delvare