public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jiri Slaby <jslaby@suse.cz>, LKML <linux-kernel@vger.kernel.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: clear fencing tracking state when retiring request
Date: Thu, 12 Apr 2012 00:38:09 +0100	[thread overview]
Message-ID: <1334187495_375289@CP5-2952> (raw)
In-Reply-To: <1334186877-6299-1-git-send-email-daniel.vetter@ffwll.ch>

On Thu, 12 Apr 2012 01:27:57 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> This fixes a regression introduce in
s/introduce/introduced/
 
> commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Wed Mar 21 10:48:18 2012 +0000
> 
>     drm/i915: Mark untiled BLT commands as fenced on gen2/3
> 
> which fixed fencing tracking for untiled blt commands.
> 
> A side effect of that patch was that now also untiled objects have a
> non-zero obj->last_fenced_seqno to track when a fence can be set up
> after a pipelined tiling change. Unfortunately this was only cleared
> by the fence setup and teardown code, resulting in tons of untiled but
> inactive objects with non-zero last_fenced_seqno.
> 
> Now after resume we completely reset the seqno tracking, both on the
> driver side (by setting dev_priv->next_seqno = 1) and on the hw side
> (by allocating a new hws page, which contains the seqnos). Hilarity
> and indefinite waits ensued from the stale seqnos in
> obj->last_fenced_seqno from before the suspend.
> 
> The fix is to properly clear the fencing tracking state like we
> already do for the normal gpu rendering while moving objects off the
> active list.
> 
> Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: Jiri Slaby <jslaby@suse.cz>
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I spent sometime discussing whether or not we could hit a similar bug
with a well placed change of tiling after resume, and the outcome is
that as the fences are reset during freeze then all tiled objects that
had been used for rendering would have been flushed (and their
last_fenced_seqno set to 0).

So this is a new regression caused by the aforementioned patch and this
is the cleanest fix,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  parent reply	other threads:[~2012-04-11 23:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 23:27 [PATCH] drm/i915: clear fencing tracking state when retiring request Daniel Vetter
2012-04-11 23:31 ` [PATCH] drm/i915: clear fencing tracking state when retiring requests Daniel Vetter
2012-04-11 23:38 ` Chris Wilson [this message]
2012-04-12  7:01   ` [Intel-gfx] [PATCH] drm/i915: clear fencing tracking state when retiring request Daniel Vetter

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=1334187495_375289@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox