From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/xe/guc: Use drm_device-managed version of mutex_init()
Date: Sat, 6 Apr 2024 18:23:31 +0000 [thread overview]
Message-ID: <ZhGTI3/n2GzyV8Iw@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240406143946.979-1-michal.wajdeczko@intel.com>
On Sat, Apr 06, 2024 at 04:39:45PM +0200, Michal Wajdeczko wrote:
> This is safer approach and will help resolve a cleanup ordering
> conflict related to the GuC ID manager.
>
> 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 | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 9c30bd9ac8c0..4c444fddfba6 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -238,7 +238,6 @@ static void guc_submit_fini(struct drm_device *drm, void *arg)
>
> xa_destroy(&guc->submission_state.exec_queue_lookup);
> free_submit_wq(guc);
> - mutex_destroy(&guc->submission_state.lock);
> }
>
> static const struct xe_exec_queue_ops guc_exec_queue_ops;
> @@ -263,13 +262,16 @@ int xe_guc_submit_init(struct xe_guc *guc)
> struct xe_gt *gt = guc_to_gt(guc);
> int err;
>
> + err = drmm_mutex_init(&xe->drm, &guc->submission_state.lock);
> + if (err)
> + return err;
> +
> err = alloc_submit_wq(guc);
> if (err)
> return err;
>
> gt->exec_queue_ops = &guc_exec_queue_ops;
>
> - mutex_init(&guc->submission_state.lock);
> xa_init(&guc->submission_state.exec_queue_lookup);
>
> spin_lock_init(&guc->submission_state.suspend.lock);
> --
> 2.43.0
>
prev parent reply other threads:[~2024-04-06 18:24 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
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 ` Matthew Brost [this message]
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=ZhGTI3/n2GzyV8Iw@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