diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2017-03-30 14:21:15 +0300 |
---|---|---|
committer | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2017-03-31 10:39:40 +0300 |
commit | b57f7f7d31c0ffef5faabd4bf68b8d2577da389a (patch) | |
tree | bebbfc1fa2740e658fad2dae8c0351177d7c7901 /drivers/gpu/drm/i915/intel_uc.c | |
parent | 40908230e8da7a49f65bccd4d78f09e100bafff0 (diff) | |
download | linux-b57f7f7d31c0ffef5faabd4bf68b8d2577da389a.tar.xz |
drm/i915/uc: Move fw path check to fetch_uc_fw()
There is no reason to separately check for valid fw path before
we try to fetch it. Let the fetch function take care of this.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170330112115.120240-2-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_uc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 2540bfbfccf7..c117424f1f50 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -112,6 +112,9 @@ static void fetch_uc_fw(struct drm_i915_private *dev_priv, size_t size; int err; + if (!uc_fw->path) + return; + uc_fw->fetch_status = INTEL_UC_FIRMWARE_PENDING; DRM_DEBUG_DRIVER("before requesting firmware: uC fw fetch status %s\n", @@ -239,11 +242,8 @@ fail: void intel_uc_init_fw(struct drm_i915_private *dev_priv) { - if (dev_priv->huc.fw.path) - fetch_uc_fw(dev_priv, &dev_priv->huc.fw); - - if (dev_priv->guc.fw.path) - fetch_uc_fw(dev_priv, &dev_priv->guc.fw); + fetch_uc_fw(dev_priv, &dev_priv->huc.fw); + fetch_uc_fw(dev_priv, &dev_priv->guc.fw); } void intel_uc_fini_fw(struct drm_i915_private *dev_priv) |