[PATCH] drm/xe/xe_gt_idle: Fix name conflict

Matthew Brost matthew.brost at intel.com
Tue Sep 10 14:54:14 UTC 2024


On Tue, Sep 10, 2024 at 10:52:35AM -0400, Rodrigo Vivi wrote:
> On Tue, Sep 10, 2024 at 07:58:37PM +0530, Riana Tauro wrote:
> > Remove local copy of str_up_down to fix name conflict.
> 
> what conflict?
> 
> I don't see any conflict caused by this. But well, nothing
> against this change itself.
> 

I don't see one either:
https://elixir.bootlin.com/linux/v6.11-rc7/A/ident/str_up_down

> perhaps s/to fix/to avoid/g in the commit message?!
> 

What about s/str_up_down/__str_up_down rather than remove the helper.

> Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> 
> > 
> > Fixes: 0914c1e45d3a ("drm/xe/xe_gt_idle: add debugfs entry for powergating info")
> > Signed-off-by: Riana Tauro <riana.tauro at intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_gt_debugfs.c | 2 +-
> >  drivers/gpu/drm/xe/xe_gt_idle.c    | 9 ++-------
> >  2 files changed, 3 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > index cbc43973ff7e..8f850b9e1947 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > @@ -14,8 +14,8 @@
> >  #include "xe_force_wake.h"
> >  #include "xe_ggtt.h"
> >  #include "xe_gt.h"
> > -#include "xe_gt_mcr.h"
> >  #include "xe_gt_idle.h"
> > +#include "xe_gt_mcr.h"
> >  #include "xe_gt_sriov_pf_debugfs.h"
> >  #include "xe_gt_sriov_vf_debugfs.h"
> >  #include "xe_gt_stats.h"
> > diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c
> > index 85a35ed153a3..a8ce8b484561 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_idle.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_idle.c
> > @@ -53,11 +53,6 @@ pc_to_xe(struct xe_guc_pc *pc)
> >  	return gt_to_xe(gt);
> >  }
> >  
> > -static inline const char *str_up_down(bool v)

Also if this is kept, drop the inline as we don't use inline in *.c in Xe.

Matt

> > -{
> > -	return v ? "up" : "down";
> > -}
> > -
> >  static const char *gt_idle_state_to_string(enum xe_gt_idle_state state)
> >  {
> >  	switch (state) {
> > @@ -227,7 +222,7 @@ int xe_gt_idle_pg_print(struct xe_gt *gt, struct drm_printer *p)
> >  			   str_yes_no(pg_enabled & RENDER_POWERGATE_ENABLE));
> >  
> >  		drm_printf(p, "Render Power Gate Status: %s\n",
> > -			   str_up_down(pg_status & RENDER_AWAKE_STATUS));
> > +			  (pg_status & RENDER_AWAKE_STATUS) ? "up" : "down");
> >  	}
> >  
> >  	vcs_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_VIDEO_DECODE);
> > @@ -241,7 +236,7 @@ int xe_gt_idle_pg_print(struct xe_gt *gt, struct drm_printer *p)
> >  		for (n = 0; n < ARRAY_SIZE(media_slices); n++)
> >  			if (gt->info.engine_mask & media_slices[n].engines)
> >  				drm_printf(p, "Media Slice%d Power Gate Status: %s\n", n,
> > -					   str_up_down(pg_status & media_slices[n].status_bit));
> > +					  (pg_status & media_slices[n].status_bit) ? "up" : "down");
> >  	}
> >  	return 0;
> >  }
> > -- 
> > 2.40.0
> > 


More information about the Intel-xe mailing list