<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/gpu/drm/mediatek, branch v4.19.48</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drm/mediatek: fix possible object reference leak</title>
<updated>2019-05-10T15:54:09+00:00</updated>
<author>
<name>Wen Yang</name>
<email>wen.yang99@zte.com.cn</email>
</author>
<published>2019-04-03T16:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e5c749ad6d7f1ad5ddfb6f1a12f476bbb4f9edcd'/>
<id>e5c749ad6d7f1ad5ddfb6f1a12f476bbb4f9edcd</id>
<content type='text'>
[ Upstream commit 2ae2c3316fb77dcf64275d011596b60104c45426 ]

The call to of_parse_phandle returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
drivers/gpu/drm/mediatek/mtk_hdmi.c:1521:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1509, but without a corresponding object release within this function.
drivers/gpu/drm/mediatek/mtk_hdmi.c:1524:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1509, but without a corresponding object release within this function.

Signed-off-by: Wen Yang &lt;wen.yang99@zte.com.cn&gt;
Cc: CK Hu &lt;ck.hu@mediatek.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 2ae2c3316fb77dcf64275d011596b60104c45426 ]

The call to of_parse_phandle returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
drivers/gpu/drm/mediatek/mtk_hdmi.c:1521:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1509, but without a corresponding object release within this function.
drivers/gpu/drm/mediatek/mtk_hdmi.c:1524:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1509, but without a corresponding object release within this function.

Signed-off-by: Wen Yang &lt;wen.yang99@zte.com.cn&gt;
Cc: CK Hu &lt;ck.hu@mediatek.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()</title>
<updated>2019-05-10T15:54:07+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2019-03-28T14:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=929d019d6d445855103cef86ab6331ef96b6e081'/>
<id>929d019d6d445855103cef86ab6331ef96b6e081</id>
<content type='text'>
[ Upstream commit 2d85978341e6a32e7443d9f28639da254d53f400 ]

We don't want to overwrite "ret", it already holds the correct error
code.  The "regmap" variable might be a valid pointer as this point.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 2d85978341e6a32e7443d9f28639da254d53f400 ]

We don't want to overwrite "ret", it already holds the correct error
code.  The "regmap" variable might be a valid pointer as this point.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: fix OF sibling-node lookup</title>
<updated>2018-11-13T19:08:54+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2018-08-27T08:21:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5501b81206ed02d36f38c503ba9212aa4a75e437'/>
<id>5501b81206ed02d36f38c503ba9212aa4a75e437</id>
<content type='text'>
commit ceff2f4dcd44abf35864d9a99f85ac619e89a01d upstream.

Use the new of_get_compatible_child() helper to lookup the sibling
instead of using of_find_compatible_node(), which searches the entire
tree from a given start node and thus can return an unrelated (i.e.
non-sibling) node.

This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent device node).

While at it, also fix the related cec-node reference leak.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.8
Cc: Junzhi Zhao &lt;junzhi.zhao@mediatek.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: CK Hu &lt;ck.hu@mediatek.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ceff2f4dcd44abf35864d9a99f85ac619e89a01d upstream.

Use the new of_get_compatible_child() helper to lookup the sibling
instead of using of_find_compatible_node(), which searches the entire
tree from a given start node and thus can return an unrelated (i.e.
non-sibling) node.

This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent device node).

While at it, also fix the related cec-node reference leak.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.8
Cc: Junzhi Zhao &lt;junzhi.zhao@mediatek.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: CK Hu &lt;ck.hu@mediatek.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace more open-coded allocation size multiplications</title>
<updated>2018-10-06T01:06:30+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-10-05T23:21:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=329e09893909d409039f6a79757d9b80b67efe39'/>
<id>329e09893909d409039f6a79757d9b80b67efe39</id>
<content type='text'>
As done treewide earlier, this catches several more open-coded
allocation size calculations that were added to the kernel during the
merge window. This performs the following mechanical transformations
using Coccinelle:

	kvmalloc(a * b, ...) -&gt; kvmalloc_array(a, b, ...)
	kvzalloc(a * b, ...) -&gt; kvcalloc(a, b, ...)
	devm_kzalloc(..., a * b, ...) -&gt; devm_kcalloc(..., a, b, ...)

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As done treewide earlier, this catches several more open-coded
allocation size calculations that were added to the kernel during the
merge window. This performs the following mechanical transformations
using Coccinelle:

	kvmalloc(a * b, ...) -&gt; kvmalloc_array(a, b, ...)
	kvzalloc(a * b, ...) -&gt; kvcalloc(a, b, ...)
	devm_kzalloc(..., a * b, ...) -&gt; devm_kcalloc(..., a, b, ...)

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: fix connection from RDMA2 to DSI1</title>
<updated>2018-08-27T03:24:37+00:00</updated>
<author>
<name>Stu Hsieh</name>
<email>stu.hsieh@mediatek.com</email>
</author>
<published>2018-08-09T02:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=08bcbed747eb87f00d2e2590b49607af1a9f4fe9'/>
<id>08bcbed747eb87f00d2e2590b49607af1a9f4fe9</id>
<content type='text'>
This patch fix connection from RDMA2 to DSI1

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fix connection from RDMA2 to DSI1

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: update some variable name from ovl to comp</title>
<updated>2018-08-27T03:24:37+00:00</updated>
<author>
<name>Stu Hsieh</name>
<email>stu.hsieh@mediatek.com</email>
</author>
<published>2018-08-09T02:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f265905c939e21a0c9e83540d4c2776c3e43c310'/>
<id>f265905c939e21a0c9e83540d4c2776c3e43c310</id>
<content type='text'>
This patch update some variable name from ovl to comp

Because RDMA would be first HW in ddp, the naming ovl
should be change to comp.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch update some variable name from ovl to comp

Because RDMA would be first HW in ddp, the naming ovl
should be change to comp.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: use layer_nr function to get layer number to init plane</title>
<updated>2018-08-27T03:24:37+00:00</updated>
<author>
<name>Stu Hsieh</name>
<email>stu.hsieh@mediatek.com</email>
</author>
<published>2018-08-09T02:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=66b2cf9623facfad790b335fcfd717258a00896b'/>
<id>66b2cf9623facfad790b335fcfd717258a00896b</id>
<content type='text'>
This patch use layer_nr function to get layer number to init plane

When plane init in crtc create,
it use the number of OVL layer to init plane.
That's OVL can read 4 memory address.

For mt2712 third ddp, it use RDMA to read memory.
RDMA can read 1 memory address, so it just init one plane.

For compatibility, this patch use mtk_ddp_comp_layer_nr function
to get layer number from their HW component in ddp for plane init.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch use layer_nr function to get layer number to init plane

When plane init in crtc create,
it use the number of OVL layer to init plane.
That's OVL can read 4 memory address.

For mt2712 third ddp, it use RDMA to read memory.
RDMA can read 1 memory address, so it just init one plane.

For compatibility, this patch use mtk_ddp_comp_layer_nr function
to get layer number from their HW component in ddp for plane init.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: add function to return RDMA layer number</title>
<updated>2018-08-27T03:24:37+00:00</updated>
<author>
<name>Stu Hsieh</name>
<email>stu.hsieh@mediatek.com</email>
</author>
<published>2018-08-09T02:15:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=98b6d76f957ba80017a3118fe0e33030b4bc017b'/>
<id>98b6d76f957ba80017a3118fe0e33030b4bc017b</id>
<content type='text'>
This patch add function to return RDMA layer number

RDMA always has one layer.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch add function to return RDMA layer number

RDMA always has one layer.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: add function to return OVL layer number</title>
<updated>2018-08-27T03:24:36+00:00</updated>
<author>
<name>Stu Hsieh</name>
<email>stu.hsieh@mediatek.com</email>
</author>
<published>2018-08-09T02:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1cbcb763ea5035e7ef01010ea68eb3b5143ad7cb'/>
<id>1cbcb763ea5035e7ef01010ea68eb3b5143ad7cb</id>
<content type='text'>
This patch add function to return OVL layer number

For now, MT8173, MT2712, MT2701 OVL all has 4 layer.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch add function to return OVL layer number

For now, MT8173, MT2712, MT2701 OVL all has 4 layer.

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/mediatek: add function to get layer number for component</title>
<updated>2018-08-27T03:24:36+00:00</updated>
<author>
<name>Stu Hsieh</name>
<email>stu.hsieh@mediatek.com</email>
</author>
<published>2018-08-09T02:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=650afd49572b56a5c58134d4acfeb77acc69d622'/>
<id>650afd49572b56a5c58134d4acfeb77acc69d622</id>
<content type='text'>
This patch add function to get layer number for component

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch add function to get layer number for component

Signed-off-by: Stu Hsieh &lt;stu.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
