<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/msm/msm_gpu.c, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-11-17T10:03:51Z</updated>
<entry>
<title>drm/msm: prevent NULL dereference in msm_gpu_crashstate_capture()</title>
<updated>2021-11-17T10:03:51Z</updated>
<author>
<name>Tim Gardner</name>
</author>
<published>2021-09-29T16:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cdcfcd25f40ba9a27e700158882f10a3a63e3633'/>
<id>urn:sha1:cdcfcd25f40ba9a27e700158882f10a3a63e3633</id>
<content type='text'>
[ Upstream commit b220c154832c5cd0df34cbcbcc19d7135c16e823 ]

Coverity complains of a possible NULL dereference:

CID 120718 (#1 of 1): Dereference null return value (NULL_RETURNS)
23. dereference: Dereferencing a pointer that might be NULL state-&gt;bos when
    calling msm_gpu_crashstate_get_bo. [show details]
301                        msm_gpu_crashstate_get_bo(state, submit-&gt;bos[i].obj,
302                                submit-&gt;bos[i].iova, submit-&gt;bos[i].flags);

Fix this by employing the same state-&gt;bos NULL check as is used in the next
for loop.

Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Link: https://lore.kernel.org/r/20210929162554.14295-1-tim.gardner@canonical.com
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: devcoredump iommu fault support</title>
<updated>2021-06-23T14:33:55Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2021-06-10T21:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e25e92e08e32c6bf63a968929d232f13dcf9938c'/>
<id>urn:sha1:e25e92e08e32c6bf63a968929d232f13dcf9938c</id>
<content type='text'>
Wire up support to stall the SMMU on iova fault, and collect a devcore-
dump snapshot for easier debugging of faults.

Currently this is a6xx-only, but mostly only because so far it is the
only one using adreno-smmu-priv.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Acked-by: Jordan Crouse &lt;jordan@cosmicpenguin.net&gt;
Link: https://lore.kernel.org/r/20210610214431.539029-6-robdclark@gmail.com
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: export hangcheck_period in debugfs</title>
<updated>2021-06-23T14:33:55Z</updated>
<author>
<name>Samuel Iglesias Gonsalvez</name>
</author>
<published>2021-06-07T10:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d2fa58e0dda3344999cad9b195eb539310ad093'/>
<id>urn:sha1:1d2fa58e0dda3344999cad9b195eb539310ad093</id>
<content type='text'>
While keeping the previous default value for hangcheck period,
we allow now the possibility of configuring its value via
debugfs.

Signed-off-by: Samuel Iglesias Gonsalvez &lt;siglesias@igalia.com&gt;
Link: https://lore.kernel.org/r/20210607104441.184700-1-siglesias@igalia.com
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Add param for userspace to query suspend count</title>
<updated>2021-04-07T18:05:43Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2021-03-25T01:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ab1c5cc3939b3322ebd27a44b8ee6a16eccc9f5'/>
<id>urn:sha1:3ab1c5cc3939b3322ebd27a44b8ee6a16eccc9f5</id>
<content type='text'>
Performance counts, and ALWAYS_ON counters used for capturing GPU
timestamps, lose their state across suspend/resume cycles.  Userspace
tooling for performance monitoring needs to be aware of this.  For
example, after a suspend userspace needs to recalibrate it's offset
between CPU and GPU time.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Acked-by: Jordan Crouse &lt;jordan@cosmicpenguin.net&gt;
Link: https://lore.kernel.org/r/20210325012358.1759770-3-robdclark@gmail.com
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Protect obj-&gt;active_count under obj lock</title>
<updated>2020-11-21T17:50:23Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2020-11-16T17:48:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab5c54cb88350e224632e5b0fcd7f86ece06beb9'/>
<id>urn:sha1:ab5c54cb88350e224632e5b0fcd7f86ece06beb9</id>
<content type='text'>
Previously we only held obj lock in the _active_get() path, and relied
on atomic_dec_return() to not be racy in the _active_put() path where
obj lock was not held.

But this is a false sense of security.  Unlike obj lifetime refcnt,
where you do not expect to *increase* the refcnt after the last put
(which would mean that something has gone horribly wrong with the
object liveness reference counting), the active_count can increase
again from zero.  Racing _active_put()s and _active_get()s could leave
the obj on the wrong mm list.

But in the retire path, immediately after the _active_put(), the
_unpin_iova() would acquire obj lock.  So just move the locking earlier
and rely on that to protect obj-&gt;active_count.

Fixes: c5c1643cef7a ("drm/msm: Drop struct_mutex from the retire path")
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Add support for GPU cooling</title>
<updated>2020-11-05T16:39:57Z</updated>
<author>
<name>Akhil P Oommen</name>
</author>
<published>2020-10-30T10:47:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec793cf01d1fe7f2d3eef30a0accfb3ca880abe4'/>
<id>urn:sha1:ec793cf01d1fe7f2d3eef30a0accfb3ca880abe4</id>
<content type='text'>
Register GPU as a devfreq cooling device so that it can be passively
cooled by the thermal framework.

Signed-off-by: Akhil P Oommen &lt;akhilpo@codeaurora.org&gt;
Tested-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Drop struct_mutex from the retire path</title>
<updated>2020-11-05T00:00:56Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2020-10-23T16:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5c1643cef7a11c1f3a5544528087618ba9a5aab'/>
<id>urn:sha1:c5c1643cef7a11c1f3a5544528087618ba9a5aab</id>
<content type='text'>
Now that we are not relying on dev-&gt;struct_mutex to protect the
ring-&gt;submits lists, drop the struct_mutex lock.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Reviewed-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Reviewed-by: Kristian H. Kristensen &lt;hoegsberg@google.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Remove obj-&gt;gpu</title>
<updated>2020-11-05T00:00:56Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2020-10-23T16:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb1a1fcbacefd839503e94a66a467809ade27b2c'/>
<id>urn:sha1:fb1a1fcbacefd839503e94a66a467809ade27b2c</id>
<content type='text'>
It cannot be atomically updated with obj-&gt;active_count, and the only
purpose is a useless WARN_ON() (which becomes a buggy WARN_ON() once
retire_submits() is not serialized with incoming submits via
struct_mutex)

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Reviewed-by: Kristian H. Kristensen &lt;hoegsberg@google.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Refcount submits</title>
<updated>2020-11-05T00:00:56Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2020-10-23T16:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=964d2f97e74b3951973bc22d8a5547f6c0d505b4'/>
<id>urn:sha1:964d2f97e74b3951973bc22d8a5547f6c0d505b4</id>
<content type='text'>
Before we remove dev-&gt;struct_mutex from the retire path, we have to deal
with the situation of a submit retiring before the submit ioctl returns.

To deal with this, ring-&gt;submits will hold a reference to the submit,
which is dropped when the submit is retired.  And the submit ioctl path
holds it's own ref, which it drops when it is done with the submit.

Also, add to submit list *after* getting/pinning bo's, to prevent badness
in case the completed fence is corrupted, and retire_worker mistakenly
believes the submit is done too early.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Reviewed-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Reviewed-by: Kristian H. Kristensen &lt;hoegsberg@google.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
<entry>
<title>drm/msm: Protect ring-&gt;submits with it's own lock</title>
<updated>2020-11-05T00:00:56Z</updated>
<author>
<name>Rob Clark</name>
</author>
<published>2020-10-23T16:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77d205290aa944895cf7e8bea500b8fd95a6b05b'/>
<id>urn:sha1:77d205290aa944895cf7e8bea500b8fd95a6b05b</id>
<content type='text'>
One less place to rely on dev-&gt;struct_mutex.

Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Reviewed-by: Jordan Crouse &lt;jcrouse@codeaurora.org&gt;
Reviewed-by: Kristian H. Kristensen &lt;hoegsberg@google.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
</feed>
