All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v4 4/7] drm/i915/uc: Don't fetch GuC firmware if no plan to use GuC
Date: Wed,  6 Dec 2017 13:53:13 +0000	[thread overview]
Message-ID: <20171206135316.32556-4-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20171206135316.32556-1-michal.wajdeczko@intel.com>

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: Michal 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: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_uc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index ed2dd76..c3981aa 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -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);
 }
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-12-06 13:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 13:53 [PATCH v4 1/7] drm/i915/huc: Move firmware selection to init_early Michal Wajdeczko
2017-12-06 13:53 ` [PATCH v4 2/7] drm/i915/guc: " Michal Wajdeczko
2017-12-06 13:53 ` [PATCH v4 3/7] drm/i915/guc: Introduce USES_GUC_xxx helper macros Michal Wajdeczko
2017-12-06 13:53 ` Michal Wajdeczko [this message]
2017-12-06 13:53 ` [PATCH v4 5/7] drm/i915/uc: Don't use -EIO to report missing firmware Michal Wajdeczko
2017-12-06 13:53 ` [PATCH v4 6/7] drm/i915/guc: Combine enable_guc_loading|submission modparams Michal Wajdeczko
2017-12-06 13:53 ` [PATCH v4 7/7] drm/i915/huc: Load HuC only if requested Michal Wajdeczko
2017-12-06 14:14 ` ✗ Fi.CI.BAT: failure for series starting with [v4,1/7] drm/i915/huc: Move firmware selection to init_early Patchwork
2017-12-06 14:56 ` ✓ Fi.CI.BAT: success " Patchwork
2017-12-06 16:09 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-12-06 16:14   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171206135316.32556-4-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.