Skip to content

Commit

Permalink
drm/i915/guc: Reset LRC descriptor if register returns -ENODEV
Browse files Browse the repository at this point in the history
Reset LRC descriptor if a context register returns -ENODEV as this means
we are mid-reset.

Fixes: eb5e7da ("drm/i915/guc: Reset implementation for new GuC interface")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-15-matthew.brost@intel.com
  • Loading branch information
Matthew Brost authored and John Harrison committed Sep 13, 2021
1 parent f16d5cb commit ae36b62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -1405,10 +1405,12 @@ static int guc_lrc_desc_pin(struct intel_context *ce, bool loop)
} else {
with_intel_runtime_pm(runtime_pm, wakeref)
ret = register_context(ce, loop);
if (unlikely(ret == -EBUSY))
if (unlikely(ret == -EBUSY)) {
reset_lrc_desc(guc, desc_idx);
} else if (unlikely(ret == -ENODEV)) {
reset_lrc_desc(guc, desc_idx);
else if (unlikely(ret == -ENODEV))
ret = 0; /* Will get registered later */
}
}

return ret;
Expand Down

0 comments on commit ae36b62

Please sign in to comment.