[Intel-gfx] [PATCH 05/15] drm/i915/guc: Log runtime should consist of both mapping and relay

Michal Wajdeczko michal.wajdeczko at intel.com
Tue Feb 27 14:21:49 UTC 2018


On Tue, 27 Feb 2018 13:52:20 +0100, Michał Winiarski  
<michal.winiarski at intel.com> wrote:

> Currently, we're treating relay and mapping of GuC log as a separate
> concepts. We're also using inconsistent locking, sometimes using
> relay_lock, sometimes using struct mutex.
> Let's correct that. Anything touching the runtime is now serialized
> using runtime.lock, while we're still using struct mutex as inner lock
> for mapping.
> We're still racy in setting the log level - but we'll take care of that
> in the following patches.
>
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---

/snip/

> diff --git a/drivers/gpu/drm/i915/intel_uc.c  
> b/drivers/gpu/drm/i915/intel_uc.c
> index e9aba3c35264..55a9b5b673e0 100644
> --- a/drivers/gpu/drm/i915/intel_uc.c
> +++ b/drivers/gpu/drm/i915/intel_uc.c
> @@ -221,18 +221,24 @@ static void guc_free_load_err_log(struct intel_guc  
> *guc)
> int intel_uc_log_register(struct drm_i915_private *dev_priv)
>  {
> -	if (!USES_GUC(dev_priv) || !i915_modparams.guc_log_level)
> +	int ret = 0;
> +
> +	if (!USES_GUC(dev_priv))
>  		return 0;
> -	return intel_guc_log_register(&dev_priv->guc);
> +	if (i915_modparams.guc_log_level)
> +		ret = intel_guc_log_register(&dev_priv->guc);
> +
> +	return ret;
>  }
> void intel_uc_log_unregister(struct drm_i915_private *dev_priv)
>  {
> -	if (!USES_GUC(dev_priv) || !i915_modparams.guc_log_level)
> +	if (!USES_GUC(dev_priv))
>  		return;
> -	intel_guc_log_unregister(&dev_priv->guc);
> +	if (i915_modparams.guc_log_level)
> +		intel_guc_log_unregister(&dev_priv->guc);
>  }
> static int guc_enable_communication(struct intel_guc *guc)

this chunk can be done in patch 2/15


More information about the Intel-gfx mailing list