i915/HuC: Add an extra check for platforms that do not have HUC
authorAnusha Srivatsa <anusha.srivatsa@intel.com>
Wed, 1 Mar 2017 19:58:55 +0000 (11:58 -0800)
committerAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 2 Mar 2017 14:15:44 +0000 (16:15 +0200)
Return silently without producing much noise on platforms
that have a HuC but the firmware is absent.

Cc: Ander Conselvan De Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@itel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1488398335-13121-1-git-send-email-anusha.srivatsa@intel.com
drivers/gpu/drm/i915/intel_huc.c

index c28543d220a27cd9b21d30f280cfec055033ef88..e660109fc51e3c93e5b65f96e5aaebf6b46fb70e 100644 (file)
@@ -181,12 +181,14 @@ void intel_huc_init(struct drm_i915_private *dev_priv)
        }
 
        huc_fw->path = fw_path;
+
+       if (huc_fw->path == NULL)
+               return;
+
        huc_fw->fetch_status = INTEL_UC_FIRMWARE_PENDING;
 
        DRM_DEBUG_DRIVER("HuC firmware pending, path %s\n", fw_path);
 
-       WARN(huc_fw->path == NULL, "HuC present but no fw path\n");
-
        intel_uc_fw_fetch(dev_priv, huc_fw);
 }