drm/i915/uc: Never fail on HuC firmware errors
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Sun, 18 Aug 2019 09:52:04 +0000 (09:52 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 18 Aug 2019 10:58:41 +0000 (11:58 +0100)
There is no need to mark whole GPU as wedged just because
of the custom HuC fw failure as users can always verify
actual HuC firmware status using existing HUC_STATUS ioctl.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190818095204.31568-4-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/gt/uc/intel_huc.c
drivers/gpu/drm/i915/gt/uc/intel_uc.c

index af61ae864ab8a2d57b4fbf7a761d503966e058ef..d4625c97b4f9e4a5c220648ef29a1ca5a480a531 100644 (file)
@@ -129,9 +129,11 @@ int intel_huc_auth(struct intel_huc *huc)
        struct intel_guc *guc = &gt->uc.guc;
        int ret;
 
-       GEM_BUG_ON(!intel_uc_fw_is_loaded(&huc->fw));
        GEM_BUG_ON(intel_huc_is_authenticated(huc));
 
+       if (!intel_uc_fw_is_loaded(&huc->fw))
+               return -ENOEXEC;
+
        ret = i915_inject_load_error(gt->i915, -ENXIO);
        if (ret)
                goto fail;
index 10978e7ff06d7f129843eb619e4e2d65d853166a..71ee7ab035ccb163013f9125ed5a8869bc45a301 100644 (file)
@@ -457,12 +457,7 @@ int intel_uc_init_hw(struct intel_uc *uc)
                if (ret)
                        goto err_out;
 
-               if (intel_uc_uses_huc(uc)) {
-                       ret = intel_huc_fw_upload(huc);
-                       if (ret && intel_uc_fw_is_overridden(&huc->fw))
-                               goto err_out;
-               }
-
+               intel_huc_fw_upload(huc);
                intel_guc_ads_reset(guc);
                intel_guc_write_params(guc);
                ret = intel_guc_fw_upload(guc);
@@ -481,11 +476,7 @@ int intel_uc_init_hw(struct intel_uc *uc)
        if (ret)
                goto err_log_capture;
 
-       if (intel_uc_fw_is_loaded(&huc->fw)) {
-               ret = intel_huc_auth(huc);
-               if (ret && intel_uc_fw_is_overridden(&huc->fw))
-                       goto err_communication;
-       }
+       intel_huc_auth(huc);
 
        ret = intel_guc_sample_forcewake(guc);
        if (ret)