From: Daniel Vetter Subject: Re: [PATCH 26/43] drm/i915: Only clear the GPU domains upon a successful finish Date: Thu, 1 Mar 2012 21:40:15 +0100 Message-ID: <20120301204015.GB8631@phenom.ffwll.local> References: <1323867460-5486-1-git-send-email-daniel.vetter@ffwll.ch> <1323867460-5486-26-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BEAEA096D for ; Thu, 1 Mar 2012 12:39:54 -0800 (PST) Received: by werp11 with SMTP id p11so810755wer.36 for ; Thu, 01 Mar 2012 12:39:54 -0800 (PST) Content-Disposition: inline In-Reply-To: <1323867460-5486-26-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Keith Packard Cc: intel-gfx , stable@kernel.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Dec 14, 2011 at 01:57:23PM +0100, Daniel Vetter wrote: > From: Chris Wilson > > By clearing the GPU read domains before waiting upon the buffer, we run > the risk of the wait being interrupted and the domains prematurely > cleared. The next time we attempt to wait upon the buffer (after > userspace handles the signal), we believe that the buffer is idle and so > skip the wait. > > There are a number of bugs across all generations which show signs of an > overly haste reuse of active buffers. > > Such as: > > https://bugs.freedesktop.org/show_bug.cgi?id=29046 > https://bugs.freedesktop.org/show_bug.cgi?id=35863 > https://bugs.freedesktop.org/show_bug.cgi?id=38952 > https://bugs.freedesktop.org/show_bug.cgi?id=40282 > https://bugs.freedesktop.org/show_bug.cgi?id=41098 > https://bugs.freedesktop.org/show_bug.cgi?id=41102 > https://bugs.freedesktop.org/show_bug.cgi?id=41284 > https://bugs.freedesktop.org/show_bug.cgi?id=42141 > > A couple of those pre-date i915_gem_object_finish_gpu(), so may be > unrelated (such as a wild write from a userspace command buffer), but > this does look like a convincing cause for most of those bugs. > > Signed-off-by: Chris Wilson > Cc: stable@kernel.org > Reviewed-by: Daniel Vetter > Reviewed-by: Eugeni Dodonov I really hate it that we have neither a solid testcase nor a decen explanation for how exactly this fixes issues. But there have been too many reports from people that this patch here at least improves matters. /me grumpily merges this for -next. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48