<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/msm/msm_gem.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-11-13T20:37:16Z</updated>
<entry>
<title>drm/msm: Fix 32b size truncation</title>
<updated>2025-11-13T20:37:16Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-08-21T00:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36d85c2a139bf237a7cf3935e8d31233f4fc3f19'/>
<id>urn:sha1:36d85c2a139bf237a7cf3935e8d31233f4fc3f19</id>
<content type='text'>
[ Upstream commit 6d6a29a19b232e29b61a14d58b71fefc2e003fa4 ]

Somehow we never noticed this when arm64 became a thing, many years ago.

v2: also fix npages

Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Tested-by: Connor Abbott &lt;cwabbott0@gmail.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/669785/
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Fix a few comments</title>
<updated>2025-08-07T16:22:28Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-08-05T16:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba3afadeb81ebb92ab23546fbd2ec7d9dfe216f8'/>
<id>urn:sha1:ba3afadeb81ebb92ab23546fbd2ec7d9dfe216f8</id>
<content type='text'>
Fix a couple comments which had become (partially) obsolete or incorrect
with the gpuvm conversion.

Signed-off-by: Rob Clark &lt;robin.clark@oss.qualcomm.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@oss.qualcomm.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/667237/
</content>
</entry>
<entry>
<title>drm/msm: Add VM_BIND throttling</title>
<updated>2025-07-05T00:48:39Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b74fae5492d1429c03b57a423d0837a3bdc4b397'/>
<id>urn:sha1:b74fae5492d1429c03b57a423d0837a3bdc4b397</id>
<content type='text'>
A large number of (unsorted or separate) small (&lt;2MB) mappings can cause
a lot of, probably unnecessary, prealloc pages.  Ie. a single 4k page
size mapping will pre-allocate 3 pages (for levels 2-4) for the
pagetable.  Which can chew up a large amount of unneeded memory.  So add
a mechanism to put an upper bound on the # of pre-alloc pages.

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/661529/
</content>
</entry>
<entry>
<title>drm/msm: Defer VMA unmap for fb unpins</title>
<updated>2025-07-05T00:48:38Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bebfd53af0f7c8ea55094ba7b8b8b907024bb7b'/>
<id>urn:sha1:3bebfd53af0f7c8ea55094ba7b8b8b907024bb7b</id>
<content type='text'>
With the conversion to drm_gpuvm, we lost the lazy VMA cleanup, which
means that fb cleanup/unpin when pageflipping to new scanout buffers
immediately unmaps the scanout buffer.  This is costly (with tlbinv,
it can be 4-6ms for a 1080p scanout buffer, and more for higher
resolutions)!

To avoid this, introduce a vma_ref, which is incremented whenever
userspace has a GEM handle or dma-buf fd.  When unpinning if the
vm is the kms-&gt;vm we defer tearing down the VMA until the vma_ref
drops to zero.  If the buffer is still part of a flip-chain then
userspace will be holding some sort of reference to the BO, either
via a GEM handle and/or dma-buf fd.  So this avoids unmapping the VMA
when there is a strong possibility that it will be needed again.

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/661538/
</content>
</entry>
<entry>
<title>drm/msm: use trylock for debugfs</title>
<updated>2025-07-05T00:48:38Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a1ff88ec5b60b41ba830c5bf08b6cd8f45ab411'/>
<id>urn:sha1:0a1ff88ec5b60b41ba830c5bf08b6cd8f45ab411</id>
<content type='text'>
This resolves a potential deadlock vs msm_gem_vm_close().  Otherwise for
_NO_SHARE buffers msm_gem_describe() could be trying to acquire the
shared vm resv, while already holding priv-&gt;obj_lock.  But _vm_close()
might drop the last reference to a GEM obj while already holding the vm
resv, and msm_gem_free_object() needs to grab priv-&gt;obj_lock, a locking
inversion.

OTOH this is only for debugfs and it isn't critical if we undercount by
skipping a locked obj.  So just use trylock() and move along if we can't
get the lock.

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/661525/
</content>
</entry>
<entry>
<title>drm/msm: Add VMA unmap reason</title>
<updated>2025-07-05T00:48:38Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b4339c55ef59ff753c8d505596961edd7b887da'/>
<id>urn:sha1:0b4339c55ef59ff753c8d505596961edd7b887da</id>
<content type='text'>
Make the VM log a bit more useful by providing a reason for the unmap
(ie. closing VM vs evict/purge, etc)

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/661527/
</content>
</entry>
<entry>
<title>drm/msm: Add VM logging for VM_BIND updates</title>
<updated>2025-07-05T00:48:38Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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: Add VM_BIND ioctl</title>
<updated>2025-07-05T00:48:38Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e6a8a1fe2b262a6dfd0a65041fcd830ee1e7143'/>
<id>urn:sha1:2e6a8a1fe2b262a6dfd0a65041fcd830ee1e7143</id>
<content type='text'>
Add a VM_BIND ioctl for binding/unbinding buffers into a VM.  This is
only supported if userspace has opted in to MSM_PARAM_EN_VM_BIND.

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/661524/
</content>
</entry>
<entry>
<title>drm/msm: Support pgtable preallocation</title>
<updated>2025-07-05T00:48:37Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e601ea31d66ba83d565cae9cfa45cbbcdd8286dd'/>
<id>urn:sha1:e601ea31d66ba83d565cae9cfa45cbbcdd8286dd</id>
<content type='text'>
Introduce a mechanism to count the worst case # of pages required in a
VM_BIND op.

Note that previously we would have had to somehow account for
allocations in unmap, when splitting a block.  This behavior was removed
in commit 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap
behavior)"

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/661515/
</content>
</entry>
<entry>
<title>drm/msm: Add VM_BIND submitqueue</title>
<updated>2025-07-05T00:48:37Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2025-06-29T20:13:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92395af63a9958615edfa9d4ef1ea72c92a00410'/>
<id>urn:sha1:92395af63a9958615edfa9d4ef1ea72c92a00410</id>
<content type='text'>
This submitqueue type isn't tied to a hw ringbuffer, but instead
executes on the CPU for performing async VM_BIND ops.

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/661517/
</content>
</entry>
</feed>
