From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, Alexander.Deucher@amd.com,
Natalie Vock <natalie.vock@gmx.de>,
Mario Limonciello <mario.limonciello@amd.com>,
Tvrtko Ursulin <tursulin@ursulin.net>
Subject: Re: [PATCH 1/3] drm/amd/pm/si: Don't schedule thermal work when queue isn't initialized
Date: Mon, 13 Jul 2026 13:16:59 +0200 [thread overview]
Message-ID: <tM3iYIRPQHWYpTCh4LOKcw@gmail.com> (raw)
In-Reply-To: <e00d5e54-0713-47e9-9f88-a177a1ffa474@ursulin.net>
On Monday, July 13, 2026 12:25:38 PM Central European Summer Time Tvrtko
Ursulin wrote:
> On 12/07/2026 18:39, Timur Kristóf wrote:
> > When DPM is turned off with the amdgpu.dpm=0 module parameter,
> > the thermal work queue isn't initialized so we shouldn't
> > schedule any work on it.
> >
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> >
> > drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
> > b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c index
> > 832953941266..6a54566d1a68 100644
> > --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
> > +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
> > @@ -7692,7 +7692,7 @@ static int si_dpm_process_interrupt(struct
> > amdgpu_device *adev,>
> > break;
> >
> > }
> >
> > - if (queue_thermal)
> > + if (queue_thermal && amdgpu_dpm)
> >
> > schedule_work(&adev->pm.dpm.thermal.work);
> >
> > return 0;
>
> I don't know this code but what is suspicious to me is that there appear
> to be other unguarded entry points to the un-initialized work. Like all
> the flush_work() calls and one cancel_work_sync() as well.
>
> Presumably as long as si_dpm_sw_init() is returning success when
> amdgpu_dpm == 0 those two can get called?
>
> Finding the right Fixes: target might be a good thing too.
>
> Regards,
>
> Tvrtko
Hi Tvrtko,
That's a nice find. Indeed si_dpm_sw_init doesn't initialize the thermal.work
when amdgpu_dpm is zero. And in fact the same issue seems to be present also
in kv_dpm. I can address both of these in a follow-up series if you like.
Thanks & best regards,
Timur
next prev parent reply other threads:[~2026-07-13 11:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 17:39 [PATCH 1/3] drm/amd/pm/si: Don't schedule thermal work when queue isn't initialized Timur Kristóf
2026-07-12 17:39 ` [PATCH 2/3] drm/amd/pm/si: Fix AC/DC switch notification Timur Kristóf
2026-07-12 17:39 ` [PATCH 3/3] drm/amd/pm/smu7: " Timur Kristóf
2026-07-13 10:25 ` [PATCH 1/3] drm/amd/pm/si: Don't schedule thermal work when queue isn't initialized Tvrtko Ursulin
2026-07-13 11:16 ` Timur Kristóf [this message]
2026-07-13 14:39 ` Tvrtko Ursulin
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=tM3iYIRPQHWYpTCh4LOKcw@gmail.com \
--to=timur.kristof@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mario.limonciello@amd.com \
--cc=natalie.vock@gmx.de \
--cc=tursulin@ursulin.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.