mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Falkowski, Maciej" <maciej.falkowski@linux.intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>,
	ogabbay@kernel.org, quic_jhugo@quicinc.com,
	dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, max.zhen@amd.com,
	sonal.santan@amd.com, mario.limonciello@amd.com
Subject: Re: [PATCH V2] accel/amdxdna: Fix suspend failure after enabling turbo mode
Date: Wed, 25 Feb 2026 19:16:01 +0100	[thread overview]
Message-ID: <78744b04-cb28-42ce-a0c0-d9718ad1efa3@linux.intel.com> (raw)
In-Reply-To: <20260211204716.722788-1-lizhi.hou@amd.com>

Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>

On 2/11/2026 9:47 PM, Lizhi Hou wrote:
> 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")
> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
> ---
>   drivers/accel/amdxdna/aie2_pci.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
> index 5b326e4610e6..0d41a6764892 100644
> --- a/drivers/accel/amdxdna/aie2_pci.c
> +++ b/drivers/accel/amdxdna/aie2_pci.c
> @@ -323,6 +323,7 @@ static void aie2_hw_stop(struct amdxdna_dev *xdna)
>   		return;
>   	}
>   
> +	aie2_runtime_cfg(ndev, AIE2_RT_CFG_CLK_GATING, NULL);
>   	aie2_mgmt_fw_fini(ndev);
>   	xdna_mailbox_stop_channel(ndev->mgmt_chann);
>   	xdna_mailbox_destroy_channel(ndev->mgmt_chann);
> @@ -406,15 +407,15 @@ static int aie2_hw_start(struct amdxdna_dev *xdna)
>   		goto stop_psp;
>   	}
>   
> -	ret = aie2_pm_init(ndev);
> +	ret = aie2_mgmt_fw_init(ndev);
>   	if (ret) {
> -		XDNA_ERR(xdna, "failed to init pm, ret %d", ret);
> +		XDNA_ERR(xdna, "initial mgmt firmware failed, ret %d", ret);
>   		goto destroy_mgmt_chann;
>   	}
>   
> -	ret = aie2_mgmt_fw_init(ndev);
> +	ret = aie2_pm_init(ndev);
>   	if (ret) {
> -		XDNA_ERR(xdna, "initial mgmt firmware failed, ret %d", ret);
> +		XDNA_ERR(xdna, "failed to init pm, ret %d", ret);
>   		goto destroy_mgmt_chann;
>   	}
>   

      parent reply	other threads:[~2026-02-25 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 20:47 Lizhi Hou
2026-02-11 21:54 ` Mario Limonciello
2026-02-25 18:16 ` Falkowski, Maciej [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=78744b04-cb28-42ce-a0c0-d9718ad1efa3@linux.intel.com \
    --to=maciej.falkowski@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=max.zhen@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

all inboxes | Powered by JetHome®