diff mbox

[2/5] drm/i915/icl/guc: Pass the bare minimum GuC init parameters for Icelake

Message ID 1525287804-2071-3-git-send-email-oscar.mateo@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

oscar.mateo@intel.com May 2, 2018, 7:03 p.m. UTC
Only enough to achieve HuC authentication. No GuC submission
or any other feature for the time being.

v2: Fix extra space

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: John Spotswood <john.a.spotswood@intel.com>
Cc: Tony Ye <tony.ye@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
---
 drivers/gpu/drm/i915/intel_guc.c      | 10 ++++++++--
 drivers/gpu/drm/i915/intel_guc_fwif.h |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

Comments

John Spotswood May 8, 2018, 11:22 p.m. UTC | #1
On Wed, 2018-05-02 at 12:03 -0700, Oscar Mateo wrote:
> Only enough to achieve HuC authentication. No GuC submission
> or any other feature for the time being.
> 
> v2: Fix extra space
> 
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: John Spotswood <john.a.spotswood@intel.com>

Reviewed-by: John Spotswood <john.a.spotswood@intel.com>

> Cc: Tony Ye <tony.ye@intel.com>
> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc.c      | 10 ++++++++--
>  drivers/gpu/drm/i915/intel_guc_fwif.h |  1 +
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc.c
> b/drivers/gpu/drm/i915/intel_guc.c
> index 116f4cc..b1b69e1 100644
> --- a/drivers/gpu/drm/i915/intel_guc.c
> +++ b/drivers/gpu/drm/i915/intel_guc.c
> @@ -245,8 +245,12 @@ void intel_guc_init_params(struct intel_guc
> *guc)
>  
>  	params[GUC_CTL_WA] |= GUC_CTL_WA_UK_BY_DRIVER;
>  
> -	params[GUC_CTL_FEATURE] |= GUC_CTL_DISABLE_SCHEDULER |
> -			GUC_CTL_VCS2_ENABLED;
> +	if (INTEL_GEN(dev_priv) >= 11) {
> +		params[GUC_CTL_FEATURE] |=
> GEN11_GUC_CTL_DISABLE_SCHEDULER;
> +	} else {
> +		params[GUC_CTL_FEATURE] |=
> GUC_CTL_DISABLE_SCHEDULER;
> +		params[GUC_CTL_FEATURE] |= GUC_CTL_VCS2_ENABLED;
> +	}
>  
>  	params[GUC_CTL_LOG_PARAMS] = guc->log.flags;
>  
> @@ -259,6 +263,8 @@ void intel_guc_init_params(struct intel_guc *guc)
>  		u32 pgs = intel_guc_ggtt_offset(guc, guc-
> >stage_desc_pool);
>  		u32 ctx_in_16 = GUC_MAX_STAGE_DESCRIPTORS / 16;
>  
> +		GEM_BUG_ON(INTEL_GEN(dev_priv) >= 11);
> +
>  		params[GUC_CTL_DEBUG] |= ads << GUC_ADS_ADDR_SHIFT;
>  		params[GUC_CTL_DEBUG] |= GUC_ADS_ENABLED;
>  
> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h
> b/drivers/gpu/drm/i915/intel_guc_fwif.h
> index 0867ba7..781c0c0 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
> @@ -106,6 +106,7 @@
>  #define   GUC_CTL_PREEMPTION_LOG	(1 << 5)
>  #define   GUC_CTL_ENABLE_SLPC		(1 << 7)
>  #define   GUC_CTL_RESET_ON_PREMPT_FAILURE	(1 << 8)
> +#define   GEN11_GUC_CTL_DISABLE_SCHEDULER	(1 << 14)
>  
>  #define GUC_CTL_DEBUG			8
>  #define   GUC_LOG_VERBOSITY_SHIFT	0
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index 116f4cc..b1b69e1 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -245,8 +245,12 @@  void intel_guc_init_params(struct intel_guc *guc)
 
 	params[GUC_CTL_WA] |= GUC_CTL_WA_UK_BY_DRIVER;
 
-	params[GUC_CTL_FEATURE] |= GUC_CTL_DISABLE_SCHEDULER |
-			GUC_CTL_VCS2_ENABLED;
+	if (INTEL_GEN(dev_priv) >= 11) {
+		params[GUC_CTL_FEATURE] |= GEN11_GUC_CTL_DISABLE_SCHEDULER;
+	} else {
+		params[GUC_CTL_FEATURE] |= GUC_CTL_DISABLE_SCHEDULER;
+		params[GUC_CTL_FEATURE] |= GUC_CTL_VCS2_ENABLED;
+	}
 
 	params[GUC_CTL_LOG_PARAMS] = guc->log.flags;
 
@@ -259,6 +263,8 @@  void intel_guc_init_params(struct intel_guc *guc)
 		u32 pgs = intel_guc_ggtt_offset(guc, guc->stage_desc_pool);
 		u32 ctx_in_16 = GUC_MAX_STAGE_DESCRIPTORS / 16;
 
+		GEM_BUG_ON(INTEL_GEN(dev_priv) >= 11);
+
 		params[GUC_CTL_DEBUG] |= ads << GUC_ADS_ADDR_SHIFT;
 		params[GUC_CTL_DEBUG] |= GUC_ADS_ENABLED;
 
diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
index 0867ba7..781c0c0 100644
--- a/drivers/gpu/drm/i915/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
@@ -106,6 +106,7 @@ 
 #define   GUC_CTL_PREEMPTION_LOG	(1 << 5)
 #define   GUC_CTL_ENABLE_SLPC		(1 << 7)
 #define   GUC_CTL_RESET_ON_PREMPT_FAILURE	(1 << 8)
+#define   GEN11_GUC_CTL_DISABLE_SCHEDULER	(1 << 14)
 
 #define GUC_CTL_DEBUG			8
 #define   GUC_LOG_VERBOSITY_SHIFT	0