From: Peter Antoine <peter.antoine@xxxxxxxxx> This patch adds the HuC Loading for the BXT. Version 1.7 of the HuC firmware. It also updates the file construction and specifying the required version similar to that of GuC for both SKL and BXT. Add an extra field for the build number. Adopted the approach used in- https://patchwork.freedesktop.org/patch/104355/ <Tvrtko Ursulin> v2: rebased. v3: rebased. changed file name to match the install package format. v7: rebased. v8: rebased. v10: rebased. Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> Cc: Jeff Mcgee <jeff.mcgee@xxxxxxxxx> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@xxxxxxxxx> Signed-off-by: Peter Antoine <peter.antoine@xxxxxxxxx> Reviewed-by: David Gordon <david.s.gordon@xxxxxxxxx> --- drivers/gpu/drm/i915/intel_huc_loader.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c index dcd9970..9a93adb 100644 --- a/drivers/gpu/drm/i915/intel_huc_loader.c +++ b/drivers/gpu/drm/i915/intel_huc_loader.c @@ -39,10 +39,26 @@ * * Note that HuC firmware loading must be done before GuC loading. */ +#define SKL_FW_MAJOR 01 +#define SKL_FW_MINOR 07 +#define SKL_BLD_NUM 1398 -#define I915_SKL_HUC_UCODE "i915/skl_huc_ver01_07_1398.bin" +#define BXT_FW_MAJOR 01 +#define BXT_FW_MINOR 07 +#define BXT_BLD_NUM 1398 + +#define HUC_FW_PATH(platform, major, minor, bld_num) \ + "i915/" __stringify(platform) "_huc_ver" __stringify(major) "_" \ + __stringify(minor) "_" __stringify(bld_num) ".bin" + +#define I915_SKL_HUC_UCODE HUC_FW_PATH(skl, SKL_FW_MAJOR, \ + SKL_FW_MINOR, SKL_BLD_NUM) MODULE_FIRMWARE(I915_SKL_HUC_UCODE); +#define I915_BXT_HUC_UCODE HUC_FW_PATH(bxt, BXT_FW_MAJOR, \ + BXT_FW_MINOR, BXT_BLD_NUM) +MODULE_FIRMWARE(I915_BXT_HUC_UCODE); + /** * huc_ucode_xfer() - DMA's the firmware * @dev_priv: the drm device @@ -148,8 +164,12 @@ void intel_huc_init(struct drm_device *dev) if (IS_SKYLAKE(dev_priv)) { fw_path = I915_SKL_HUC_UCODE; - huc_fw->major_ver_wanted = 1; - huc_fw->minor_ver_wanted = 7; + huc_fw->major_ver_wanted = SKL_FW_MAJOR; + huc_fw->minor_ver_wanted = SKL_FW_MINOR; + } else if (IS_BROXTON(dev_priv)) { + fw_path = I915_BXT_HUC_UCODE; + huc_fw->major_ver_wanted = BXT_FW_MAJOR; + huc_fw->minor_ver_wanted = BXT_FW_MINOR; } if (fw_path == NULL) -- 2.7.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx