<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/accel/amdxdna, branch v7.0-rc7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0-rc7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-10T18:46:40+00:00</updated>
<entry>
<title>accel/amdxdna: Fix runtime suspend deadlock when there is pending job</title>
<updated>2026-03-10T18:46:40+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-03-10T18:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6b13cb8f48a42ddf6dd98865b673a82e37ff238b'/>
<id>urn:sha1:6b13cb8f48a42ddf6dd98865b673a82e37ff238b</id>
<content type='text'>
The runtime suspend callback drains the running job workqueue before
suspending the device. If a job is still executing and calls
pm_runtime_resume_and_get(), it can deadlock with the runtime suspend
path.

Fix this by moving pm_runtime_resume_and_get() from the job execution
routine to the job submission routine, ensuring the device is resumed
before the job is queued and avoiding the deadlock during runtime
suspend.

Fixes: 063db451832b ("accel/amdxdna: Enhance runtime power management")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260310180058.336348-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Split mailbox channel create function</title>
<updated>2026-03-05T17:24:33+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-03-05T06:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5b8b0347fa8470b751a506fb801797e271d7548'/>
<id>urn:sha1:d5b8b0347fa8470b751a506fb801797e271d7548</id>
<content type='text'>
The management channel used for firmware control command submission is
currently created after the firmware is started. If channel creation
fails (for example, due to memory allocation failure or workqueue
creation interruption), the firmware remains in a pending state and is
unable to receive any control commands.

To avoid leaving the firmware in this inconsistent state, split
xdna_mailbox_create_channel() into two separate functions so that
resource allocation can be completed before interacting with the
hardware.
  xdna_mailbox_alloc_channel()
    Allocates memory and initializes the workqueue. This can be called
    earlier, before interacting with the hardware.
  xdna_mailbox_start_channel()
    Performs the hardware interaction required to start the channel.

Rename xdna_mailbox_destroy_channel() to xdna_mailbox_free_channel().
Ensure that xdna_mailbox_stop_channel() and xdna_mailbox_free_channel()
properly unwind the corresponding start and allocation steps, respectively.

Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260305062041.3954024-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix major version check on NPU1 platform</title>
<updated>2026-03-04T20:05:02+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-03-04T19:50:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f82859c84a9862e242c904e72fb0625fef9b24e7'/>
<id>urn:sha1:f82859c84a9862e242c904e72fb0625fef9b24e7</id>
<content type='text'>
Add the missing major number in npu1_fw_feature_table.

Without the major version specified, the firmware feature check fails,
preventing new firmware commands from being enabled on the NPU1
platform.

With the correct major version populated, the driver properly detects
firmware support and enables the new command.

Fixes: f1eac46fe5f7 ("accel/amdxdna: Update firmware version check for latest firmware")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260304195012.3616908-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix NULL pointer dereference of mgmt_chann</title>
<updated>2026-03-02T17:43:22+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-26T21:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6270ee26e1edd862ea17e3eba148ca8fb2c99dc9'/>
<id>urn:sha1:6270ee26e1edd862ea17e3eba148ca8fb2c99dc9</id>
<content type='text'>
mgmt_chann may be set to NULL if the firmware returns an unexpected
error in aie2_send_mgmt_msg_wait(). This can later lead to a NULL
pointer dereference in aie2_hw_stop().

Fix this by introducing a dedicated helper to destroy mgmt_chann
and by adding proper NULL checks before accessing it.

Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260226213857.3068474-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fill invalid payload for failed command</title>
<updated>2026-02-28T07:01:36+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-27T00:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89ff45359abbf9d8d3c4aa3f5a57ed0be82b5a12'/>
<id>urn:sha1:89ff45359abbf9d8d3c4aa3f5a57ed0be82b5a12</id>
<content type='text'>
Newer userspace applications may read the payload of a failed command
to obtain detailed error information. However, the driver and old firmware
versions may not support returning advanced error information.
In this case, initialize the command payload with an invalid value so
userspace can detect that no detailed error information is available.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260227004841.3080241-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Use a different name for latest firmware</title>
<updated>2026-02-25T21:51:31+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-25T20:47:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75c151ceaacf5ca8f2f34ebf863d88002fb12587'/>
<id>urn:sha1:75c151ceaacf5ca8f2f34ebf863d88002fb12587</id>
<content type='text'>
Using legacy driver with latest firmware causes a power off issue.

Fix this by assigning a different filename (npu_7.sbin) to the latest
firmware. The driver attempts to load the latest firmware first and falls
back to the previous firmware version if loading fails.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5009
Fixes: f1eac46fe5f7 ("accel/amdxdna: Update firmware version check for latest firmware")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260225204752.2711734-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Validate command buffer payload count</title>
<updated>2026-02-23T17:24:21+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-19T21:19:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=901ec3470994006bc8dd02399e16b675566c3416'/>
<id>urn:sha1:901ec3470994006bc8dd02399e16b675566c3416</id>
<content type='text'>
The count field in the command header is used to determine the valid
payload size. Verify that the valid payload does not exceed the remaining
buffer space.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260219211946.1920485-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Prevent ubuf size overflow</title>
<updated>2026-02-23T17:24:21+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-17T19:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03808abb1d868aed7478a11a82e5bb4b3f1ca6d6'/>
<id>urn:sha1:03808abb1d868aed7478a11a82e5bb4b3f1ca6d6</id>
<content type='text'>
The ubuf size calculation may overflow, resulting in an undersized
allocation and possible memory corruption.

Use check_add_overflow() helpers to validate the size calculation before
allocation.

Fixes: bd72d4acda10 ("accel/amdxdna: Support user space allocated buffer")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260217192815.1784689-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix out-of-bounds memset in command slot handling</title>
<updated>2026-02-23T17:24:20+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-17T18:54:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1110a949675ebd56b3f0286e664ea543f745801c'/>
<id>urn:sha1:1110a949675ebd56b3f0286e664ea543f745801c</id>
<content type='text'>
The remaining space in a command slot may be smaller than the size of
the command header. Clearing the command header with memset() before
verifying the available slot space can result in an out-of-bounds write
and memory corruption.

Fix this by moving the memset() call after the size validation.

Fixes: 3d32eb7a5ecf ("accel/amdxdna: Fix cu_idx being cleared by memset() during command setup")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260217185415.1781908-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix command hang on suspended hardware context</title>
<updated>2026-02-23T17:24:19+00:00</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-11T20:53:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=07efce5a6611af6714ea3ef65694e0c8dd7e44f5'/>
<id>urn:sha1:07efce5a6611af6714ea3ef65694e0c8dd7e44f5</id>
<content type='text'>
When a hardware context is suspended, the job scheduler is stopped. If a
command is submitted while the context is suspended, the job is queued in
the scheduler but aie2_sched_job_run() is never invoked to restart the
hardware context. As a result, the command hangs.

Fix this by modifying the hardware context suspend routine to keep the job
scheduler running so that queued jobs can trigger context restart properly.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260211205341.722982-1-lizhi.hou@amd.com
</content>
</entry>
</feed>
