[v2,02/22] drm/i915/guc: Don't allow GuC submission

Submitted by Michal Wajdeczko on April 11, 2019, 8:44 a.m.

Details

Message ID 20190411084436.24384-3-michal.wajdeczko@intel.com
State New
Headers show
Series "GuC 32.0.3" ( rev: 3 2 ) in Intel GFX

Browsing this patch as part of:
"GuC 32.0.3" rev 2 in Intel GFX
<< prev patch [2/22] next patch >>

Commit Message

Michal Wajdeczko April 11, 2019, 8:44 a.m.
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.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
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>
---
 drivers/gpu/drm/i915/intel_uc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 2a56e2363888..21310b917ccc 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -130,6 +130,13 @@  static void sanitize_options_early(struct drm_i915_private *i915)
 					  "no HuC firmware");
 	}
 
+	/* XXX: Verify GuC submission support */
+	if (intel_uc_is_using_guc_submission(i915)) {
+		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
+			 "enable_guc", i915_modparams.enable_guc,
+			 "submission not supported");
+	}
+
 	/* A negative value means "use platform/config default" */
 	if (i915_modparams.guc_log_level < 0)
 		i915_modparams.guc_log_level =
@@ -286,6 +293,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;

Comments

On 11/04/2019 11:44, 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.

If I understand correctly, you are disabling command submission by
returning -EIO, which leads to the GPU being marked as wedged but KMS
still working.

If I read the code correctly, this is a weak NACK from me, as even
though Linux module parameters aren't considered stable unless marked
otherwise
(https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-module),
users are already relying on enable_guc=3 and after updating their
kernel they will get a non-functional GPU. See
https://www.google.de/search?q=enable_guc%3D3

My strong recommendation is to fallback to execlist and warn in the logs
that GuC command submission is not considered stable and that i915
fellback to execlists, which are tested and known to work. You can then
drop patch 22.

If you plan on going through with this plan, the least you should do is
look at new bugs in mesa and i915 every day for the next year or so for
wedged GPUs on boot, as users will have forgotten they set the option
and will think this is a regression. Are you ready to make this commitment?

Martin


> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 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>
> ---
>  drivers/gpu/drm/i915/intel_uc.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 2a56e2363888..21310b917ccc 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -130,6 +130,13 @@ static void sanitize_options_early(struct drm_i915_private *i915)
>  					  "no HuC firmware");
>  	}
>  
> +	/* XXX: Verify GuC submission support */
> +	if (intel_uc_is_using_guc_submission(i915)) {
> +		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
> +			 "enable_guc", i915_modparams.enable_guc,
> +			 "submission not supported");
> +	}
> +
>  	/* A negative value means "use platform/config default" */
>  	if (i915_modparams.guc_log_level < 0)
>  		i915_modparams.guc_log_level =
> @@ -286,6 +293,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;
>