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

Message ID 1481840990-31191-5-git-send-email-anusha.srivatsa@intel.com
State New
Headers show

Commit Message

Srivatsa, Anusha Dec. 15, 2016, 10:29 p.m. UTC
From: Anusha Srivatsa <anusha.srivatsa@intel.com>

This patch adds the HuC Loading for the BXT by using
the updated file construction.

Version 1.7 of the HuC firmware.

v2: rebased.
v3: rebased on top of drm-tip
v4: rebased.
v5: rebased. Rename BXT_FW_MAJOR to BXT_HUC_FW_

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

Comments

Tvrtko Ursulin Dec. 16, 2016, 4:16 p.m. UTC | #1
On 15/12/2016 22:29, anushasr wrote:
> From: Anusha Srivatsa <anusha.srivatsa@intel.com>
>
> This patch adds the HuC Loading for the BXT by using
> the updated file construction.
>
> Version 1.7 of the HuC firmware.
>
> v2: rebased.
> v3: rebased on top of drm-tip
> v4: rebased.
> v5: rebased. Rename BXT_FW_MAJOR to BXT_HUC_FW_
>
> Cc: Jeff Mcgee <jeff.mcgee@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> Reviewed-by: Jeff McGee <jeff.mcgee@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_huc_loader.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c
> index 0f929cc..f36efd4 100644
> --- a/drivers/gpu/drm/i915/intel_huc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_huc_loader.c
> @@ -40,6 +40,10 @@
>   * 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);

More curiosity - given the versions between SKL and BXT are identical - 
is it actually the same binary file in both cases?

Regards,

Tvrtko

>  /**
>   * huc_ucode_xfer() - DMA's the firmware
>   * @dev_priv: the drm device
> @@ -157,6 +164,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->uc_fw_path = fw_path;
>
Srivatsa, Anusha Dec. 16, 2016, 6:34 p.m. UTC | #2
>-----Original Message-----

>From: Tvrtko Ursulin [mailto:tvrtko.ursulin@linux.intel.com]

>Sent: Friday, December 16, 2016 8:16 AM

>To: Srivatsa, Anusha <anusha.srivatsa@intel.com>; intel-

>gfx@lists.freedesktop.org

>Subject: Re: [Intel-gfx] [PATCH 4/8] drm/i915/huc: Add BXT HuC Loading Support

>

>

>On 15/12/2016 22:29, anushasr wrote:

>> From: Anusha Srivatsa <anusha.srivatsa@intel.com>

>>

>> This patch adds the HuC Loading for the BXT by using the updated file

>> construction.

>>

>> Version 1.7 of the HuC firmware.

>>

>> v2: rebased.

>> v3: rebased on top of drm-tip

>> v4: rebased.

>> v5: rebased. Rename BXT_FW_MAJOR to BXT_HUC_FW_

>>

>> Cc: Jeff Mcgee <jeff.mcgee@intel.com>

>> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>

>> Reviewed-by: Jeff McGee <jeff.mcgee@intel.com>

>> ---

>>  drivers/gpu/drm/i915/intel_huc_loader.c | 11 +++++++++++

>>  1 file changed, 11 insertions(+)

>>

>> diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c

>> b/drivers/gpu/drm/i915/intel_huc_loader.c

>> index 0f929cc..f36efd4 100644

>> --- a/drivers/gpu/drm/i915/intel_huc_loader.c

>> +++ b/drivers/gpu/drm/i915/intel_huc_loader.c

>> @@ -40,6 +40,10 @@

>>   * 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);

>

>More curiosity - given the versions between SKL and BXT are identical - is it

>actually the same binary file in both cases?



Hi Tvrtko its different binary file.
Cheers,
Anusha
>Regards,

>Tvrtko

>

>>  /**

>>   * huc_ucode_xfer() - DMA's the firmware

>>   * @dev_priv: the drm device

>> @@ -157,6 +164,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->uc_fw_path = fw_path;

>>

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c
index 0f929cc..f36efd4 100644
--- a/drivers/gpu/drm/i915/intel_huc_loader.c
+++ b/drivers/gpu/drm/i915/intel_huc_loader.c
@@ -40,6 +40,10 @@ 
  * 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 device
@@ -157,6 +164,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->uc_fw_path = fw_path;