[PATCH 2/5] drm/xe/mocs: Be explicit when logging number of entries

Matt Roper matthew.d.roper at intel.com
Thu Feb 29 21:21:05 UTC 2024


On Tue, Feb 27, 2024 at 10:10:45PM -0800, Lucas De Marchi wrote:
> Make sure to log if number of entries are l3cc or mocs so it doesn't
> depend on the context. Also the warn-once in __init_mocs_table()
> is more a sanity check that should be done as the first thing in that
> function, so move it up.

You didn't actually move the warn in the patch below.

With either the move included, or the commit message updated,

        Reviewed-by: Matt Roper <matthew.d.roper at intel.com>


Matt

> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_mocs.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
> index 001e4301c639d..bdb755b963238 100644
> --- a/drivers/gpu/drm/xe/xe_mocs.c
> +++ b/drivers/gpu/drm/xe/xe_mocs.c
> @@ -470,7 +470,7 @@ static void __init_mocs_table(struct xe_gt *gt,
>  	unsigned int i;
>  	u32 mocs;
>  
> -	mocs_dbg(&gt_to_xe(gt)->drm, "entries:%d\n", info->n_entries);
> +	mocs_dbg(&gt_to_xe(gt)->drm, "mocs entries: %d\n", info->n_entries);
>  	drm_WARN_ONCE(&xe->drm, !info->unused_entries_index,
>  		      "Unused entries index should have been defined\n");
>  	for (i = 0; i < info->n_entries; i++) {
> @@ -510,7 +510,8 @@ static void init_l3cc_table(struct xe_gt *gt,
>  	unsigned int i;
>  	u32 l3cc;
>  
> -	mocs_dbg(&gt_to_xe(gt)->drm, "entries:%d\n", info->n_entries);
> +	mocs_dbg(&gt_to_xe(gt)->drm, "l3cc entries: %d\n", info->n_entries);
> +
>  	for (i = 0; i < (info->n_entries + 1) / 2; i++) {
>  		l3cc = l3cc_combine(get_entry_l3cc(info, 2 * i),
>  				    get_entry_l3cc(info, 2 * i + 1));
> -- 
> 2.43.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list