<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/msm/msm_fence.c, 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-02-18T10:19:06Z</updated>
<entry>
<title>drm/msm: Switch to use hrtimer_setup()</title>
<updated>2025-02-18T10:19:06Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-02-05T10:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58ac3c93306ec588a6dbb8d3e02ac1109b32df6b'/>
<id>urn:sha1:58ac3c93306ec588a6dbb8d3e02ac1109b32df6b</id>
<content type='text'>
hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.

Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Patch was created by using Coccinelle.

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Zack Rusin &lt;zack.rusin@broadcom.com&gt;
Link: https://lore.kernel.org/all/2689e1ad4105f415ce8cd9e426873d9ac479dc36.1738746904.git.namcao@linutronix.de

</content>
</entry>
<entry>
<title>drm/msm: Fix hw_fence error path cleanup</title>
<updated>2023-07-17T19:54:20Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2023-07-12T22:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cd0787f082e1a179f2b6e749d08daff1a9f6b1b'/>
<id>urn:sha1:1cd0787f082e1a179f2b6e749d08daff1a9f6b1b</id>
<content type='text'>
In an error path where the submit is free'd without the job being run,
the hw_fence pointer is simply a kzalloc'd block of memory.  In this
case we should just kfree() it, rather than trying to decrement it's
reference count.  Fortunately we can tell that this is the case by
checking for a zero refcount, since if the job was run, the submit would
be holding a reference to the hw_fence.

Fixes: f94e6a51e17c ("drm/msm: Pre-allocate hw_fence")
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Patchwork: https://patchwork.freedesktop.org/patch/547088/
</content>
</entry>
<entry>
<title>drm/msm: Add deadline based boost support</title>
<updated>2023-03-28T22:46:15Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2023-03-08T15:53:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8b8487c0756ead2e3584550e5a4d4ce4a1e520f'/>
<id>urn:sha1:f8b8487c0756ead2e3584550e5a4d4ce4a1e520f</id>
<content type='text'>
Track the nearest deadline on a fence timeline and set a timer to expire
shortly before to trigger boost if the fence has not yet been signaled.

v2: rebase

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Patchwork: https://patchwork.freedesktop.org/patch/525816/
Link: https://lore.kernel.org/r/20230308155322.344664-13-robdclark@gmail.com
</content>
</entry>
<entry>
<title>drm/msm: Pre-allocate hw_fence</title>
<updated>2023-03-25T23:31:43Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2023-03-20T14:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f94e6a51e17ccff8e005be208e723ca265c8b881'/>
<id>urn:sha1:f94e6a51e17ccff8e005be208e723ca265c8b881</id>
<content type='text'>
Avoid allocating memory in job_run() by pre-allocating the hw_fence.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Patchwork: https://patchwork.freedesktop.org/patch/527832/
Link: https://lore.kernel.org/r/20230320144356.803762-2-robdclark@gmail.com
</content>
</entry>
<entry>
<title>drm/msm: use strscpy instead of strncpy</title>
<updated>2023-01-24T08:11:52Z</updated>
<author>
<name>Dmitry Baryshkov</name>
</author>
<published>2023-01-18T02:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7fd8634f48d76aa799ed57beb7d87dab91bde80'/>
<id>urn:sha1:d7fd8634f48d76aa799ed57beb7d87dab91bde80</id>
<content type='text'>
Using strncpy can result in non-NULL-terminated destination string. Use
strscpy instead. This fixes following warning:

drivers/gpu/drm/msm/msm_fence.c: In function ‘msm_fence_context_alloc’:
drivers/gpu/drm/msm/msm_fence.c:25:9: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
   25 |         strncpy(fctx-&gt;name, name, sizeof(fctx-&gt;name));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: f97decac5f4c ("drm/msm: Support multiple ringbuffers")
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Reviewed-by: Abhinav Kumar &lt;quic_abhinavk@quicinc.com&gt;
Patchwork: https://patchwork.freedesktop.org/patch/518787/
Link: https://lore.kernel.org/r/20230118020152.1689213-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Fix fence rollover issue</title>
<updated>2022-07-05T03:01:11Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2022-06-15T16:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2311720a0182756f175fbf4afc1fb76ac487b587'/>
<id>urn:sha1:2311720a0182756f175fbf4afc1fb76ac487b587</id>
<content type='text'>
And while we are at it, let's start the fence counter close to the
rollover point so that if issues slip in, they are more obvious.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Fixes: fde5de6cb461 ("drm/msm: move fence code to it's own file")
Fixes: 5f3aee4ceb5b ("drm/msm: Handle fence rollover")
Patchwork: https://patchwork.freedesktop.org/patch/489619/
Link: https://lore.kernel.org/r/20220615162435.3011793-1-robdclark@gmail.com
[DB: fixed the conflict while applying the patch]
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Drop update_fences()</title>
<updated>2022-06-18T16:13:32Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2022-06-18T16:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c7a52217a8c1e674a9e15b71a7239d71a4d9cfd'/>
<id>urn:sha1:3c7a52217a8c1e674a9e15b71a7239d71a4d9cfd</id>
<content type='text'>
I noticed while looking at some traces, that we could miss calls to
msm_update_fence(), as the irq could have raced with retire_submits()
which could have already popped the last submit on a ring out of the
queue of in-flight submits.  But walking the list of submits in the
irq handler isn't really needed, as dma_fence_is_signaled() will dtrt.
So lets just drop it entirely.

v2: use spin_lock_irqsave/restore as we are no longer protected by the
    spin_lock_irqsave/restore() in update_fences()

Reported-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Fixes: 95d1deb02a9c ("drm/msm/gem: Add fenced vma unpin")
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Patchwork: https://patchwork.freedesktop.org/patch/490136/
Link: https://lore.kernel.org/r/20220618161120.3451993-1-robdclark@gmail.com
</content>
</entry>
<entry>
<title>drm/msm/gem: Add fenced vma unpin</title>
<updated>2022-04-21T22:03:12Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2022-04-11T21:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95d1deb02a9c93bf9ea8cebe61f0c26cadf43cf9'/>
<id>urn:sha1:95d1deb02a9c93bf9ea8cebe61f0c26cadf43cf9</id>
<content type='text'>
With userspace allocated iova (next patch), we can have a race condition
where userspace observes the fence completion and deletes the vma before
retire_submit() gets around to unpinning the vma.  To handle this, add a
fenced unpin which drops the refcount but tracks the fence, and update
msm_gem_vma_inuse() to check any previously unsignaled fences.

v2: Fix inuse underflow (duplicate unpin)
v3: Fix msm_job_run() vs submit_cleanup() race condition

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Link: https://lore.kernel.org/r/20220411215849.297838-10-robdclark@gmail.com
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Track "seqno" fences by idr</title>
<updated>2021-07-28T01:09:18Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2021-07-28T01:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a61acbbe9cf873f869fc634ae6f72f214f5994cc'/>
<id>urn:sha1:a61acbbe9cf873f869fc634ae6f72f214f5994cc</id>
<content type='text'>
Previously the (non-fd) fence returned from submit ioctl was a raw
seqno, which is scoped to the ring.  But from UABI standpoint, the
ioctls related to seqno fences all specify a submitqueue.  We can
take advantage of that to replace the seqno fences with a cyclic idr
handle.

This is in preperation for moving to drm scheduler, at which point
the submit ioctl will return after queuing the submit job to the
scheduler, but before the submit is written into the ring (and
therefore before a ring seqno has been assigned).  Which means we
need to replace the dma_fence that userspace may need to wait on
with a scheduler fence.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://lore.kernel.org/r/20210728010632.2633470-8-robdclark@gmail.com
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Let fences read directly from memptrs</title>
<updated>2021-07-28T00:53:51Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2021-07-26T14:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da3d378dec86348d21c02f311da87fa0742e36f6'/>
<id>urn:sha1:da3d378dec86348d21c02f311da87fa0742e36f6</id>
<content type='text'>
Let dma_fence::signaled, etc, read directly from the address that the hw
is writing with updated completed fence seqno, so we can potentially
notice that the fence is signaled sooner.

Plus add some docs.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Link: https://lore.kernel.org/r/20210726144359.2179302-2-robdclark@gmail.com
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
</feed>
