All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: 2.6.37-rc2-git7 regression: wine fails to start
Date: Sun, 12 Dec 2010 23:33:42 -0500	[thread overview]
Message-ID: <AANLkTi=eEo5MacissFNed_Gn+Js+sOHzH7QnL+XQ2bXi@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimkq1C6Gnp2UpNRvE5FGQ0Dx6aYmseG0-Oj3mx=@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]

On Sun, Dec 12, 2010 at 7:31 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Fri, Dec 10, 2010 at 7:01 AM, Jean Delvare <khali@linux-fr.org> 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@linux-fr.org> 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
>

[-- Attachment #2: 0001-drm-radeon-kms-disable-the-r600-cb-offset-checker-fo.patch --]
[-- Type: text/x-patch, Size: 1713 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2010-12-13  4:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 14:38 2.6.37-rc2-git7 regression: wine fails to start Jean Delvare
2010-11-21 16:12 ` Alex Deucher
2010-11-21 18:51   ` Jean Delvare
2010-11-22  0:57     ` Alex Deucher
2010-11-22 12:56       ` Jean Delvare
2010-12-10 12:01   ` Jean Delvare
2010-12-13  0:31     ` Alex Deucher
2010-12-13  4:33       ` Alex Deucher [this message]
2010-12-13  9:12         ` Jean Delvare
2010-12-13  9:37           ` Dave Airlie
2010-12-13 13:02             ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=eEo5MacissFNed_Gn+Js+sOHzH7QnL+XQ2bXi@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khali@linux-fr.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.