Skip to content

Commit

Permalink
drm/i915/uc: Move fw path check to fetch_uc_fw()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Michal Wajdeczko authored and Joonas Lahtinen committed Mar 31, 2017
1 parent 4090823 commit b57f7f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/i915/intel_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -239,11 +242,8 @@ static void fetch_uc_fw(struct drm_i915_private *dev_priv,

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)
Expand Down

0 comments on commit b57f7f7

Please sign in to comment.