Re: [PATCH 2/6] drm/i915/guc: More debug print updates - GSC firmware

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

 




On 03.02.2023 01:11, John.C.Harrison@xxxxxxxxx wrote:
> From: John Harrison <John.C.Harrison@xxxxxxxxx>
> 
> Update a bunch more debug prints to use the new GT based scheme.
> 
> Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 8 +++-----
>  drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c | 7 +++----
>  2 files changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
> index e73d4440c5e82..8e0c736fa4e94 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
> @@ -6,6 +6,7 @@
>  #include "gt/intel_engine_pm.h"
>  #include "gt/intel_gpu_commands.h"
>  #include "gt/intel_gt.h"
> +#include "gt/intel_gt_print.h"
>  #include "gt/intel_ring.h"
>  #include "intel_gsc_fw.h"
>  
> @@ -88,9 +89,7 @@ static int gsc_fw_load(struct intel_gsc_uc *gsc)
>  	i915_request_put(rq);
>  
>  	if (err)
> -		drm_err(&gsc_uc_to_gt(gsc)->i915->drm,
> -			"Request submission for GSC load failed (%d)\n",
> -			err);
> +		gt_err(gsc_uc_to_gt(gsc), "Request submission for GSC load failed (%d)\n", err);
>  
>  	return err;
>  }
> @@ -200,8 +199,7 @@ int intel_gsc_uc_fw_upload(struct intel_gsc_uc *gsc)
>  	/* FW is not fully operational until we enable SW proxy */
>  	intel_uc_fw_change_status(gsc_fw, INTEL_UC_FIRMWARE_TRANSFERRED);
>  
> -	drm_info(&gt->i915->drm, "Loaded GSC firmware %s\n",
> -		 gsc_fw->file_selected.path);
> +	gt_info(gt, "Loaded GSC firmware %s\n", gsc_fw->file_selected.path);
>  
>  	return 0;
>  
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
> index fd21dbd2663be..6e7d5aa4dcf5e 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
> @@ -6,6 +6,7 @@
>  #include <linux/types.h>
>  
>  #include "gt/intel_gt.h"
> +#include "gt/intel_gt_print.h"
>  #include "intel_gsc_uc.h"
>  #include "intel_gsc_fw.h"
>  #include "i915_drv.h"
> @@ -59,7 +60,6 @@ int intel_gsc_uc_init(struct intel_gsc_uc *gsc)
>  {
>  	static struct lock_class_key gsc_lock;
>  	struct intel_gt *gt = gsc_uc_to_gt(gsc);
> -	struct drm_i915_private *i915 = gt->i915;
>  	struct intel_engine_cs *engine = gt->engine[GSC0];
>  	struct intel_context *ce;
>  	struct i915_vma *vma;
> @@ -81,8 +81,7 @@ int intel_gsc_uc_init(struct intel_gsc_uc *gsc)
>  						I915_GEM_HWS_GSC_ADDR,
>  						&gsc_lock, "gsc_context");
>  	if (IS_ERR(ce)) {
> -		drm_err(&gt->i915->drm,
> -			"failed to create GSC CS ctx for FW communication\n");
> +		gt_err(gt, "failed to create GSC CS ctx for FW communication\n");
>  		err =  PTR_ERR(ce);
>  		goto out_vma;
>  	}
> @@ -98,7 +97,7 @@ int intel_gsc_uc_init(struct intel_gsc_uc *gsc)
>  out_fw:
>  	intel_uc_fw_fini(&gsc->fw);
>  out:
> -	i915_probe_error(i915, "failed with %d\n", err);
> +	gt_probe_error(gt, "GSC init failed with %d\n", err);
>  	return err;
>  }
>  

Acked-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>

but with %pe used for printing errors (where applicable) it would look
even better



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

  Powered by Linux