[Intel-gfx] [PATCH] drm/i915/guc: Clear enable_guc_loading in case of init failure

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Mon Jun 5 15:21:53 UTC 2017


You'll also need to change the order of operations in intel_uc_fini_hw 
to make sure guc_free_load_err_log is called before the 
i915.enable_guc_loading check, because that log exists exactly when GuC 
loading failed.

Thanks,
Daniele

On 02/06/17 16:46, Michel Thierry wrote:
> And prevent calling i915_ggtt_disable_guc twice (the first when GuC init
> failed, and the second time during driver unload / intel_uc_fini_hw),
> and hitting the GEM_BUG_ON.
>
> Fixes: 04f7b24eccdf ("drm/i915/guc: Assert that we switch between known
> ggtt->invalidate functions")
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_uc.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> index 3524ff07a0f2..c5ef4fa2b404 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -433,6 +433,11 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)
>  		DRM_NOTE("Falling back from GuC submission to execlist mode\n");
>  	}
>
> +	if (i915.enable_guc_loading) {
> +		i915.enable_guc_loading = 0;
> +		DRM_NOTE("GuC firmware loading disabled\n");
> +	}
> +
>  	return ret;
>  }
>
>


More information about the Intel-gfx mailing list