firmware/dmc/icl: load v1.07 on icelake.
authorAnusha Srivatsa <anusha.srivatsa@intel.com>
Tue, 28 Aug 2018 00:38:44 +0000 (17:38 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 13 Sep 2018 21:19:20 +0000 (14:19 -0700)
Add Support to load DMC on Icelake.

While at it, also add support to load the firmware
during system resume.

v2: load firmware during system resume.(Imre)

v3: enable has_csr for icelake.(Jyoti)

v4: Only load the firmware in this patch

Cc: Jyoti Yadav <jyoti.r.yadav@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180828003844.4682-2-anusha.srivatsa@intel.com
drivers/gpu/drm/i915/intel_csr.c
drivers/gpu/drm/i915/intel_runtime_pm.c

index 14cf4c367e368ae4549c03a439a84d55d9882bf7..4aa8f3d6b64c0b5f3390b462b36f4c0786c5dc47 100644 (file)
@@ -34,6 +34,9 @@
  * low-power state and comes back to normal.
  */
 
+#define I915_CSR_ICL "i915/icl_dmc_ver1_07.bin"
+#define ICL_CSR_VERSION_REQUIRED       CSR_VERSION(1, 7)
+
 #define I915_CSR_GLK "i915/glk_dmc_ver1_04.bin"
 MODULE_FIRMWARE(I915_CSR_GLK);
 #define GLK_CSR_VERSION_REQUIRED       CSR_VERSION(1, 4)
@@ -304,6 +307,8 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
        if (csr->fw_path == i915_modparams.dmc_firmware_path) {
                /* Bypass version check for firmware override. */
                required_version = csr->version;
+       } else if (IS_ICELAKE(dev_priv)) {
+               required_version = ICL_CSR_VERSION_REQUIRED;
        } else if (IS_CANNONLAKE(dev_priv)) {
                required_version = CNL_CSR_VERSION_REQUIRED;
        } else if (IS_GEMINILAKE(dev_priv)) {
@@ -471,6 +476,8 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)
 
        if (i915_modparams.dmc_firmware_path)
                csr->fw_path = i915_modparams.dmc_firmware_path;
+       else if (IS_ICELAKE(dev_priv))
+               csr->fw_path = I915_CSR_ICL;
        else if (IS_CANNONLAKE(dev_priv))
                csr->fw_path = I915_CSR_CNL;
        else if (IS_GEMINILAKE(dev_priv))
index 480dadb1047bfe9cd3729fa56f740ea9b8fe3c70..9bebec389de1da7d3a299604f02bdee2585b6ece 100644 (file)
@@ -3563,6 +3563,9 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
 
        /* 7. Setup MBUS. */
        icl_mbus_init(dev_priv);
+
+       if (resume && dev_priv->csr.dmc_payload)
+               intel_csr_load_program(dev_priv);
 }
 
 static void icl_display_core_uninit(struct drm_i915_private *dev_priv)