Commit d9a910f5 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

drm/i915/uc: Don't fail on HuC early init errors

Since commit 301efe96 ("drm/i915/uc: Don't fail on HuC
firmware failure") we can continue driver load after error
during HuC firmware load or authentication, but we could
still fail on any error during early HuC initialization.
Change that by ignoring HuC related errors until hardware
initialization phase where we can decide about next steps.
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190804195052.31140-5-michal.wajdeczko@intel.com
parent 34f0a20f
...@@ -52,6 +52,11 @@ static int intel_huc_rsa_data_create(struct intel_huc *huc) ...@@ -52,6 +52,11 @@ static int intel_huc_rsa_data_create(struct intel_huc *huc)
struct i915_vma *vma; struct i915_vma *vma;
size_t copied; size_t copied;
void *vaddr; void *vaddr;
int err;
err = i915_inject_load_error(gt->i915, -ENXIO);
if (err)
return err;
/* /*
* HuC firmware will sit above GUC_GGTT_TOP and will not map * HuC firmware will sit above GUC_GGTT_TOP and will not map
...@@ -115,8 +120,8 @@ int intel_huc_init(struct intel_huc *huc) ...@@ -115,8 +120,8 @@ int intel_huc_init(struct intel_huc *huc)
void intel_huc_fini(struct intel_huc *huc) void intel_huc_fini(struct intel_huc *huc)
{ {
intel_uc_fw_fini(&huc->fw);
intel_huc_rsa_data_destroy(huc); intel_huc_rsa_data_destroy(huc);
intel_uc_fw_fini(&huc->fw);
} }
/** /**
......
...@@ -316,14 +316,14 @@ int intel_uc_init(struct intel_uc *uc) ...@@ -316,14 +316,14 @@ int intel_uc_init(struct intel_uc *uc)
if (intel_uc_supports_huc(uc)) { if (intel_uc_supports_huc(uc)) {
ret = intel_huc_init(huc); ret = intel_huc_init(huc);
if (ret) if (ret)
goto err_guc; goto out_huc;
} }
return 0; return 0;
err_guc: out_huc:
intel_guc_fini(guc); intel_uc_fw_cleanup_fetch(&huc->fw);
return ret; return 0;
} }
void intel_uc_fini(struct intel_uc *uc) void intel_uc_fini(struct intel_uc *uc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment