From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Only clear write-domains after a successful wait-seqno Date: Fri, 28 Jun 2013 18:30:39 +0200 Message-ID: <20130628163039.GX18285@phenom.ffwll.local> References: <1372434848-17653-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DE9BE5D70 for ; Fri, 28 Jun 2013 09:30:41 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id d49so1118852eek.23 for ; Fri, 28 Jun 2013 09:30:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1372434848-17653-1-git-send-email-chris@chris-wilson.co.uk> 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jun 28, 2013 at 04:54:08PM +0100, Chris Wilson wrote: > In the introduction of the non-blocking wait, I cut'n'pasted the wait > completion code from normal locked path. Unfortunately, this neglected > that the normal path returned early if the wait returned early. The > result is that read-only waits may return whilst the GPU is still > writing to the bo. > > Fixes regression from > commit 3236f57a0162391f84b93f39fc1882c49a8998c7 [v3.7] > Author: Chris Wilson > Date: Fri Aug 24 09:35:09 2012 +0100 > > drm/i915: Use a non-blocking wait for set-to-domain ioctl > > Signed-off-by: Chris Wilson > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66163 > Cc: stable@vger.kernel.org Queued for -next, thanks for the patch. And do we have an igt for this? The usual combinaition of some blt busy work with the drmtest interrupt should be fairly effective I guess ... -Daniel > --- > drivers/gpu/drm/i915/i915_gem.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 75ab0cb..777c8b9 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -1160,7 +1160,8 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj, > /* Manually manage the write flush as we may have not yet > * retired the buffer. > */ > - if (obj->last_write_seqno && > + if (ret == 0 && > + obj->last_write_seqno && > i915_seqno_passed(seqno, obj->last_write_seqno)) { > obj->last_write_seqno = 0; > obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch