From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
Jeremy Klarenbeek <jeremy.klarenbeek99@gmail.com>
Subject: Re: [PATCH 0/5] drm/amd/pm: Fix laptop issues on SMU6-7
Date: Sun, 24 May 2026 13:32:19 +0200 [thread overview]
Message-ID: <3626507.sQuhbGJ8Bu@timur-hyperion> (raw)
In-Reply-To: <CAOGA6Hix7yPkF2o3hapz9zfpRZ5HHjaaJuDcyWjp+Aoihxf9-A@mail.gmail.com>
Hi Jeremy & Alex,
> Apologies for my late reply. I tested the patch series (SI laptop
> 1002:6606) and the problem remains where the clock speeds don't boost upon
> switching to AC. Timur and I investigated this and found 2 problems
Thanks for getting back to us on this topic.
At Alex's suggestion, I removed the clock recalculation and added the check to
verify ATOM_PP_PLATFORM_CAP_HARDWAREDC. I'm sad to hear that this broke your
patches. I apologize for that.
Unfortunately I don't have a SI laptop GPU to test this stuff, so there was no
way for me to verify the correctness of those changes before I sent the
patches to the mailing list.
> 1. It seems that it is necessary after all to recompute clock speeds when
> toggling AC/DC. Sending PPSMC_MSG_RunningOnAC on its own has no effect.
> Each ASIC family's apply_state_adjust_rules appears to be responsible for
> the switch by setting the max_limits, and this function is only called as
> part of computing clocks.
That's right. I took another look at:
si_apply_state_adjust_rules()
smu7_apply_state_adjust_rules()
Both of these rely on adev->pm.ac_power when determining max_limits, and they
set the maximum clocks accordingly. We should indeed re-calculate these clocks
on both SI and SMU7 when there is an AC/DC switch to make sure to apply the
updated max_limits. Additionally I think we should probably lock the mutexes
to ensure that we are sending only one message at a time.
My suggestion would be to call pm_compute_clocks() inside notify_ac_dc(), and
also to lock the mutexes:
https://gitlab.freedesktop.org/Venemo/linux/-/commit/
e98279dff480cc297cbb1fe50c2b71ebd65b9576
if that works, I'd like to submit that patch (and will also port it to SMU7).
> I'm considering removing the .notify_ac_dc field
> from the IP block entirely and just calling .pm_compute_clocks from
> amdgpu_pm_acpi_event_handler, but I only know for certain that this works
> for my GPU.
I don't agree with that. amdgpu_dpm is generic between all supported HW
generations and shouldn't contain HW generation specific code. Also, it clearly
doesn't work the same way on every GPU generation, so we shouldn't generalize.
Furthermore, we should minimize the amount of messages we send to the SMU, so
we shouldn't send the RunningOnAC message every time we recompute the clocks,
only when it actually switches to AC.
> 2. The ATOM_PP_PLATFORM_CAP_HARDWAREDC flag is enabled for my GPU, causing
> PPSMC_MSG_RunningOnAC to never be sent. Either the flag is enabled
> erroneously, or we're interpreting its intended usage incorrectly.
It's hard to judge that without having access to the hardware or docs.
Are you actually sure that the PPSMC_MSG_RunningOnAC is necessary on your
laptop? Isn't it enough to just re-compute the clocks?
Can you check what exactly is the value of adev->pm.dpm.platform_caps on your
laptop? Maybe we are looking at the wrong flag, or maybe the HARDWAREDC flag
only refers to the AC->DC transition and not the DC->AC transition.
This is just guesswork on my part, but maybe we should look at the
SBIOSPOWERSOURCE flag instead, which is explained in pptable_v1_0.h:
/* This cap indicates whether power source notificaiton is done by SBIOS
directly. */
Can you check if this flag is set on your laptop?
Thanks & best regards,
Timur
next prev parent reply other threads:[~2026-05-24 11:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 8:41 [PATCH 0/5] drm/amd/pm: Fix laptop issues on SMU6-7 Timur Kristóf
2026-05-19 8:41 ` [PATCH 1/5] drm/amd/pm/si: Disregard vblank time when no displays are connected Timur Kristóf
2026-05-19 15:09 ` Alex Deucher
2026-05-19 8:41 ` [PATCH 2/5] drm/amd/pm: Rename enable_bapm() to notify_ac_dc() Timur Kristóf
2026-05-19 8:41 ` [PATCH 3/5] drm/amd/pm/smu7: Notify SMU7 of DC->AC switch Timur Kristóf
2026-05-19 8:41 ` [PATCH 4/5] drm/amd/pm/si: Fix updating clock limits from power states Timur Kristóf
2026-05-19 8:41 ` [PATCH 5/5] drm/amd/pm/si: Notify the SMC when switching to AC Timur Kristóf
2026-05-21 0:52 ` [PATCH 0/5] drm/amd/pm: Fix laptop issues on SMU6-7 Jeremy Klarenbeek
2026-05-24 6:38 ` Jeremy Klarenbeek
2026-05-24 11:32 ` Timur Kristóf [this message]
2026-05-29 20:33 ` Deucher, Alexander
2026-05-30 10:07 ` Jeremy Klarenbeek
2026-05-30 10:32 ` Timur Kristóf
2026-05-30 12:51 ` Jeremy Klarenbeek
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=3626507.sQuhbGJ8Bu@timur-hyperion \
--to=timur.kristof@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=jeremy.klarenbeek99@gmail.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 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.