<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/accel/amdxdna/amdxdna_ctx.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-03-19T15:14:56Z</updated>
<entry>
<title>accel/amdxdna: Fix runtime suspend deadlock when there is pending job</title>
<updated>2026-03-19T15:14:56Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-03-10T18:00:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ac72e7385a2c7533dd766de4197134d96230be85'/>
<id>urn:sha1:ac72e7385a2c7533dd766de4197134d96230be85</id>
<content type='text'>
[ Upstream commit 6b13cb8f48a42ddf6dd98865b673a82e37ff238b ]

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
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/amdxdna: Fill invalid payload for failed command</title>
<updated>2026-03-12T11:09:45Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-27T00:48:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=84a4b37eb03699a068205414636d510d3dc1e5e7'/>
<id>urn:sha1:84a4b37eb03699a068205414636d510d3dc1e5e7</id>
<content type='text'>
[ Upstream commit 89ff45359abbf9d8d3c4aa3f5a57ed0be82b5a12 ]

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
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/amdxdna: Validate command buffer payload count</title>
<updated>2026-03-12T11:09:15Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-19T21:19:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ed2ae6b3fe869f99b75afd02045ba5c0c0773e2'/>
<id>urn:sha1:3ed2ae6b3fe869f99b75afd02045ba5c0c0773e2</id>
<content type='text'>
[ Upstream commit 901ec3470994006bc8dd02399e16b675566c3416 ]

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
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix dead lock for suspend and resume</title>
<updated>2026-03-12T11:09:14Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2026-02-11T20:46:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ac24537478dd8eb2fd3984b4652bb19461e5e74c'/>
<id>urn:sha1:ac24537478dd8eb2fd3984b4652bb19461e5e74c</id>
<content type='text'>
[ Upstream commit 1aa82181a3c285c7351523d587f7981ae4c015c8 ]

When an application issues a query IOCTL while auto suspend is running,
a deadlock can occur. The query path holds dev_lock and then calls
pm_runtime_resume_and_get(), which waits for the ongoing suspend to
complete. Meanwhile, the suspend callback attempts to acquire dev_lock
and blocks, resulting in a deadlock.

Fix this by releasing dev_lock before calling pm_runtime_resume_and_get()
and reacquiring it after the call completes. Also acquire dev_lock in the
resume callback to keep the locking consistent.

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/20260211204644.722758-1-lizhi.hou@amd.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>accel/amdxdna: Fix dma_fence leak when job is canceled</title>
<updated>2025-11-06T17:23:42Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2025-11-05T19:41:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dea9f84776b96a703f504631ebe9fea07bd2c181'/>
<id>urn:sha1:dea9f84776b96a703f504631ebe9fea07bd2c181</id>
<content type='text'>
Currently, dma_fence_put(job-&gt;fence) is called in job notification
callback. However, if a job is canceled, the notification callback is never
invoked, leading to a memory leak. Move dma_fence_put(job-&gt;fence)
to the job cleanup function to ensure the fence is always released.

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/20251105194140.1004314-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Use MSG_OP_CHAIN_EXEC_NPU when supported</title>
<updated>2025-11-03T17:20:39Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2025-10-31T01:47:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=71829d7f2f702148a238672785614e1a765fcece'/>
<id>urn:sha1:71829d7f2f702148a238672785614e1a765fcece</id>
<content type='text'>
MSG_OP_CHAIN_EXEC_NPU is a unified mailbox message that replaces
MSG_OP_CHAIN_EXEC_BUFFER_CF and MSG_OP_CHAIN_EXEC_DPU.

Add driver logic to check firmware version, and if MSG_OP_CHAIN_EXEC_NPU
is supported, uses it to submit firmware commands.

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/20251031014700.2919349-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Support firmware debug buffer</title>
<updated>2025-10-20T16:07:12Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2025-10-16T20:30:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7ea0468380216c10b73633b976d33efa8c12d375'/>
<id>urn:sha1:7ea0468380216c10b73633b976d33efa8c12d375</id>
<content type='text'>
To collect firmware debug information, the userspace application allocates
a AMDXDNA_BO_DEV buffer object through DRM_IOCTL_AMDXDNA_CREATE_BO.
Then it associates the buffer with the hardware context through
DRM_IOCTL_AMDXDNA_CONFIG_HWCTX which requests firmware to bind the buffer
through a mailbox command. The firmware then writes the debug data into
this buffer. The buffer can be mapped into userspace so that
applications can retrieve and analyze the firmware debug information.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://lore.kernel.org/r/20251016203016.819441-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Enhance runtime power management</title>
<updated>2025-09-24T20:47:59Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2025-09-23T15:22:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=063db451832b8849faf1b0b8404b3a6a39995b29'/>
<id>urn:sha1:063db451832b8849faf1b0b8404b3a6a39995b29</id>
<content type='text'>
Currently, pm_runtime_resume_and_get() is invoked in the driver's open
callback, and pm_runtime_put_autosuspend() is called in the close
callback. As a result, the device remains active whenever an application
opens it, even if no I/O is performed, leading to unnecessary power
consumption.

Move the runtime PM calls to the AIE2 callbacks that actually interact
with the hardware. The device will automatically suspend after 5 seconds
of inactivity (no hardware accesses and no pending commands), and it will
be resumed on the next hardware access.

Reviewed-by: Karol Wachowski &lt;karol.wachowski@linux.intel.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://lore.kernel.org/r/20250923152229.1303625-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Add a function to walk hardware contexts</title>
<updated>2025-08-18T15:35:57Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2025-08-15T17:16:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c8cea4371e5eca30cda8660aabb337747dabc51d'/>
<id>urn:sha1:c8cea4371e5eca30cda8660aabb337747dabc51d</id>
<content type='text'>
Walking hardware contexts created by a process is duplicated in multiple
spots. Add a function, amdxdna_hwctx_walk(), and replace all spots.

hwctx_srcu and dev_lock are good enough to protect hardware context list.
Remove hwctx_lock.

Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://lore.kernel.org/r/20250815171634.3417487-1-lizhi.hou@amd.com
</content>
</entry>
<entry>
<title>accel/amdxdna: Unify pm and rpm suspend and resume callbacks</title>
<updated>2025-08-06T17:31:55Z</updated>
<author>
<name>Lizhi Hou</name>
<email>lizhi.hou@amd.com</email>
</author>
<published>2025-08-03T19:14:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d2b48f2b30f25997a1ae1ad0cefac68c25f8c330'/>
<id>urn:sha1:d2b48f2b30f25997a1ae1ad0cefac68c25f8c330</id>
<content type='text'>
The suspend and resume callbacks for pm and runtime pm should be same.
During suspending, it needs to stop all hardware contexts first. And
the hardware contexts will be restarted after the device is resumed.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Reviewed-by: Maciej Falkowski &lt;maciej.falkowski@linux.intel.com&gt;
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://lore.kernel.org/r/20250803191450.1568851-1-lizhi.hou@amd.com
</content>
</entry>
</feed>
