From patchwork Mon Dec 13 04:33:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 404232 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBD4XsvZ011692 for ; Mon, 13 Dec 2010 04:34:15 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A5A99E8F9 for ; Sun, 12 Dec 2010 20:33:54 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-fx0-f42.google.com (mail-fx0-f42.google.com [209.85.161.42]) by gabe.freedesktop.org (Postfix) with ESMTP id B3C189E76D for ; Sun, 12 Dec 2010 20:33:43 -0800 (PST) Received: by fxm11 with SMTP id 11so5445356fxm.15 for ; Sun, 12 Dec 2010 20:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=Na7eUZyVlNTxMHm3zvGoCljF/mGexhCDS+8XYTvu1G8=; b=pDvwABvi3l3VJpZA2XlEMXSmPhLEkDjwusz7jVH4k/polzpUmDR/Aa2z5/yq+hjF3w S5rWU7EM9e0OCie8kj3FjGihR1Qryf/8C6rss7ujo5MZYx+OtytlTyCzYuck+9uCCySG TLUBwiXIH+ET6TPkLn6o/A34OaOznXveJxTXU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lKsivfQO46TieuIkhDtzI6m7AoIzGj+dFHi4BNwS5VK7J0ec6HG9iBXQCCt9cO6Hb/ zDXPslYxJ9jJb6uP1KQh1X1CyQU8x0fNWrA3YEHa5kvxdkmb5oDDn0iwhF94A8+S8a0A wJgW/gmwNLV5/1Jf993HbJXQZC3ee0AgaOcEE= MIME-Version: 1.0 Received: by 10.223.73.206 with SMTP id r14mr3851430faj.126.1292214822363; Sun, 12 Dec 2010 20:33:42 -0800 (PST) Received: by 10.223.120.133 with HTTP; Sun, 12 Dec 2010 20:33:42 -0800 (PST) In-Reply-To: References: <20101121153829.160449b9@endymion.delvare> <20101210130130.65f1d88b@endymion.delvare> Date: Sun, 12 Dec 2010 23:33:42 -0500 Message-ID: Subject: Re: 2.6.37-rc2-git7 regression: wine fails to start From: Alex Deucher To: Jean Delvare Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Dec 2010 04:34:15 +0000 (UTC) From bf10ef9418009653d50ee0d922332b6c9bce2fdd Mon Sep 17 00:00:00 2001 From: Alex Deucher 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 --- 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