drm/i915/guc: Reset LRC descriptor if register returns -ENODEV

Reset LRC descriptor if a context register returns -ENODEV as this means
we are mid-reset.

Fixes: eb5e7da736 ("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
This commit is contained in:
Matthew Brost 2021-09-09 09:47:35 -07:00 committed by John Harrison
parent f16d5cb981
commit ae36b62927

View File

@ -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;