[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] drm/i915: clear fencing tracking state when retiring requests
    This fixes a regression uncovered by

    commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
    Author: Chris Wilson <>
    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" <>
    Cc: Jiri Slaby <>
    Signed-Off-by: Daniel Vetter <>
    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 71934dd..cf50fbc 100644
    --- a/drivers/gpu/drm/i915/i915_gem.c
    +++ b/drivers/gpu/drm/i915/i915_gem.c
    @@ -1415,6 +1415,7 @@ i915_gem_object_move_off_active(struct drm_i915_gem_object *obj)
    obj->last_rendering_seqno = 0;
    + obj->last_fenced_seqno = 0;

    static void
    @@ -1443,6 +1444,7 @@ i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj)
    obj->ring = NULL;
    + obj->last_fenced_ring = NULL;

    obj->fenced_gpu_access = false;

     \ /
      Last update: 2012-04-12 01:33    [W:0.023 / U:5.256 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site