[PATCH] drm/xe/guc: Improve GuC doorbell/context ID manager intro message

Piotr Piórkowski piotr.piorkowski at intel.com
Fri Apr 19 20:36:12 UTC 2024


Michal Wajdeczko <michal.wajdeczko at intel.com> wrote on pią [2024-kwi-19 17:34:07 +0200]:
> We can use recently added str_plural() helper.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_db_mgr.c | 3 ++-
>  drivers/gpu/drm/xe/xe_guc_id_mgr.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_db_mgr.c b/drivers/gpu/drm/xe/xe_guc_db_mgr.c
> index 8d9a0287df6b..6767e8076e6b 100644
> --- a/drivers/gpu/drm/xe/xe_guc_db_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_guc_db_mgr.c
> @@ -106,7 +106,8 @@ int xe_guc_db_mgr_init(struct xe_guc_db_mgr *dbm, unsigned int count)
>  	if (ret)
>  		return ret;
>  done:
> -	xe_gt_dbg(dbm_to_gt(dbm), "using %u doorbell(s)\n", dbm->count);
> +	xe_gt_dbg(dbm_to_gt(dbm), "using %u doorbell%s\n",
> +		  dbm->count, str_plural(dbm->count));
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/xe/xe_guc_id_mgr.c b/drivers/gpu/drm/xe/xe_guc_id_mgr.c
> index 0fb7c6b78c31..cd0549d0ef89 100644
> --- a/drivers/gpu/drm/xe/xe_guc_id_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_guc_id_mgr.c
> @@ -97,7 +97,8 @@ int xe_guc_id_mgr_init(struct xe_guc_id_mgr *idm, unsigned int limit)
>  	if (ret)
>  		return ret;
>  
> -	xe_gt_info(idm_to_gt(idm), "using %u GUC ID(s)\n", idm->total);
> +	xe_gt_info(idm_to_gt(idm), "using %u GUC ID%s\n",
> +		   idm->total, str_plural(idm->total));
>  	return 0;
>  }

Reviewed-by: Piotr Piórkowski <piotr.piorkowski at intel.com>

>  
> -- 
> 2.43.0
> 

-- 


More information about the Intel-xe mailing list