]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: clear fencing tracking state when retiring requests
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Apr 2012 23:27:57 +0000 (01:27 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 12 Apr 2012 07:02:37 +0000 (09:02 +0200)
commitd35e1d453fd1bd02161aa43276fa620a7c5fdacc
tree7cc3e8326352191e8171bf448ed9c4684eb670f7
parent883140e62b275c885fedfb22ac3825bc50ca44a2
drm/i915: clear fencing tracking state when retiring requests

This fixes a resume regression introduced in

commit d17e03949063461cdea4e2f265c616b685226e82
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>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c