All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lizhi Hou <lizhi.hou@amd.com>
To: Mario Limonciello <superm1@kernel.org>, <ogabbay@kernel.org>,
	<quic_jhugo@quicinc.com>, <maciej.falkowski@linux.intel.com>,
	<dri-devel@lists.freedesktop.org>
Cc: <linux-kernel@vger.kernel.org>, <max.zhen@amd.com>,
	<sonal.santan@amd.com>
Subject: Re: [PATCH] accel/amdxdna: Treat power-off failure as unrecoverable error
Date: Fri, 7 Nov 2025 08:57:17 -0800	[thread overview]
Message-ID: <2888a0ce-6d30-1911-0870-0ea37e392cbc@amd.com> (raw)
In-Reply-To: <2dcb4668-2c4d-4c73-9805-1af1338c9e7d@kernel.org>

Applied to drm-misc-next.

On 11/6/25 10:31, Mario Limonciello wrote:
> On 11/6/25 12:19 PM, Lizhi Hou wrote:
>>
>> On 11/6/25 10:12, Mario Limonciello wrote:
>>> On 11/6/25 12:05 PM, Lizhi Hou wrote:
>>>> Failing to set power off indicates an unrecoverable hardware or 
>>>> firmware
>>>> error. Update the driver to treat such a failure as a fatal condition
>>>> and stop further operations that depend on successful power state
>>>> transition.
>>>>
>>>> This prevents undefined behavior when the hardware remains in an
>>>> unexpected state after a failed power-off attempt.
>>>>
>>>> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
>>>
>>> Presumably all versions of hardware in the wild can handle receiving 
>>> a power off command if they're already powered off?
>>
>> Yes for the aie2 platforms. This was verified by xdna-driver pipeline 
>> tests.
>>
>>
>
> OK LGTM then.
>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>
>> Lizhi
>>
>>>
>>>> ---
>>>>   drivers/accel/amdxdna/aie2_smu.c | 10 ++++++++++
>>>>   1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/drivers/accel/amdxdna/aie2_smu.c b/drivers/accel/ 
>>>> amdxdna/aie2_smu.c
>>>> index 11c0e9e7b03a..bd94ee96c2bc 100644
>>>> --- a/drivers/accel/amdxdna/aie2_smu.c
>>>> +++ b/drivers/accel/amdxdna/aie2_smu.c
>>>> @@ -147,6 +147,16 @@ int aie2_smu_init(struct amdxdna_dev_hdl *ndev)
>>>>   {
>>>>       int ret;
>>>>   +    /*
>>>> +     * Failing to set power off indicates an unrecoverable 
>>>> hardware or
>>>> +     * firmware error.
>>>> +     */
>>>> +    ret = aie2_smu_exec(ndev, AIE2_SMU_POWER_OFF, 0, NULL);
>>>> +    if (ret) {
>>>> +        XDNA_ERR(ndev->xdna, "Access power failed, ret %d", ret);
>>>> +        return ret;
>>>> +    }
>>>> +
>>>>       ret = aie2_smu_exec(ndev, AIE2_SMU_POWER_ON, 0, NULL);
>>>>       if (ret) {
>>>>           XDNA_ERR(ndev->xdna, "Power on failed, ret %d", ret);
>>>
>

  reply	other threads:[~2025-11-07 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 18:05 [PATCH] accel/amdxdna: Treat power-off failure as unrecoverable error Lizhi Hou
2025-11-06 18:12 ` Mario Limonciello
2025-11-06 18:19   ` Lizhi Hou
2025-11-06 18:31     ` Mario Limonciello
2025-11-07 16:57       ` Lizhi Hou [this message]
2025-11-13 16:53 ` Falkowski, Maciej

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=2888a0ce-6d30-1911-0870-0ea37e392cbc@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=max.zhen@amd.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=sonal.santan@amd.com \
    --cc=superm1@kernel.org \
    /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.