[PATCH v4 1/5] drm/xe/topology: Add a function to find the index of the last DSS in a mask
Dixit, Ashutosh
ashutosh.dixit at intel.com
Mon Oct 14 21:26:49 UTC 2024
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?
> +}
> +
> 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