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

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Sep 10 16:39:29 UTC 2024


On Tue, Sep 10, 2024 at 09:55:23PM +0530, Riana Tauro wrote:
> Hi Rodrigo/ Matthew
> 
> There was an error when this change was merged to linux-next
> https://lore.kernel.org/r/20240909195939.067c1c13@canb.auug.org.au
> 
> The conflict was because the below commit
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/hardening&id=3ff37dbb1ae9926d3b51749f7d0d3f474fe2440b
> 
> Jani suggested to rename or remove it in
> https://patchwork.freedesktop.org/patch/612760/?series=136477&rev=5.
> 
> Removed it for now, will add it once the commit is in the tree

So, the easiest way is to just rename as Brost suggested.
Then when we are rebased on top of this we just include the
string choices and rename back.

But please mention this in the commit message.

> 
> Thanks
> Riana Tauro
> 
> 
> 
> On 9/10/2024 8:24 PM, Matthew Brost wrote:
> > 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