diff mbox

[4/8] drm/i915/huc: Add BXT HuC Loading Support

Message ID 1478823321-6009-5-git-send-email-anusha.srivatsa@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Srivatsa, Anusha Nov. 11, 2016, 12:15 a.m. UTC
This patch adds the HuC Loading for the BXT by using
the updated file construction.

Version 1.7 of the HuC firmware.

Cc: Jeff Mcgee <jeff.mcgee@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 drivers/gpu/drm/i915/intel_huc_loader.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

jeff.mcgee@intel.com Nov. 12, 2016, 2:13 a.m. UTC | #1
Reviewed-by: Jeff McGee <jeff.mcgee@intel.com>

On Thu, Nov 10, 2016 at 04:15:17PM -0800, Anusha Srivatsa wrote:
> This patch adds the HuC Loading for the BXT by using
> the updated file construction.
> 
> Version 1.7 of the HuC firmware.
> 
> Cc: Jeff Mcgee <jeff.mcgee@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_huc_loader.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c
> index 8d2b6ab..5a7ce65 100644
> --- a/drivers/gpu/drm/i915/intel_huc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_huc_loader.c
> @@ -45,6 +45,10 @@
>  #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"
> @@ -53,6 +57,9 @@
>  	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
> @@ -160,7 +167,11 @@ void intel_huc_init(struct drm_device *dev)
>  		fw_path = I915_SKL_HUC_UCODE;
>  		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)
>  		return;
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c
index 8d2b6ab..5a7ce65 100644
--- a/drivers/gpu/drm/i915/intel_huc_loader.c
+++ b/drivers/gpu/drm/i915/intel_huc_loader.c
@@ -45,6 +45,10 @@ 
 #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"
@@ -53,6 +57,9 @@ 
 	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
@@ -160,7 +167,11 @@  void intel_huc_init(struct drm_device *dev)
 		fw_path = I915_SKL_HUC_UCODE;
 		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)
 		return;