Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a655aeb3 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson
Browse files

drm/i915/uc: Don't fetch GuC firmware if no plan to use GuC



If we don't plan to use GuC then we should not try to fetch GuC and
HuC firmwares. We can save memory and avoid possible dmesg noise.

Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171206135316.32556-4-michal.wajdeczko@intel.com
parent 93ffbe8e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -86,12 +86,18 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)

void intel_uc_init_fw(struct drm_i915_private *dev_priv)
{
	if (!USES_GUC(dev_priv))
		return;

	intel_uc_fw_fetch(dev_priv, &dev_priv->huc.fw);
	intel_uc_fw_fetch(dev_priv, &dev_priv->guc.fw);
}

void intel_uc_fini_fw(struct drm_i915_private *dev_priv)
{
	if (!USES_GUC(dev_priv))
		return;

	intel_uc_fw_fini(&dev_priv->guc.fw);
	intel_uc_fw_fini(&dev_priv->huc.fw);
}