[Intel-gfx] [PATCH 15/27] drm/i915/guc: Reset LRC descriptor if register returns -ENODEV
Daniele Ceraolo Spurio
daniele.ceraolospurio at intel.com
Sat Aug 21 00:14:22 UTC 2021
On 8/18/2021 11:16 PM, Matthew Brost wrote:
> Reset LRC descriptor if a context register returns -ENODEV as this means
> we are mid-reset.
>
> Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface")
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Daniele
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index fa87470ea576..4cf5a565f08e 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1407,10 +1407,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;
More information about the Intel-gfx
mailing list