Re: [PATCH 1/2] drm/i915/huc: Move pending status before debug

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

 



On Wed, Mar 08, 2017 at 04:33:10PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> This avoids confusing log message sequences such as:
> 
>  [] i915/skl_huc_ver01_07_1398.bin fw status: fetch SUCCESS, load SUCCESS
>  [] HuC DMA transfer wait over with ret 0
>  [] i915/skl_huc_ver01_07_1398.bin fw status: fetch SUCCESS, load SUCCESS
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Cc: Anusha Srivatsa <anusha.srivatsa@xxxxxxxxx>
> Cc: Michał Winiarski <michal.winiarski@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_huc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c
> index e660109fc51e..8cf104350e5b 100644
> --- a/drivers/gpu/drm/i915/intel_huc.c
> +++ b/drivers/gpu/drm/i915/intel_huc.c
> @@ -213,6 +213,8 @@ int intel_huc_load(struct drm_i915_private *dev_priv)
>  	if (huc_fw->fetch_status == INTEL_UC_FIRMWARE_NONE)
>  		return 0;
>  
> +	huc_fw->load_status = INTEL_UC_FIRMWARE_PENDING;
> +
>  	DRM_DEBUG_DRIVER("%s fw status: fetch %s, load %s\n",
>  		huc_fw->path,
>  		intel_uc_fw_status_repr(huc_fw->fetch_status),
> @@ -222,8 +224,6 @@ int intel_huc_load(struct drm_i915_private *dev_priv)
>  	    huc_fw->load_status == INTEL_UC_FIRMWARE_FAIL)
>  		return -ENOEXEC;

Please also remove above "if" statement as this will never be true any more ;)

Btw, it looks that your patch will likely fix the case when previous fw
loading fails, as in case of reaching (fetch=SUCCESS,load=FAIL) status
we're always returning -ENOEXEC.

-Michal

>  
> -	huc_fw->load_status = INTEL_UC_FIRMWARE_PENDING;
> -
>  	switch (huc_fw->fetch_status) {
>  	case INTEL_UC_FIRMWARE_FAIL:
>  		/* something went wrong :( */
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux