drm/i915: Stop kicking the signaling thread on seqno wraparound
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 6 Mar 2018 13:01:42 +0000 (13:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 6 Mar 2018 17:25:55 +0000 (17:25 +0000)
Since commit fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted
signalers"), we cancel the signaler when retiring the request and so
upon wraparound, where we wait for all requests to be retired, we no
longer need to spin waiting for the signaling thread to release its
references to the in-flight requests, and so we can assert that the
signaler is idle.

References: fd10e2ce9905 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180306130143.13312-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/intel_breadcrumbs.c

index 2265bb8ff4fa0e8e69827d728ff9477c70e6ba22..d34a3e5800b730eeca4c7afe4c3858fb9764967f 100644 (file)
@@ -220,6 +220,8 @@ static int reset_all_global_seqno(struct drm_i915_private *i915, u32 seqno)
                        /* spin until threads are complete */
                        while (intel_breadcrumbs_busy(engine))
                                cond_resched();
+
+                       GEM_BUG_ON(!list_empty(&engine->breadcrumbs.signals));
                }
 
                /* Check we are idle before we fiddle with hw state! */
index 6a740618863c14ad598e33e497378567e649af4c..bab74c3ee81a936427d55358f276780b3daf5bde 100644 (file)
@@ -889,11 +889,6 @@ bool intel_breadcrumbs_busy(struct intel_engine_cs *engine)
                spin_unlock_irq(&b->irq_lock);
        }
 
-       if (!busy && !list_empty(&b->signals)) {
-               wake_up_process(b->signaler);
-               busy = true;
-       }
-
        return busy;
 }