<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/msm/msm_gpu.c, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-12-18T13:03:03+00:00</updated>
<entry>
<title>drm/msm: fix missing NULL check after kcalloc in crashstate_get_bos()</title>
<updated>2025-12-18T13:03:03+00:00</updated>
<author>
<name>Huiwen He</name>
<email>hehuiwen@kylinos.cn</email>
</author>
<published>2025-11-12T17:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=966fcbb8c80318aa581e97da32056ffbab6138fe'/>
<id>urn:sha1:966fcbb8c80318aa581e97da32056ffbab6138fe</id>
<content type='text'>
[ Upstream commit 3065e6a4d3594b42dae6176b3e2c0c3563cf94b8 ]

The crashstate_get_bos() function allocates memory for `state-&gt;bos`
using kcalloc(), but the vmbind path does not check for allocation
failure before dereferencing it in the following drm_gpuvm_for_each_va()
loop. This could lead to a NULL pointer dereference if memory allocation
fails.

Fix this by wrapping the drm_gpuvm_for_each_va() loop with a NULL check
on state-&gt;bos, similar to the safety check in the non-vmbind path.

Fixes: af9aa6f316b3d ("drm/msm: Crashdump support for sparse")
Signed-off-by: Huiwen He &lt;hehuiwen@kylinos.cn&gt;
Patchwork: https://patchwork.freedesktop.org/patch/687556/
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()</title>
<updated>2025-12-18T13:03:03+00:00</updated>
<author>
<name>Huiwen He</name>
<email>hehuiwen@kylinos.cn</email>
</author>
<published>2025-11-12T17:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bc9149da210df7e9a191dde246b89d9ad23be8a'/>
<id>urn:sha1:0bc9149da210df7e9a191dde246b89d9ad23be8a</id>
<content type='text'>
[ Upstream commit 3099e0247e3217e1b39c1c61766e06ec3d13835f ]

crashstate_get_vm_logs() did not check the return value of
kmalloc_array(). In low-memory situations, kmalloc_array() may return
NULL, leading to a NULL pointer dereference when the function later
accesses state-&gt;vm_logs.

Fix this by checking the return value of kmalloc_array() and setting
state-&gt;nr_vm_logs to 0 if allocation fails.

Fixes: 9edc52967cc7 ("drm/msm: Add VM logging for VM_BIND updates")
Signed-off-by: Huiwen He &lt;hehuiwen@kylinos.cn&gt;
Patchwork: https://patchwork.freedesktop.org/patch/687555/
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: remove extraneous semicolon after a statement</title>
<updated>2025-08-28T22:51:46+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2025-07-18T13:34:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12c3c6c44d1b0fd17f18522089b12ad269769c00'/>
<id>urn:sha1:12c3c6c44d1b0fd17f18522089b12ad269769c00</id>
<content type='text'>
There is a statement that has an extraneous semicolon; remove it.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/664675/
Link: https://lore.kernel.org/r/20250718133404.2047673-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>drm/msm: skip re-emitting IBs for unusable VMs</title>
<updated>2025-08-18T14:51:10+00:00</updated>
<author>
<name>Antonino Maniscalco</name>
<email>antomani103@gmail.com</email>
</author>
<published>2025-08-13T13:04:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4876b391654142dcf31ac6da619ace357b6b902d'/>
<id>urn:sha1:4876b391654142dcf31ac6da619ace357b6b902d</id>
<content type='text'>
When a VM is marked as an usuable we disallow new submissions from it,
however submissions that where already scheduled on the ring would still
be re-sent.

Since this can lead to further hangs, avoid emitting the actual IBs.

Fixes: 6a4d287a1ae6 ("drm/msm: Mark VM as unusable on GPU hangs")
Signed-off-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Reviewed-by: Akhil P Oommen &lt;akhilpo@oss.qualcomm.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/668314/
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>drm/msm: Update global fault counter when faulty process has already ended</title>
<updated>2025-08-01T17:51:57+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2025-07-20T21:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25654a1756a4ace072404e89882d7ba8391900bd'/>
<id>urn:sha1:25654a1756a4ace072404e89882d7ba8391900bd</id>
<content type='text'>
The global fault counter is no longer used since commit 12578c075f89
("drm/msm/gpu: Skip retired submits in recover worker"). However, it's
still needed, as we need to handle cases where a GPU fault occurs after
the faulting process has already ended.

Hence, increment the global fault counter when the submitting process
had already ended. This way, the number of faults returned by
MSM_PARAM_FAULTS will stay consistent.

While here, s/unusuable/unusable.

Fixes: 12578c075f89 ("drm/msm/gpu: Skip retired submits in recover worker")
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/664853/
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
</content>
</entry>
<entry>
<title>drm/msm: Add VM logging for VM_BIND updates</title>
<updated>2025-07-05T00:48:38+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2025-06-29T20:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9edc52967cc7fcd430749cdd8866aa68f25422bf'/>
<id>urn:sha1:9edc52967cc7fcd430749cdd8866aa68f25422bf</id>
<content type='text'>
When userspace opts in to VM_BIND, the submit no longer holds references
keeping the VMA alive.  This makes it difficult to distinguish between
UMD/KMD/app bugs.  So add a debug option for logging the most recent VM
updates and capturing these in GPU devcoredumps.

The submitqueue id is also captured, a value of zero means the operation
did not go via a submitqueue (ie. comes from msm_gem_vm_close() tearing
down the remaining mappings when the device file is closed.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Tested-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Reviewed-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/661518/
</content>
</entry>
<entry>
<title>drm/msm: Crashdump support for sparse</title>
<updated>2025-07-05T00:48:37+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2025-06-29T20:13:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af9aa6f316b3dae53318a044e975dae979cc022b'/>
<id>urn:sha1:af9aa6f316b3dae53318a044e975dae979cc022b</id>
<content type='text'>
In this case, we need to iterate the VMAs looking for ones with
MSM_VMA_DUMP flag.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Tested-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Reviewed-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/661504/
</content>
</entry>
<entry>
<title>drm/msm: Crashdump prep for sparse mappings</title>
<updated>2025-07-05T00:48:36+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2025-06-29T20:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=757cff73e122666fae96eb0be567f6897c6c853c'/>
<id>urn:sha1:757cff73e122666fae96eb0be567f6897c6c853c</id>
<content type='text'>
In this case, userspace could request dumping partial GEM obj mappings.
Also drop use of should_dump() helper, which really only makes sense in
the old submit-&gt;bos[] table world.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Tested-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Reviewed-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/661496/
</content>
</entry>
<entry>
<title>drm/msm: Mark VM as unusable on GPU hangs</title>
<updated>2025-07-05T00:48:36+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2025-06-29T20:13:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a4d287a1ae6e49f8ef57fcb2a512c2b0bbef966'/>
<id>urn:sha1:6a4d287a1ae6e49f8ef57fcb2a512c2b0bbef966</id>
<content type='text'>
If userspace has opted-in to VM_BIND, then GPU hangs and VM_BIND errors
will mark the VM as unusable.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Tested-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Reviewed-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/661499/
</content>
</entry>
<entry>
<title>drm/msm: Add opt-in for VM_BIND</title>
<updated>2025-07-05T00:48:36+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2025-06-29T20:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=feb8ef4636a457a1fd916a3ae575f552935e69b9'/>
<id>urn:sha1:feb8ef4636a457a1fd916a3ae575f552935e69b9</id>
<content type='text'>
Add a SET_PARAM for userspace to request to manage to the VM itself,
instead of getting a kernel managed VM.

In order to transition to a userspace managed VM, this param must be set
before any mappings are created.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Tested-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Reviewed-by: Antonino Maniscalco &lt;antomani103@gmail.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/661494/
</content>
</entry>
</feed>
