Re: 2.6.37-rc2-git7 regression: wine fails to start

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

 



On Sun, Dec 12, 2010 at 7:31 PM, Alex Deucher <alexdeucher@xxxxxxxxx> wrote:
> On Fri, Dec 10, 2010 at 7:01 AM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
>> Hi Alex, David,
>>
>> On Sun, 21 Nov 2010 11:12:32 -0500, Alex Deucher wrote:
>>> On Sun, Nov 21, 2010 at 9:38 AM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
>>> > 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.
>>>
>>> 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.
>
> 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

> Alex
>
From bf10ef9418009653d50ee0d922332b6c9bce2fdd Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeucher@xxxxxxxxx>
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.

Signed-off-by: Alex Deucher <alexdeucher@xxxxxxxxx>
---
 drivers/gpu/drm/radeon/r600_cs.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 0f90fc3..7831e08 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -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;
-- 
1.7.1.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux