[PATCH v17 6/7] drm/xe/guc: Add dss conversion from group/instance ID

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Tue Aug 27 23:15:34 UTC 2024


Looks good to me - although, and I'll call this a nit:
just like the patch #5, this patch also appears as an orphan
with no caller/user. So perhaps we can either squash this into
patch-7 as part of a rev18, if we need a rev18... OR ...
when its time to merge, we can ask the committer to help
squash patch 5, 6 and 7 together:

Reviewed-by: Alan Previn <alan.previn.teres.alexis at intel.com>

On Tue, 2024-08-27 at 14:47 -0700, Zhanjun Dong wrote:
> Add dss conversion from group/instance ID.
> 
> Signed-off-by: Zhanjun Dong <zhanjun.dong at intel.com>
> Reviewed-by: Alan Previn <alan.previn.teres.alexis at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gt_mcr.c | 13 +++++++++++++
>  drivers/gpu/drm/xe/xe_gt_mcr.h |  1 +
>  2 files changed, 14 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c
> b/drivers/gpu/drm/xe/xe_gt_mcr.c
> index 7d7bd0be6233..5deef7ee7925 100644
> --- a/drivers/gpu/drm/xe/xe_gt_mcr.c
> +++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
> @@ -352,6 +352,19 @@ void xe_gt_mcr_get_dss_steering(struct xe_gt
> *gt, unsigned int dss, u16 *group,
>         *instance = dss % gt->steering_dss_per_grp;
>  }
>  
> +/**
> + * xe_gt_mcr_steering_info_to_dss_id - Get DSS ID from
> group/instance steering
> + * @gt: GT structure
> + * @group: steering group ID
> + * @instance: steering instance ID
> + *
> + * Return: the coverted DSS id.
> + */
> +u32 xe_gt_mcr_steering_info_to_dss_id(struct xe_gt *gt, u16 group,
> u16 instance)
> +{
> +       return group * dss_per_group(gt) + instance;
> +}
> +
>  static void init_steering_dss(struct xe_gt *gt)
>  {
>         gt->steering_dss_per_grp = dss_per_group(gt);
> diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.h
> b/drivers/gpu/drm/xe/xe_gt_mcr.h
> index 8d119a0d5493..c0cd36021c24 100644
> --- a/drivers/gpu/drm/xe/xe_gt_mcr.h
> +++ b/drivers/gpu/drm/xe/xe_gt_mcr.h
> @@ -28,6 +28,7 @@ void xe_gt_mcr_multicast_write(struct xe_gt *gt,
> struct xe_reg_mcr mcr_reg,
>  
>  void xe_gt_mcr_steering_dump(struct xe_gt *gt, struct drm_printer
> *p);
>  void xe_gt_mcr_get_dss_steering(struct xe_gt *gt, unsigned int dss,
> u16 *group, u16 *instance);
> +u32 xe_gt_mcr_steering_info_to_dss_id(struct xe_gt *gt, u16 group,
> u16 instance);
>  
>  /*
>   * Loop over each DSS and determine the group and instance IDs that



More information about the Intel-xe mailing list