public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH v3 06/13] drm/i915/gen9: Simplify csr loading failure printing.
Date: Wed, 28 Oct 2015 23:59:00 +0200	[thread overview]
Message-ID: <1446069547-24760-7-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1446069547-24760-1-git-send-email-imre.deak@intel.com>

From: Daniel Vetter <daniel.vetter@intel.com>

If we really want to we can be more verbose here, but we really don't
need an entire function for this.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Sunil Kamath <sunil.kamath@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c  | 20 --------------------
 drivers/gpu/drm/i915/i915_drv.h  |  1 -
 drivers/gpu/drm/i915/intel_csr.c |  6 ++++--
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7efc798..366f832 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -567,26 +567,6 @@ bool i915_semaphore_is_enabled(struct drm_device *dev)
 	return true;
 }
 
-void i915_firmware_load_error_print(const char *fw_path, int err)
-{
-	DRM_ERROR("failed to load firmware %s (%d)\n", fw_path, err);
-
-	/*
-	 * If the reason is not known assume -ENOENT since that's the most
-	 * usual failure mode.
-	 */
-	if (!err)
-		err = -ENOENT;
-
-	if (!(IS_BUILTIN(CONFIG_DRM_I915) && err == -ENOENT))
-		return;
-
-	DRM_ERROR(
-	  "The driver is built-in, so to load the firmware you need to\n"
-	  "include it either in the kernel (see CONFIG_EXTRA_FIRMWARE) or\n"
-	  "in your initrd/initramfs image.\n");
-}
-
 static void intel_suspend_encoders(struct drm_i915_private *dev_priv)
 {
 	struct drm_device *dev = dev_priv->dev;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0aeac06..9918b61 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2701,7 +2701,6 @@ extern unsigned long i915_mch_val(struct drm_i915_private *dev_priv);
 extern unsigned long i915_gfx_val(struct drm_i915_private *dev_priv);
 extern void i915_update_gfx_val(struct drm_i915_private *dev_priv);
 int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool on);
-void i915_firmware_load_error_print(const char *fw_path, int err);
 
 /* intel_hotplug.c */
 void intel_hpd_irq_handler(struct drm_device *dev, u32 pin_mask, u32 long_mask);
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 489ecfe..1f02fe0 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -377,7 +377,7 @@ out:
 			 CSR_VERSION_MAJOR(csr->version),
 			 CSR_VERSION_MINOR(csr->version));
 	} else {
-		i915_firmware_load_error_print(csr->fw_path, 0);
+		DRM_ERROR("Failed to load DMC firmware, disabling rpm\n");
 	}
 
 	release_firmware(fw);
@@ -421,8 +421,10 @@ void intel_csr_ucode_init(struct drm_device *dev)
 				      &dev_priv->dev->pdev->dev,
 				      GFP_KERNEL, dev_priv,
 				      finish_csr_load);
+
 	if (ret)
-		i915_firmware_load_error_print(csr->fw_path, ret);
+		DRM_ERROR("Failed to load DMC firmware, disabling rpm (%d)\n",
+			  ret);
 }
 
 /**
-- 
2.1.4

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

  parent reply	other threads:[~2015-10-28 21:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 21:58 [PATCH v3 00/13] drm/i915: Redesign dmc firmware loading Imre Deak
2015-10-28 21:58 ` [PATCH v3 01/13] drm/i915/gen9: csr_init after runtime pm enable Imre Deak
2015-10-29 10:18   ` Sunil Kamath
2015-10-29 13:55     ` Imre Deak
2015-11-04  9:27       ` Sunil Kamath
2015-10-28 21:58 ` [PATCH v3 02/13] drm/i915: use correct power domain for csr loading Imre Deak
2015-10-28 21:58 ` [PATCH v3 03/13] drm/i915/gen9: move assert_csr_loaded into intel_rpm.c Imre Deak
2015-11-12 12:22   ` Imre Deak
2015-11-12 14:48     ` Jani Nikula
2015-11-12 15:09       ` Imre Deak
2015-10-28 21:58 ` [PATCH v3 04/13] drm/i915/gen9: Remove csr.state, csr_lock and related code Imre Deak
2015-10-29  9:02   ` Animesh Manna
2015-11-12 15:10   ` [PATCH v4 " Imre Deak
2015-10-28 21:58 ` [PATCH v3 05/13] drm/i915/gen9: Align line continuations in intel_csr.c Imre Deak
2015-10-28 21:59 ` Imre Deak [this message]
2015-10-28 21:59 ` [PATCH v3 07/13] drm/i915/gen9: Don't try to load garbage dmc firmware on resume Imre Deak
2015-10-28 21:59 ` [PATCH v3 08/13] drm/i915/gen9: Use dev_priv in csr functions Imre Deak
2015-10-28 21:59 ` [PATCH v3 09/13] drm/i915/gen9: extract parse_csr_fw Imre Deak
2015-11-12 15:11   ` [PATCH v4 " Imre Deak
2015-10-28 21:59 ` [PATCH v3 10/13] drm/i915: Use request_firmware and our own async work Imre Deak
2015-10-28 21:59 ` [PATCH v3 11/13] drm/i915/gen9: Use flush_work to synchronize with dmc loader Imre Deak
2015-10-28 21:59 ` [PATCH v3 12/13] drm/i915/gen9: flush DMC fw loading work during system suspend Imre Deak
2015-10-29  9:05   ` Animesh Manna
2015-10-28 21:59 ` [PATCH v3 13/13] drm/i915/skl: Removed assert for csr-fw-loading check during disabling dc6 Imre Deak
2015-10-29  8:08 ` [PATCH v3 00/13] drm/i915: Redesign dmc firmware loading Jani Nikula
2015-10-29 13:32   ` Imre Deak
2015-11-04 17:16 ` Daniel Stone
2015-11-12 15:37 ` Jani Nikula

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=1446069547-24760-7-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox