drm/i915/huc: Add BXT HuC Loading Support
authorAnusha Srivatsa <anusha.srivatsa@intel.com>
Wed, 18 Jan 2017 16:05:54 +0000 (08:05 -0800)
committerJani Nikula <jani.nikula@intel.com>
Thu, 19 Jan 2017 09:18:59 +0000 (11:18 +0200)
This patch adds the HuC Loading for the BXT by using
the updated file construction.

Version 1.7 of the HuC firmware.

v2: rebased on to top drm-tip. Rename BXT_FW_MAJOR to BXT_HUC_FW_

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-2-git-send-email-anusha.srivatsa@intel.com
drivers/gpu/drm/i915/intel_huc.c

index 57471f26709b221b140696077e24d3a4c49d9013..887752488ea94f2e11ae02a54d09f2cc48d69950 100644 (file)
  * Note that HuC firmware loading must be done before GuC loading.
  */
 
+#define BXT_HUC_FW_MAJOR 01
+#define BXT_HUC_FW_MINOR 07
+#define BXT_BLD_NUM 1398
+
 #define SKL_HUC_FW_MAJOR 01
 #define SKL_HUC_FW_MINOR 07
 #define SKL_BLD_NUM 1398
@@ -52,6 +56,9 @@
        SKL_HUC_FW_MINOR, SKL_BLD_NUM)
 MODULE_FIRMWARE(I915_SKL_HUC_UCODE);
 
+#define I915_BXT_HUC_UCODE HUC_FW_PATH(bxt, BXT_HUC_FW_MAJOR, \
+       BXT_HUC_FW_MINOR, BXT_BLD_NUM)
+MODULE_FIRMWARE(I915_BXT_HUC_UCODE);
 /**
  * huc_ucode_xfer() - DMA's the firmware
  * @dev_priv: the drm_i915_private device
@@ -154,6 +161,10 @@ void intel_huc_init(struct drm_i915_private *dev_priv)
                fw_path = I915_SKL_HUC_UCODE;
                huc_fw->major_ver_wanted = SKL_HUC_FW_MAJOR;
                huc_fw->minor_ver_wanted = SKL_HUC_FW_MINOR;
+       } else if (IS_BROXTON(dev_priv)) {
+               fw_path = I915_BXT_HUC_UCODE;
+               huc_fw->major_ver_wanted = BXT_HUC_FW_MAJOR;
+               huc_fw->minor_ver_wanted = BXT_HUC_FW_MINOR;
        }
 
        huc_fw->path = fw_path;