<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/soc/qcom/ocmem.c, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-19T12:11:52Z</updated>
<entry>
<title>soc: qcom: ocmem: fix device leak on lookup</title>
<updated>2026-01-19T12:11:52Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2025-09-26T14:35:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=359824de51952ee0c2227fb06dffadca98cd4bd9'/>
<id>urn:sha1:359824de51952ee0c2227fb06dffadca98cd4bd9</id>
<content type='text'>
commit b5c16ea57b030b8e9428ec726e26219dfe05c3d9 upstream.

Make sure to drop the reference taken to the ocmem platform device when
looking up its driver data.

Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.

Also note that commit 0ff027027e05 ("soc: qcom: ocmem: Fix missing
put_device() call in of_get_ocmem") fixed the leak in a lookup error
path, but the reference is still leaking on success.

Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Cc: stable@vger.kernel.org	# 5.5: 0ff027027e05
Cc: Brian Masney &lt;bmasney@redhat.com&gt;
Cc: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Reviewed-by: Brian Masney &lt;bmasney@redhat.com&gt;
Link: https://lore.kernel.org/r/20250926143511.6715-2-johan@kernel.org
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: ocmem: Fix NUM_PORTS &amp; NUM_MACROS macros</title>
<updated>2023-09-19T10:20:10Z</updated>
<author>
<name>Luca Weiss</name>
</author>
<published>2023-06-14T16:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71d2d9aa2bd8230cda9b6dcf9a5b9728f2e5eb0f'/>
<id>urn:sha1:71d2d9aa2bd8230cda9b6dcf9a5b9728f2e5eb0f</id>
<content type='text'>
[ Upstream commit a7b484b1c9332a1ee12e8799d62a11ee3f8e0801 ]

Since we're using these two macros to read a value from a register, we
need to use the FIELD_GET instead of the FIELD_PREP macro, otherwise
we're getting wrong values.

So instead of:

  [    3.111779] ocmem fdd00000.sram: 2 ports, 1 regions, 512 macros, not interleaved

we now get the correct value of:

  [    3.129672] ocmem fdd00000.sram: 2 ports, 1 regions, 2 macros, not interleaved

Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Reviewed-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Signed-off-by: Luca Weiss &lt;luca@z3ntu.xyz&gt;
Link: https://lore.kernel.org/r/20230506-msm8226-ocmem-v3-1-79da95a2581f@z3ntu.xyz
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: ocmem: Add OCMEM hardware version print</title>
<updated>2023-09-19T10:20:10Z</updated>
<author>
<name>Luca Weiss</name>
</author>
<published>2023-05-29T08:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1356531e9249a1276f881c85f2ee1d9797ffe749'/>
<id>urn:sha1:1356531e9249a1276f881c85f2ee1d9797ffe749</id>
<content type='text'>
[ Upstream commit e81a16e77259294cd4ff0a9c1fbe5aa0e311a47d ]

It might be useful to know what hardware version of the OCMEM block the
SoC contains. Add a debug print for that.

Signed-off-by: Luca Weiss &lt;luca@z3ntu.xyz&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20230509-ocmem-hwver-v3-1-e51f3488e0f4@z3ntu.xyz
Stable-dep-of: a7b484b1c933 ("soc: qcom: ocmem: Fix NUM_PORTS &amp; NUM_MACROS macros")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: ocmem: Fix refcount leak in of_get_ocmem</title>
<updated>2022-08-21T13:15:34Z</updated>
<author>
<name>Miaoqian Lin</name>
</author>
<published>2022-06-02T04:24:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07aea6819d569d1e172227486655e4fb5bd4cdb9'/>
<id>urn:sha1:07aea6819d569d1e172227486655e4fb5bd4cdb9</id>
<content type='text'>
[ Upstream commit 92a563fcf14b3093226fb36f12e9b5cf630c5a5d ]

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.
of_node_put() will check NULL pointer.

Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Reviewed-by: Brian Masney &lt;masneyb@onstation.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220602042430.1114-1-linmq006@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: ocmem: Fix missing put_device() call in of_get_ocmem</title>
<updated>2022-04-08T12:40:06Z</updated>
<author>
<name>Miaoqian Lin</name>
</author>
<published>2022-01-07T07:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a990a65d4a3afc869346d21be5b63ffd6418176'/>
<id>urn:sha1:5a990a65d4a3afc869346d21be5b63ffd6418176</id>
<content type='text'>
[ Upstream commit 0ff027027e05a866491bbb53494f0e2a61354c85 ]

The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore.
Add the corresponding 'put_device()' in the error handling path.

Fixes: 01f937ffc468 ("soc: qcom: ocmem: don't return NULL in of_get_ocmem")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220107073126.2335-1-linmq006@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: ocmem: don't return NULL in of_get_ocmem</title>
<updated>2021-03-04T10:37:27Z</updated>
<author>
<name>Luca Weiss</name>
</author>
<published>2021-01-30T14:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84f9aaa7312b84e05a6057df86f29792b8fba9f1'/>
<id>urn:sha1:84f9aaa7312b84e05a6057df86f29792b8fba9f1</id>
<content type='text'>
[ Upstream commit 01f937ffc4686837d6c43dea80c6ade6cbd2940a ]

If ocmem probe fails for whatever reason, of_get_ocmem returned NULL.
Without this, users must check for both NULL and IS_ERR on the returned
pointer - which didn't happen in drivers/gpu/drm/msm/adreno/adreno_gpu.c
leading to a NULL pointer dereference.

Reviewed-by: Brian Masney &lt;masneyb@onstation.org&gt;
Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Signed-off-by: Luca Weiss &lt;luca@z3ntu.xyz&gt;
Link: https://lore.kernel.org/r/20210130142349.53335-1-luca@z3ntu.xyz
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: add OCMEM driver</title>
<updated>2019-10-07T15:17:33Z</updated>
<author>
<name>Brian Masney</name>
</author>
<published>2019-08-23T12:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88c1e9404f1deee02e52d13aae3d9ee2cabd66f5'/>
<id>urn:sha1:88c1e9404f1deee02e52d13aae3d9ee2cabd66f5</id>
<content type='text'>
The OCMEM driver handles allocation and configuration of the On Chip
MEMory that is present on some Snapdragon SoCs. Devices which have
OCMEM do not have GMEM inside the GPU core, so the GPU must instead
use OCMEM to be functional. Since the GPU is currently the only OCMEM
user with an upstream driver, this is just a minimal implementation
sufficient for statically allocating to the GPU it's chunk of OCMEM.

This driver currently does not read the gmu-sram node that is described
in the device tree bindings. The starting memory address of the GPU's
reserved memory region is hardcoded to zero to match what the hardware
expects. The driver can be updated to read the reserved memory regions
from device tree once other users of OCMEM are added upstream.

Signed-off-by: Brian Masney &lt;masneyb@onstation.org&gt;
Co-developed-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Tested-by: Gabriel Francisco &lt;frc.gabrielgmail.com&gt;
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
</content>
</entry>
</feed>
