Re: [PATCH] drm/i915/guc: skip disabling CTBs before sanitizing the GuC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 21, 2020 at 12:14:54PM -0700, Daniele Ceraolo Spurio wrote:
> If we're about to sanitize the GuC, something might have gone wrong
> beforehand, so we should avoid trying to talk to it. Even if GuC is
> still running fine, the sanitize will reset its internal state and clear
> the CTB registration, so there is still no need to explicitly do so.
> 
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/2469
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>

Looks good to me.
Reviewed-by: Matthew Brost <matthew.brost@xxxxxxxxx>

> Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
> Cc: John Harrison <John.C.Harrison@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 4e6070e95fe9..309eef9313e8 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -486,7 +486,7 @@ static int __uc_init_hw(struct intel_uc *uc)
>  
>  	ret = intel_guc_sample_forcewake(guc);
>  	if (ret)
> -		goto err_communication;
> +		goto err_log_capture;
>  
>  	if (intel_uc_uses_guc_submission(uc))
>  		intel_guc_submission_enable(guc);
> @@ -511,8 +511,6 @@ static int __uc_init_hw(struct intel_uc *uc)
>  	/*
>  	 * We've failed to load the firmware :(
>  	 */
> -err_communication:
> -	guc_disable_communication(guc);
>  err_log_capture:
>  	__uc_capture_load_err_log(uc);
>  err_out:
> @@ -540,9 +538,6 @@ static void __uc_fini_hw(struct intel_uc *uc)
>  	if (intel_uc_uses_guc_submission(uc))
>  		intel_guc_submission_disable(guc);
>  
> -	if (guc_communication_enabled(guc))
> -		guc_disable_communication(guc);
> -
>  	__uc_sanitize(uc);
>  }
>  
> @@ -559,7 +554,6 @@ void intel_uc_reset_prepare(struct intel_uc *uc)
>  	if (!intel_guc_is_ready(guc))
>  		return;
>  
> -	guc_disable_communication(guc);
>  	__uc_sanitize(uc);
>  }
>  
> -- 
> 2.24.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux