[Intel-gfx] [PATCH] drm/i915: clear fencing tracking state when retiring request

2012-04-12 Thread Daniel Vetter
On Thu, Apr 12, 2012 at 12:38:09AM +0100, Chris Wilson wrote:
> On Thu, 12 Apr 2012 01:27:57 +0200, Daniel Vetter  
> wrote:
> > This fixes a regression introduce in
> s/introduce/introduced/
>  
> > commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
> > Author: Chris Wilson 
> > Date:   Wed Mar 21 10:48:18 2012 +
> > 
> > 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" 
> > Cc: Jiri Slaby 
> > Signed-Off-by: Daniel Vetter 
> 
> 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 
Picked up for -fixes, thanks for the review.
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


[Intel-gfx] [PATCH] drm/i915: clear fencing tracking state when retiring request

2012-04-12 Thread Chris Wilson
On Thu, 12 Apr 2012 01:27:57 +0200, Daniel Vetter  
wrote:
> This fixes a regression introduce in
s/introduce/introduced/

> commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
> Author: Chris Wilson 
> Date:   Wed Mar 21 10:48:18 2012 +
> 
> 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" 
> Cc: Jiri Slaby 
> Signed-Off-by: Daniel Vetter 

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, Intel Open Source Technology Centre


Re: [Intel-gfx] [PATCH] drm/i915: clear fencing tracking state when retiring request

2012-04-12 Thread Daniel Vetter
On Thu, Apr 12, 2012 at 12:38:09AM +0100, Chris Wilson wrote:
 On Thu, 12 Apr 2012 01:27:57 +0200, Daniel Vetter daniel.vet...@ffwll.ch 
 wrote:
  This fixes a regression introduce in
 s/introduce/introduced/
  
  commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
  Author: Chris Wilson ch...@chris-wilson.co.uk
  Date:   Wed Mar 21 10:48:18 2012 +
  
  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 r...@sisk.pl
  Cc: Jiri Slaby jsl...@suse.cz
  Signed-Off-by: Daniel Vetter daniel.vet...@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 ch...@chris-wilson.co.uk
Picked up for -fixes, thanks for the review.
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [Intel-gfx] [PATCH] drm/i915: clear fencing tracking state when retiring request

2012-04-11 Thread Chris Wilson
On Thu, 12 Apr 2012 01:27:57 +0200, Daniel Vetter daniel.vet...@ffwll.ch 
wrote:
 This fixes a regression introduce in
s/introduce/introduced/
 
 commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
 Author: Chris Wilson ch...@chris-wilson.co.uk
 Date:   Wed Mar 21 10:48:18 2012 +
 
 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 r...@sisk.pl
 Cc: Jiri Slaby jsl...@suse.cz
 Signed-Off-by: Daniel Vetter daniel.vet...@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 ch...@chris-wilson.co.uk
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel