diff mbox

drm/i915/GLK/HuC: Load HuC on GLK

Message ID 1490142555-2663-1-git-send-email-anusha.srivatsa@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Srivatsa, Anusha March 22, 2017, 12:29 a.m. UTC
Load HuC version 1.07.1748 on GLK.

v2: rebased.
v3: Use name of the right platform(John Spotswood)

Cc: Jeff Mcgee <jeff.mcgee@intel.com>
Cc: John Spotswood <john.a.spotswood@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 drivers/gpu/drm/i915/intel_huc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

John Spotswood March 28, 2017, 9:26 p.m. UTC | #1
On Tue, 2017-03-21 at 17:29 -0700, Anusha Srivatsa wrote:
> Load HuC version 1.07.1748 on GLK.
> 
> v2: rebased.
> v3: Use name of the right platform(John Spotswood)
> 
> Cc: Jeff Mcgee <jeff.mcgee@intel.com>
> Cc: John Spotswood <john.a.spotswood@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_huc.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_huc.c
> b/drivers/gpu/drm/i915/intel_huc.c
> index 7af900b..ea2b325 100644
> --- a/drivers/gpu/drm/i915/intel_huc.c
> +++ b/drivers/gpu/drm/i915/intel_huc.c
> @@ -52,6 +52,10 @@
>  #define KBL_HUC_FW_MINOR 00
>  #define KBL_BLD_NUM 1810
>  
> +#define GLK_HUC_FW_MAJOR 01
> +#define GLK_HUC_FW_MINOR 07
> +#define GLK_BLD_NUM 1748
> +
>  #define HUC_FW_PATH(platform, major, minor, bld_num) \
>  	"i915/" __stringify(platform) "_huc_ver" __stringify(major)
> "_" \
>  	__stringify(minor) "_" __stringify(bld_num) ".bin"
> @@ -68,6 +72,9 @@ MODULE_FIRMWARE(I915_BXT_HUC_UCODE);
>  	KBL_HUC_FW_MINOR, KBL_BLD_NUM)
>  MODULE_FIRMWARE(I915_KBL_HUC_UCODE);
>  
> +#define I915_GLK_HUC_UCODE HUC_FW_PATH(glk, GLK_HUC_FW_MAJOR, \
> +	GLK_HUC_FW_MINOR, GLK_BLD_NUM)

I think you need a line after this #define that says the following:
   MODULE_FIRMWARE(I915_GLK_HUC_UCODE);

> +
>  /**
>   * huc_ucode_xfer() - DMA's the firmware
>   * @dev_priv: the drm_i915_private device
> @@ -169,6 +176,10 @@ void intel_huc_select_fw(struct intel_huc *huc)
>  		huc->fw.path = I915_KBL_HUC_UCODE;
>  		huc->fw.major_ver_wanted = KBL_HUC_FW_MAJOR;
>  		huc->fw.minor_ver_wanted = KBL_HUC_FW_MINOR;
> +	} else if (IS_GEMINILAKE(dev_priv)) {
> +		huc->fw.path = I915_GLK_HUC_UCODE;
> +		huc->fw.major_ver_wanted = GLK_HUC_FW_MAJOR;
> +		huc->fw.minor_ver_wanted = GLK_HUC_FW_MINOR;
>  	} else {
>  		DRM_ERROR("No HuC firmware known for platform with
> HuC!\n");
>  		return;
Jani Nikula March 29, 2017, 7:54 a.m. UTC | #2
On Wed, 29 Mar 2017, John Spotswood <john.a.spotswood@intel.com> wrote:
> On Tue, 2017-03-21 at 17:29 -0700, Anusha Srivatsa wrote:
>> +#define I915_GLK_HUC_UCODE HUC_FW_PATH(glk, GLK_HUC_FW_MAJOR, \
>> +	GLK_HUC_FW_MINOR, GLK_BLD_NUM)
>
> I think you need a line after this #define that says the following:
>    MODULE_FIRMWARE(I915_GLK_HUC_UCODE);

The rule is, we'll only add the MODULE_FIRMWARE annotation *after* the
firmware blob has hit the linux-firmware repository.

BR,
Jani.
Joonas Lahtinen March 30, 2017, 1:54 p.m. UTC | #3
On ke, 2017-03-29 at 10:54 +0300, Jani Nikula wrote:
> > On Wed, 29 Mar 2017, John Spotswood <john.a.spotswood@intel.com> wrote:
> > 
> > On Tue, 2017-03-21 at 17:29 -0700, Anusha Srivatsa wrote:
> > > 
> > > +#define I915_GLK_HUC_UCODE HUC_FW_PATH(glk, GLK_HUC_FW_MAJOR, \
> > > +	GLK_HUC_FW_MINOR, GLK_BLD_NUM)
> > 
> > I think you need a line after this #define that says the following:
> >    MODULE_FIRMWARE(I915_GLK_HUC_UCODE);
> 
> The rule is, we'll only add the MODULE_FIRMWARE annotation *after* the
> firmware blob has hit the linux-firmware repository.

Maybe we should document the expectation here too?

Regards, Joonas
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c
index 7af900b..ea2b325 100644
--- a/drivers/gpu/drm/i915/intel_huc.c
+++ b/drivers/gpu/drm/i915/intel_huc.c
@@ -52,6 +52,10 @@ 
 #define KBL_HUC_FW_MINOR 00
 #define KBL_BLD_NUM 1810
 
+#define GLK_HUC_FW_MAJOR 01
+#define GLK_HUC_FW_MINOR 07
+#define GLK_BLD_NUM 1748
+
 #define HUC_FW_PATH(platform, major, minor, bld_num) \
 	"i915/" __stringify(platform) "_huc_ver" __stringify(major) "_" \
 	__stringify(minor) "_" __stringify(bld_num) ".bin"
@@ -68,6 +72,9 @@  MODULE_FIRMWARE(I915_BXT_HUC_UCODE);
 	KBL_HUC_FW_MINOR, KBL_BLD_NUM)
 MODULE_FIRMWARE(I915_KBL_HUC_UCODE);
 
+#define I915_GLK_HUC_UCODE HUC_FW_PATH(glk, GLK_HUC_FW_MAJOR, \
+	GLK_HUC_FW_MINOR, GLK_BLD_NUM)
+
 /**
  * huc_ucode_xfer() - DMA's the firmware
  * @dev_priv: the drm_i915_private device
@@ -169,6 +176,10 @@  void intel_huc_select_fw(struct intel_huc *huc)
 		huc->fw.path = I915_KBL_HUC_UCODE;
 		huc->fw.major_ver_wanted = KBL_HUC_FW_MAJOR;
 		huc->fw.minor_ver_wanted = KBL_HUC_FW_MINOR;
+	} else if (IS_GEMINILAKE(dev_priv)) {
+		huc->fw.path = I915_GLK_HUC_UCODE;
+		huc->fw.major_ver_wanted = GLK_HUC_FW_MAJOR;
+		huc->fw.minor_ver_wanted = GLK_HUC_FW_MINOR;
 	} else {
 		DRM_ERROR("No HuC firmware known for platform with HuC!\n");
 		return;