[PATCH 1/2] drm/xe/guc: Allow to initialize submission with limited set of IDs
Ghimiray, Himal Prasad
himal.prasad.ghimiray at intel.com
Tue May 21 04:03:48 UTC 2024
On 21-05-2024 02:53, Michal Wajdeczko wrote:
> While PF and native drivers may initialize submission code to use
> all available GuC contexts IDs, the VF driver may only use limited
> number of IDs. Update init function to accept number of context
> IDs available for use.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 2 +-
> drivers/gpu/drm/xe/xe_guc_submit.c | 4 ++--
> drivers/gpu/drm/xe/xe_guc_submit.h | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index e52b544ac690..807ad53449e4 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -358,7 +358,7 @@ int xe_guc_init_post_hwconfig(struct xe_guc *guc)
>
> guc_init_params_post_hwconfig(guc);
>
> - ret = xe_guc_submit_init(guc);
> + ret = xe_guc_submit_init(guc, ~0);
> if (ret)
> return ret;
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 4efb88e3e056..9a7885a9b4c1 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -278,7 +278,7 @@ static void primelockdep(struct xe_guc *guc)
> fs_reclaim_release(GFP_KERNEL);
> }
>
> -int xe_guc_submit_init(struct xe_guc *guc)
> +int xe_guc_submit_init(struct xe_guc *guc, unsigned int num_ids)
Please add a kernel doc.
> {
> struct xe_device *xe = guc_to_xe(guc);
> struct xe_gt *gt = guc_to_gt(guc);
> @@ -288,7 +288,7 @@ int xe_guc_submit_init(struct xe_guc *guc)
> if (err)
> return err;
>
> - err = xe_guc_id_mgr_init(&guc->submission_state.idm, ~0);
> + err = xe_guc_id_mgr_init(&guc->submission_state.idm, num_ids);
> if (err)
> return err;
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.h b/drivers/gpu/drm/xe/xe_guc_submit.h
> index 4275b7da9df5..4ad5f4c1b084 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.h
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.h
> @@ -12,7 +12,7 @@ struct drm_printer;
> struct xe_exec_queue;
> struct xe_guc;
>
> -int xe_guc_submit_init(struct xe_guc *guc);
> +int xe_guc_submit_init(struct xe_guc *guc, unsigned int num_ids);
>
> int xe_guc_submit_reset_prepare(struct xe_guc *guc);
> void xe_guc_submit_reset_wait(struct xe_guc *guc);
More information about the Intel-xe
mailing list