From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH v2 1/2] drm/xe/guc: Allow to initialize submission with limited set of IDs
Date: Tue, 21 May 2024 15:01:26 +0530 [thread overview]
Message-ID: <2a4e88cc-75ee-4edf-9503-7f45b66b8c03@intel.com> (raw)
In-Reply-To: <20240521092518.624-2-michal.wajdeczko@intel.com>
On 21-05-2024 14:55, 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@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> ---
> v2: add kernel-doc for xe_guc_submit_init (Himal)
> ---
> drivers/gpu/drm/xe/xe_guc.c | 2 +-
> drivers/gpu/drm/xe/xe_guc_submit.c | 17 +++++++++++++++--
> drivers/gpu/drm/xe/xe_guc_submit.h | 2 +-
> 3 files changed, 17 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..13ec171ada1b 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -278,7 +278,20 @@ static void primelockdep(struct xe_guc *guc)
> fs_reclaim_release(GFP_KERNEL);
> }
>
> -int xe_guc_submit_init(struct xe_guc *guc)
> +/**
> + * xe_guc_submit_init() - Initialize GuC submission.
> + * @guc: the &xe_guc to initialize
> + * @num_ids: number of GuC context IDs to use
> + *
> + * The bare-metal or PF driver can pass ~0 as &num_ids to indicate that all
> + * GuC context IDs supported by the GuC firmware should be used for submission.
> + *
> + * Only VF drivers will have to provide explicit number of GuC context IDs
> + * that they can use for submission.
> + *
> + * Return: 0 on success or a negative error code on failure.
> + */
> +int xe_guc_submit_init(struct xe_guc *guc, unsigned int num_ids)
> {
> struct xe_device *xe = guc_to_xe(guc);
> struct xe_gt *gt = guc_to_gt(guc);
> @@ -288,7 +301,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);
LGTM
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>
> int xe_guc_submit_reset_prepare(struct xe_guc *guc);
> void xe_guc_submit_reset_wait(struct xe_guc *guc);
next prev parent reply other threads:[~2024-05-21 9:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 9:25 [PATCH v2 0/2] Custom GuC initialization if VF Michal Wajdeczko
2024-05-21 9:25 ` [PATCH v2 1/2] drm/xe/guc: Allow to initialize submission with limited set of IDs Michal Wajdeczko
2024-05-21 9:31 ` Ghimiray, Himal Prasad [this message]
2024-05-21 9:25 ` [PATCH v2 2/2] drm/xe/vf: Custom GuC initialization if VF Michal Wajdeczko
2024-05-21 12:44 ` Piotr Piórkowski
2024-05-21 9:58 ` ✓ CI.Patch_applied: success for Custom GuC initialization if VF (rev2) Patchwork
2024-05-21 9:58 ` ✓ CI.checkpatch: " Patchwork
2024-05-21 9:59 ` ✓ CI.KUnit: " Patchwork
2024-05-21 10:10 ` ✓ CI.Build: " Patchwork
2024-05-21 10:13 ` ✓ CI.Hooks: " Patchwork
2024-05-21 10:14 ` ✓ CI.checksparse: " Patchwork
2024-05-21 10:40 ` ✓ CI.BAT: " Patchwork
2024-05-21 12:35 ` ✗ CI.FULL: failure " Patchwork
2024-05-22 8:36 ` Michal Wajdeczko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a4e88cc-75ee-4edf-9503-7f45b66b8c03@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox