[PATCH v4 1/5] drm/xe/topology: Add a function to find the index of the last DSS in a mask
Harish Chegondi
harish.chegondi at intel.com
Wed Oct 16 03:44:30 UTC 2024
On Mon, Oct 14, 2024 at 02:26:49PM -0700, Dixit, Ashutosh wrote:
> On Sun, 13 Oct 2024 23:00:32 -0700, Harish Chegondi wrote:
> >
> > Signed-off-by: Harish Chegondi <harish.chegondi at intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_gt_topology.c | 9 +++++++++
> > drivers/gpu/drm/xe/xe_gt_topology.h | 3 +++
> > 2 files changed, 12 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c
> > index df2042db7ee6..1e7476f71906 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_topology.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_topology.c
> > @@ -278,6 +278,15 @@ xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum)
> > return find_next_bit(mask, XE_MAX_DSS_FUSE_BITS, groupnum * groupsize);
> > }
> >
> > +/*
> > + * Used to obtain the index of the last DSS.
> > + */
> > +unsigned int
> > +xe_dss_mask_last_dss(const xe_dss_mask_t mask)
> > +{
> > + return find_last_bit(mask, XE_MAX_DSS_FUSE_BITS);
>
> Does this need to be exposed from xe_gt_topology.c/.h, can't this just be
> local to eu stall?
The reason I exposed this is - there is another function
xe_dss_mask_group_ffs() to find the index of the first DSS in xe_gt_topology.c/.h
This new function is to find the last DSS which is some what related to
xe_dss_mask_group_ffs() and can be useful if exposed.
So, I exposed it instead of keeping it local to EU stall code.
Thanks
Harish.
>
> > +}
> > +
> > bool xe_dss_mask_empty(const xe_dss_mask_t mask)
> > {
> > return bitmap_empty(mask, XE_MAX_DSS_FUSE_BITS);
> > diff --git a/drivers/gpu/drm/xe/xe_gt_topology.h b/drivers/gpu/drm/xe/xe_gt_topology.h
> > index 746b325bbf6e..7ee022784397 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_topology.h
> > +++ b/drivers/gpu/drm/xe/xe_gt_topology.h
> > @@ -28,6 +28,9 @@ void xe_gt_topology_dump(struct xe_gt *gt, struct drm_printer *p);
> > unsigned int
> > xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum);
> >
> > +unsigned int
> > +xe_dss_mask_last_dss(const xe_dss_mask_t mask);
> > +
> > bool xe_dss_mask_empty(const xe_dss_mask_t mask);
> >
> > bool
> > --
> > 2.45.1
> >
More information about the Intel-xe
mailing list