From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Subject: Re: [PATCH] drm/xe: Fix circular locking dependency
Date: Fri, 12 Sep 2025 09:43:27 -0400 [thread overview]
Message-ID: <aMQjf9eIplownxs_@intel.com> (raw)
In-Reply-To: <pcok7wpcby7muwekdt3eqczmarct4g2wrg2qmtupmvphmolhjp@ggqxwiz7pjib>
On Fri, Sep 12, 2025 at 12:33:46AM -0500, Lucas De Marchi wrote:
> On Thu, Sep 11, 2025 at 05:20:25PM -0400, Rodrigo Vivi wrote:
> > Fix this:
> >
> > ======================================================
> > WARNING: possible circular locking dependency detected
> > 6.17.0-rc4-lgci-xe-xe-pw-153723v2+ #1 Tainted: G S U
> > ------------------------------------------------------
> > xe_pm/11324 is trying to acquire lock:
> > ffff8881085f22a0 (&pc->freq_lock){+.+.}-{3:3}, at:
> > xe_guc_pc_start+0x39f/0xf70 [xe]
> >
> > but task is already holding lock:
> >
> > ffffffffa1020420 (xe_rpm_nod3cold_map){+.+.}-{0:0}, at:
> > xe_rpm_lockmap_acquire+0x1a/0x70 [xe]
> >
> > which lock already depends on the new lock.
> >
> > Possible unsafe locking scenario:
> > CPU0 CPU1
> > ---- ----
> > lock(xe_rpm_nod3cold_map);
> > lock(&pc->freq_lock);
> > lock(xe_rpm_nod3cold_map);
> > lock(&pc->freq_lock);
> >
> > Reported-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Closes: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-153723v2/shard-bmg-8/igt@xe_pm@s2idle-d3hot-basic-exec.html#dmesg-warnings335
>
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6122
Much better, thank you!
I removed the other one while merging it.
>
> ?
>
> thanks
> Lucas De Marchi
>
> > Fixes: 60d2b7899142 ("drm/xe/guc: Add SLPC power profile interface")
> > Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_gt_freq.c | 2 ++
> > drivers/gpu/drm/xe/xe_guc_pc.c | 2 +-
> > 2 files changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_gt_freq.c b/drivers/gpu/drm/xe/xe_gt_freq.c
> > index 781e4890fb26..4ff1b6b58d6b 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_freq.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_freq.c
> > @@ -246,7 +246,9 @@ static ssize_t power_profile_store(struct kobject *kobj,
> > struct xe_guc_pc *pc = dev_to_pc(dev);
> > int err;
> >
> > + xe_pm_runtime_get(dev_to_xe(dev));
> > err = xe_guc_pc_set_power_profile(pc, buff);
> > + xe_pm_runtime_put(dev_to_xe(dev));
> >
> > return err ?: count;
> > }
> > diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> > index 68a5bf8e3946..53fdf59524c4 100644
> > --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> > +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> > @@ -1215,7 +1215,7 @@ int xe_guc_pc_set_power_profile(struct xe_guc_pc *pc, const char *buf)
> > return -EINVAL;
> >
> > guard(mutex)(&pc->freq_lock);
> > - xe_pm_runtime_get(pc_to_xe(pc));
> > + xe_pm_runtime_get_noresume(pc_to_xe(pc));
> >
> > ret = pc_action_set_param(pc,
> > SLPC_PARAM_POWER_PROFILE,
> > --
> > 2.51.0
> >
prev parent reply other threads:[~2025-09-12 13:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 21:20 [PATCH] drm/xe: Fix circular locking dependency Rodrigo Vivi
2025-09-11 21:26 ` Belgaumkar, Vinay
2025-09-11 21:51 ` ✓ CI.KUnit: success for " Patchwork
2025-09-11 22:24 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-12 4:53 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-12 5:33 ` [PATCH] " Lucas De Marchi
2025-09-12 13:43 ` Rodrigo Vivi [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=aMQjf9eIplownxs_@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=vinay.belgaumkar@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