diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-11 19:27:57 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-12 03:02:37 -0400 |
commit | 15a13bbdffb0d6288a5dd04aee9736267da1335f (patch) | |
tree | 7cc3e8326352191e8171bf448ed9c4684eb670f7 /drivers/gpu/drm/i915 | |
parent | f57f9c167af7cb3fd315e6a8ebe194a8aea0832a (diff) |
drm/i915: clear fencing tracking state when retiring requests
This fixes a resume regression introduced in
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>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4c65c639f772..0e3c6acde955 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1493,6 +1493,7 @@ i915_gem_object_move_off_active(struct drm_i915_gem_object *obj) | |||
1493 | { | 1493 | { |
1494 | list_del_init(&obj->ring_list); | 1494 | list_del_init(&obj->ring_list); |
1495 | obj->last_rendering_seqno = 0; | 1495 | obj->last_rendering_seqno = 0; |
1496 | obj->last_fenced_seqno = 0; | ||
1496 | } | 1497 | } |
1497 | 1498 | ||
1498 | static void | 1499 | static void |
@@ -1521,6 +1522,7 @@ i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj) | |||
1521 | BUG_ON(!list_empty(&obj->gpu_write_list)); | 1522 | BUG_ON(!list_empty(&obj->gpu_write_list)); |
1522 | BUG_ON(!obj->active); | 1523 | BUG_ON(!obj->active); |
1523 | obj->ring = NULL; | 1524 | obj->ring = NULL; |
1525 | obj->last_fenced_ring = NULL; | ||
1524 | 1526 | ||
1525 | i915_gem_object_move_off_active(obj); | 1527 | i915_gem_object_move_off_active(obj); |
1526 | obj->fenced_gpu_access = false; | 1528 | obj->fenced_gpu_access = false; |