[PATCH v16 6/7] drm/xe/guc: Add dss conversion from group/instance ID
Teres Alexis, Alan Previn
alan.previn.teres.alexis at intel.com
Thu Aug 22 02:20:21 UTC 2024
couple of nits below but LGTM
Reviewed-by: Alan Previn <alan.previn.teres.alexis at intel.com>
On Mon, 2024-08-19 at 19:11 -0700, Zhanjun Dong wrote:
> Add dss conversion from group/instance ID.
>
> Signed-off-by: Zhanjun Dong <zhanjun.dong at intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_mcr.c | 11 +++++++++++
> drivers/gpu/drm/xe/xe_gt_mcr.h | 1 +
> 2 files changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
> index 7d7bd0be6233..eff9468ca371 100644
> --- a/drivers/gpu/drm/xe/xe_gt_mcr.c
> +++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
> @@ -352,6 +352,17 @@ 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_id_to_dss - Get DSS ID from group/instance steering
> + * @gt: GT structure
> + * @group: steering group ID
> + * @instance: steering instance ID
> + */
>
alan: nit: maybe rename to "xe_gt_mcr_steering_info_to_dss_id"
also, nit: function doc above should include what the return value is...
but i label this a nit since the description already states this.
> +u32 xe_gt_mcr_steering_id_to_dss(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..3c84b20b10c9 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_id_to_dss(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