diff mbox series

drm/i915/guc: Define GuC firmware version for Comet Lake

Message ID 20190629003709.14513-1-anusha.srivatsa@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/guc: Define GuC firmware version for Comet Lake | expand

Commit Message

Srivatsa, Anusha June 29, 2019, 12:37 a.m. UTC
Load GuC for Comet Lake. Depending on the REVID,
we load either the KBL firmware or the CML firmware.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_fw.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Michal Wajdeczko July 1, 2019, 12:21 p.m. UTC | #1
On Sat, 29 Jun 2019 02:37:09 +0200, Anusha Srivatsa  
<anusha.srivatsa@intel.com> wrote:

> Load GuC for Comet Lake. Depending on the REVID,
> we load either the KBL firmware or the CML firmware.
>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc_fw.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c  
> b/drivers/gpu/drm/i915/intel_guc_fw.c
> index 970f39ef248b..eb0be87c358f 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fw.c
> +++ b/drivers/gpu/drm/i915/intel_guc_fw.c
> @@ -58,6 +58,13 @@ MODULE_FIRMWARE(BXT_GUC_FIRMWARE_PATH);
>  #define KBL_GUC_FIRMWARE_PATH __MAKE_GUC_FW_PATH(KBL)
>  MODULE_FIRMWARE(KBL_GUC_FIRMWARE_PATH);
> +#define CML_GUC_FW_PREFIX cml
> +#define CML_GUC_FW_MAJOR 33
> +#define CML_GUC_FW_MINOR 0
> +#define CML_GUC_FW_PATCH 0

you can't add GuC firmware with different major version then currently
supported by the driver as it will not work. please note that series for
enabling GuC 33.0.0 is still not merged, see latest drop on trybot [1]

[1] https://patchwork.freedesktop.org/series/62774/

> +#define CML_GUC_FIRMWARE_PATH __MAKE_GUC_FW_PATH(KBL)
> +MODULE_FIRMWARE(CML_GUC_FIRMWARE_PATH);
> +
>  #define GLK_GUC_FW_PREFIX glk
>  #define GLK_GUC_FW_MAJOR 32
>  #define GLK_GUC_FW_MINOR 0
> @@ -94,6 +101,16 @@ static void guc_fw_select(struct intel_uc_fw *guc_fw)
>  		guc_fw->path = GLK_GUC_FIRMWARE_PATH;
>  		guc_fw->major_ver_wanted = GLK_GUC_FW_MAJOR;
>  		guc_fw->minor_ver_wanted = GLK_GUC_FW_MINOR;
> +	} else if (IS_COMETLAKE(i915)) {

we treat CML as COFFEELAKE

> +		if (REVID(dev_priv) == 5) {

maybe to be future proof, this should be >= 5 ?

> +			guc_fw->path = CML_GUC_FIRMWARE_PATH;
> +			guc_fw->major_ver_wanted = CML_GUC_FW_MAJOR;
> +			guc_fw->minor_ver_wanted = CML_GUC_FW_MINOR;
> +		} else {
> +			guc_fw->path = KBL_GUC_FIRMWARE_PATH;
> +			guc_fw->major_ver_wanted = KBL_GUC_FW_MAJOR;
> +			guc_fw->minor_ver_wanted = KBL_GUC_FW_MINOR;
> +		}
>  	} else if (IS_KABYLAKE(i915) || IS_COFFEELAKE(i915)) {

please remove CFL from here

>  		guc_fw->path = KBL_GUC_FIRMWARE_PATH;
>  		guc_fw->major_ver_wanted = KBL_GUC_FW_MAJOR;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c b/drivers/gpu/drm/i915/intel_guc_fw.c
index 970f39ef248b..eb0be87c358f 100644
--- a/drivers/gpu/drm/i915/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/intel_guc_fw.c
@@ -58,6 +58,13 @@  MODULE_FIRMWARE(BXT_GUC_FIRMWARE_PATH);
 #define KBL_GUC_FIRMWARE_PATH __MAKE_GUC_FW_PATH(KBL)
 MODULE_FIRMWARE(KBL_GUC_FIRMWARE_PATH);
 
+#define CML_GUC_FW_PREFIX cml
+#define CML_GUC_FW_MAJOR 33
+#define CML_GUC_FW_MINOR 0
+#define CML_GUC_FW_PATCH 0
+#define CML_GUC_FIRMWARE_PATH __MAKE_GUC_FW_PATH(KBL)
+MODULE_FIRMWARE(CML_GUC_FIRMWARE_PATH);
+
 #define GLK_GUC_FW_PREFIX glk
 #define GLK_GUC_FW_MAJOR 32
 #define GLK_GUC_FW_MINOR 0
@@ -94,6 +101,16 @@  static void guc_fw_select(struct intel_uc_fw *guc_fw)
 		guc_fw->path = GLK_GUC_FIRMWARE_PATH;
 		guc_fw->major_ver_wanted = GLK_GUC_FW_MAJOR;
 		guc_fw->minor_ver_wanted = GLK_GUC_FW_MINOR;
+	} else if (IS_COMETLAKE(i915)) {
+		if (REVID(dev_priv) == 5) {
+			guc_fw->path = CML_GUC_FIRMWARE_PATH;
+			guc_fw->major_ver_wanted = CML_GUC_FW_MAJOR;
+			guc_fw->minor_ver_wanted = CML_GUC_FW_MINOR;
+		} else {
+			guc_fw->path = KBL_GUC_FIRMWARE_PATH;
+			guc_fw->major_ver_wanted = KBL_GUC_FW_MAJOR;
+			guc_fw->minor_ver_wanted = KBL_GUC_FW_MINOR;
+		}
 	} else if (IS_KABYLAKE(i915) || IS_COFFEELAKE(i915)) {
 		guc_fw->path = KBL_GUC_FIRMWARE_PATH;
 		guc_fw->major_ver_wanted = KBL_GUC_FW_MAJOR;