[PATCH] drm/xe/uc: Use GT-oriented firmware messages

Cavitt, Jonathan jonathan.cavitt at intel.com
Fri Jun 6 21:06:26 UTC 2025


-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Michal Wajdeczko
Sent: Friday, June 6, 2025 1:43 PM
To: intel-xe at lists.freedesktop.org
Cc: Wajdeczko, Michal <Michal.Wajdeczko at intel.com>; Ceraolo Spurio, Daniele <daniele.ceraolospurio at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>; Harrison, John C <john.c.harrison at intel.com>
Subject: [PATCH] drm/xe/uc: Use GT-oriented firmware messages
> 
> We are already prepared to define firmwares per-GT type, so we
> should also prepare our messages to be GT-oriented.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Cc: John Harrison <John.C.Harrison at Intel.com>

LGTM.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> ---
>  drivers/gpu/drm/xe/xe_uc_fw.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index 7b2d01d39b86..dcc3021c9f5a 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -668,8 +668,9 @@ do { \
>  static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmware_p)
>  {
>  	struct xe_device *xe = uc_fw_to_xe(uc_fw);
> +	struct xe_gt *gt = uc_fw_to_gt(uc_fw);
> +	struct drm_printer p = xe_gt_info_printer(gt);
>  	struct device *dev = xe->drm.dev;
> -	struct drm_printer p = drm_info_printer(dev);
>  	const struct firmware *fw = NULL;
>  	int err;
>  
> @@ -678,8 +679,8 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
>  	 * before we're looked at the HW caps to see if we have uc support
>  	 */
>  	BUILD_BUG_ON(XE_UC_FIRMWARE_UNINITIALIZED);
> -	xe_assert(xe, !uc_fw->status);
> -	xe_assert(xe, !uc_fw->path);
> +	xe_gt_assert(gt, !uc_fw->status);
> +	xe_gt_assert(gt, !uc_fw->path);
>  
>  	uc_fw_auto_select(xe, uc_fw);
>  
> @@ -703,7 +704,7 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
>  
>  	if (!xe_uc_fw_is_supported(uc_fw)) {
>  		if (uc_fw->type == XE_UC_FW_TYPE_GUC) {
> -			drm_err(&xe->drm, "No GuC firmware defined for platform\n");
> +			xe_gt_err(gt, "No GuC firmware defined for platform\n");
>  			return -ENOENT;
>  		}
>  		return 0;
> @@ -712,7 +713,7 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
>  	/* an empty path means the firmware is disabled */
>  	if (!xe_device_uc_enabled(xe) || !(*uc_fw->path)) {
>  		xe_uc_fw_change_status(uc_fw, XE_UC_FIRMWARE_DISABLED);
> -		drm_dbg(&xe->drm, "%s disabled", xe_uc_fw_type_repr(uc_fw->type));
> +		xe_gt_dbg(gt, "%s disabled\n", xe_uc_fw_type_repr(uc_fw->type));
>  		return 0;
>  	}
>  
> @@ -745,10 +746,10 @@ static int uc_fw_request(struct xe_uc_fw *uc_fw, const struct firmware **firmwar
>  			       XE_UC_FIRMWARE_MISSING :
>  			       XE_UC_FIRMWARE_ERROR);
>  
> -	drm_notice(&xe->drm, "%s firmware %s: fetch failed with error %d\n",
> -		   xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, err);
> -	drm_info(&xe->drm, "%s firmware(s) can be downloaded from %s\n",
> -		 xe_uc_fw_type_repr(uc_fw->type), XE_UC_FIRMWARE_URL);
> +	xe_gt_notice(gt, "%s firmware %s: fetch failed with error %pe\n",
> +		     xe_uc_fw_type_repr(uc_fw->type), uc_fw->path, ERR_PTR(err));
> +	xe_gt_info(gt, "%s firmware(s) can be downloaded from %s\n",
> +		   xe_uc_fw_type_repr(uc_fw->type), XE_UC_FIRMWARE_URL);
>  
>  	release_firmware(fw);		/* OK even if fw is NULL */
>  
> -- 
> 2.47.1
> 
> 


More information about the Intel-xe mailing list