From: Lizhi Hou <lizhi.hou@amd.com>
To: <ogabbay@kernel.org>, <quic_jhugo@quicinc.com>,
<dri-devel@lists.freedesktop.org>, <mario.limonciello@amd.com>,
<maciej.falkowski@linux.intel.com>
Cc: Nishad Saraf <nishads@amd.com>, <linux-kernel@vger.kernel.org>,
<max.zhen@amd.com>, <sonal.santan@amd.com>,
Lizhi Hou <lizhi.hou@amd.com>
Subject: [PATCH V1 2/3] accel/amdxdna: Add configuring low and medium power mode
Date: Thu, 23 Apr 2026 21:08:23 -0700 [thread overview]
Message-ID: <20260424040824.2253607-2-lizhi.hou@amd.com> (raw)
In-Reply-To: <20260424040824.2253607-1-lizhi.hou@amd.com>
From: Nishad Saraf <nishads@amd.com>
Add support for POWER_MODE_LOW and POWER_MODE_MEDIUM.
Signed-off-by: Nishad Saraf <nishads@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
---
drivers/accel/amdxdna/aie2_pm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/accel/amdxdna/aie2_pm.c b/drivers/accel/amdxdna/aie2_pm.c
index d9ccd7fc8a6d..4fe6030d2c41 100644
--- a/drivers/accel/amdxdna/aie2_pm.c
+++ b/drivers/accel/amdxdna/aie2_pm.c
@@ -108,6 +108,14 @@ int aie2_pm_set_mode(struct amdxdna_dev_hdl *ndev, enum amdxdna_power_mode_type
clk_gating = AIE2_CLK_GATING_ENABLE;
dpm_level = ndev->dft_dpm_level;
break;
+ case POWER_MODE_LOW:
+ clk_gating = AIE2_CLK_GATING_ENABLE;
+ dpm_level = 0;
+ break;
+ case POWER_MODE_MEDIUM:
+ clk_gating = AIE2_CLK_GATING_ENABLE;
+ dpm_level = ndev->max_dpm_level / 2;
+ break;
default:
return -EOPNOTSUPP;
}
--
2.34.1
next prev parent reply other threads:[~2026-04-24 4:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 4:08 [PATCH V1 1/3] accel/amdxdna: Set default DPM level based on QoS for temporal-only mode Lizhi Hou
2026-04-24 4:08 ` Lizhi Hou [this message]
2026-04-24 13:29 ` [PATCH V1 2/3] accel/amdxdna: Add configuring low and medium power mode Mario Limonciello
2026-04-24 4:08 ` [PATCH V1 3/3] accel/amdxdna: Set the system efficiency factor to 2 Lizhi Hou
2026-04-24 13:30 ` Mario Limonciello
2026-04-24 13:28 ` [PATCH V1 1/3] accel/amdxdna: Set default DPM level based on QoS for temporal-only mode Mario Limonciello
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=20260424040824.2253607-2-lizhi.hou@amd.com \
--to=lizhi.hou@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.falkowski@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=max.zhen@amd.com \
--cc=nishads@amd.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
--cc=sonal.santan@amd.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