drm/i915/gen9: Simplify csr loading failure printing.
authorDaniel Vetter <daniel.vetter@intel.com>
Wed, 28 Oct 2015 21:59:00 +0000 (23:59 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 12 Nov 2015 15:20:48 +0000 (17:20 +0200)
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>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Tested-by: Daniel Stone <daniels@collabora.com> # SKL
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1446069547-24760-7-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_csr.c

index aa34fcb0bdc285a42e78ced6f959a75d4deaaf3f..c605fd40d6c3ddc190d3b4ee91f4af1c77840717 100644 (file)
@@ -604,26 +604,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;
index 5c732f87b9ce5e9e7b676f829cb9502dc29fb796..80cddc5cfda3ab4025d9540e3b57d96b10ab86a2 100644 (file)
@@ -2688,7 +2688,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);
index c52b2a46bb6fcb2e413bac4401c8b39b5147c5d6..4bd2747d9c921dd796e69b05ee6a0ab3ce37dbfe 100644 (file)
@@ -374,7 +374,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);
@@ -418,8 +418,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);
 }
 
 /**