Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

accel/amdxdna: Fix suspend failure after enabling turbo mode

Enabling turbo mode disables hardware clock gating. Suspend requires
hardware clock gating to be re-enabled, otherwise suspend will fail.
Fix this by calling aie2_runtime_cfg() from aie2_hw_stop() to
re-enable clock gating during suspend. Also ensure that firmware is
initialized in aie2_hw_start() before modifying clock-gating
settings during resume.

Fixes: f4d7b8a6bc8c ("accel/amdxdna: Enhance power management settings")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260211204716.722788-1-lizhi.hou@amd.com

Lizhi Hou fdb65acf 1aa82181

+7 -6
+7 -6
drivers/accel/amdxdna/aie2_pci.c
··· 323 323 return; 324 324 } 325 325 326 + aie2_runtime_cfg(ndev, AIE2_RT_CFG_CLK_GATING, NULL); 326 327 aie2_mgmt_fw_fini(ndev); 327 328 xdna_mailbox_stop_channel(ndev->mgmt_chann); 328 329 xdna_mailbox_destroy_channel(ndev->mgmt_chann); ··· 407 406 goto stop_psp; 408 407 } 409 408 410 - ret = aie2_pm_init(ndev); 411 - if (ret) { 412 - XDNA_ERR(xdna, "failed to init pm, ret %d", ret); 413 - goto destroy_mgmt_chann; 414 - } 415 - 416 409 ret = aie2_mgmt_fw_init(ndev); 417 410 if (ret) { 418 411 XDNA_ERR(xdna, "initial mgmt firmware failed, ret %d", ret); 412 + goto destroy_mgmt_chann; 413 + } 414 + 415 + ret = aie2_pm_init(ndev); 416 + if (ret) { 417 + XDNA_ERR(xdna, "failed to init pm, ret %d", ret); 419 418 goto destroy_mgmt_chann; 420 419 } 421 420