Skip to content

Commit

Permalink
drm/i915: Move the irq_barrier for reset earlier into reset_prepare
Browse files Browse the repository at this point in the history
When updating the bookkeeping following the reset, we need the seqno to
be coherent on the CPU prior to trusting its result for deciding whether
any request is completed. We need the irq_barrier before we start making
these decisions, i.e. in reset_prepare.

References: https://bugs.freedesktop.org/show_bug.cgi?id=99733
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170210185214.23463-1-chris@chris-wilson.co.uk
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
  • Loading branch information
Chris Wilson committed Feb 10, 2017
1 parent c4d4c1c commit 8c12d12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,9 @@ int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
tasklet_disable(&engine->irq_tasklet);
tasklet_kill(&engine->irq_tasklet);

if (engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine);

if (engine_stalled(engine)) {
request = i915_gem_find_active_request(engine);
if (request && request->fence.error == -EIO)
Expand Down Expand Up @@ -2748,9 +2751,6 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine)
{
struct drm_i915_gem_request *request;

if (engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine);

request = i915_gem_find_active_request(engine);
if (request && i915_gem_reset_request(request)) {
DRM_DEBUG_DRIVER("resetting %s to restart from tail of request 0x%x\n",
Expand Down

0 comments on commit 8c12d12

Please sign in to comment.