[v3,02/19] drm/i915/guc: Don't allow GuC submission
diff mbox series

Message ID 20190417054004.28176-3-michal.wajdeczko@intel.com
State New
Headers show
Series
  • GuC 32.0.3
Related show

Commit Message

Michal Wajdeczko April 17, 2019, 5:39 a.m. UTC
Due to the upcoming changes to the GuC ABI interface, we must
disable GuC submission mode until final ABI will be available
on all GuC firmwares.

To avoid regressions on systems configured to run with no longer
supported configuration "enable_guc=3" or "enable_guc=1" clear
GuC submission bit.

v2: force switch to non-GuC submission mode

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Spotswood <john.a.spotswood@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: Tony Ye <tony.ye@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Jeff Mcgee <jeff.mcgee@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_uc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Martin Peres April 17, 2019, 7:14 a.m. UTC | #1
On 17/04/2019 08:39, Michal Wajdeczko wrote:
> Due to the upcoming changes to the GuC ABI interface, we must
> disable GuC submission mode until final ABI will be available
> on all GuC firmwares.
> 
> To avoid regressions on systems configured to run with no longer
> supported configuration "enable_guc=3" or "enable_guc=1" clear
> GuC submission bit.
> 
> v2: force switch to non-GuC submission mode
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: John Spotswood <john.a.spotswood@intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> Cc: Tony Ye <tony.ye@intel.com>
> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> Cc: Jeff Mcgee <jeff.mcgee@intel.com>
> Cc: Antonio Argenziano <antonio.argenziano@intel.com>
> Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> Cc: Martin Peres <martin.peres@linux.intel.com>

Thanks for the update! This will also allow you to drop the HAX patch
(patch 22/22) :)

Acked-by: Martin Peres <martin.peres@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_uc.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 2a56e2363888..9eadd21299ca 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -130,6 +130,15 @@ static void sanitize_options_early(struct drm_i915_private *i915)
>  					  "no HuC firmware");
>  	}
>  
> +	/* XXX: GuC submission is unavailable for now */
> +	if (intel_uc_is_using_guc_submission(i915)) {
> +		DRM_INFO("Incompatible option detected: %s=%d, %s!\n",
> +			 "enable_guc", i915_modparams.enable_guc,
> +			 "GuC submission not supported");
> +		DRM_INFO("Switching to non-GuC submission mode!\n");
> +		i915_modparams.enable_guc &= ~ENABLE_GUC_SUBMISSION;
> +	}
> +
>  	/* A negative value means "use platform/config default" */
>  	if (i915_modparams.guc_log_level < 0)
>  		i915_modparams.guc_log_level =
> @@ -286,6 +295,10 @@ int intel_uc_init(struct drm_i915_private *i915)
>  	if (!HAS_GUC(i915))
>  		return -ENODEV;
>  
> +	/* XXX: GuC submission is unavailable for now */
> +	if (USES_GUC_SUBMISSION(i915))
> +		return -EIO;
> +
>  	ret = intel_guc_init(guc);
>  	if (ret)
>  		return ret;
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 2a56e2363888..9eadd21299ca 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -130,6 +130,15 @@  static void sanitize_options_early(struct drm_i915_private *i915)
 					  "no HuC firmware");
 	}
 
+	/* XXX: GuC submission is unavailable for now */
+	if (intel_uc_is_using_guc_submission(i915)) {
+		DRM_INFO("Incompatible option detected: %s=%d, %s!\n",
+			 "enable_guc", i915_modparams.enable_guc,
+			 "GuC submission not supported");
+		DRM_INFO("Switching to non-GuC submission mode!\n");
+		i915_modparams.enable_guc &= ~ENABLE_GUC_SUBMISSION;
+	}
+
 	/* A negative value means "use platform/config default" */
 	if (i915_modparams.guc_log_level < 0)
 		i915_modparams.guc_log_level =
@@ -286,6 +295,10 @@  int intel_uc_init(struct drm_i915_private *i915)
 	if (!HAS_GUC(i915))
 		return -ENODEV;
 
+	/* XXX: GuC submission is unavailable for now */
+	if (USES_GUC_SUBMISSION(i915))
+		return -EIO;
+
 	ret = intel_guc_init(guc);
 	if (ret)
 		return ret;