From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/guc: Initialize GuC ID manager sooner
Date: Sat, 6 Apr 2024 18:24:23 +0000 [thread overview]
Message-ID: <ZhGTV7dpZ7mhxcBW@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240406143946.979-2-michal.wajdeczko@intel.com>
On Sat, Apr 06, 2024 at 04:39:46PM +0200, Michal Wajdeczko wrote:
> The GuC submission cleanup code may depend on the GuC ID manager,
> thus we can't initialize it after registering a submission cleanup
> action, as reverse cleanup sequence will destroy GuC ID manager
> prior to a call to guc_submit_fini().
>
> Move GuC ID manager initialization up, right after managed mutex
> initialization, to have it available during guc_submit_fini().
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_submit.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 4c444fddfba6..61e7a8fbd18c 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -266,6 +266,10 @@ int xe_guc_submit_init(struct xe_guc *guc)
> if (err)
> return err;
>
> + err = xe_guc_id_mgr_init(&guc->submission_state.idm, ~0);
> + if (err)
> + return err;
> +
> err = alloc_submit_wq(guc);
> if (err)
> return err;
> @@ -279,15 +283,7 @@ int xe_guc_submit_init(struct xe_guc *guc)
>
> primelockdep(guc);
>
> - err = drmm_add_action_or_reset(&xe->drm, guc_submit_fini, guc);
> - if (err)
> - return err;
> -
> - err = xe_guc_id_mgr_init(&guc->submission_state.idm, ~0);
> - if (err)
> - return err;
> -
> - return 0;
> + return drmm_add_action_or_reset(&xe->drm, guc_submit_fini, guc);
> }
>
> static void __release_guc_id(struct xe_guc *guc, struct xe_exec_queue *q, u32 xa_count)
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-04-06 18:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 14:39 [PATCH 1/2] drm/xe/guc: Use drm_device-managed version of mutex_init() Michal Wajdeczko
2024-04-06 14:39 ` [PATCH 2/2] drm/xe/guc: Initialize GuC ID manager sooner Michal Wajdeczko
2024-04-06 18:24 ` Matthew Brost [this message]
2024-04-06 14:46 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe/guc: Use drm_device-managed version of mutex_init() Patchwork
2024-04-06 14:46 ` ✓ CI.checkpatch: " Patchwork
2024-04-06 14:47 ` ✓ CI.KUnit: " Patchwork
2024-04-06 14:58 ` ✓ CI.Build: " Patchwork
2024-04-06 15:01 ` ✓ CI.Hooks: " Patchwork
2024-04-06 15:02 ` ✓ CI.checksparse: " Patchwork
2024-04-06 15:29 ` ✗ CI.BAT: failure " Patchwork
2024-04-08 9:19 ` Michal Wajdeczko
2024-04-06 18:23 ` [PATCH 1/2] " Matthew Brost
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=ZhGTV7dpZ7mhxcBW@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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