<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/gpu/drm/mediatek, branch v4.9.220</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.220</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.220'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-02-28T14:42:27Z</updated>
<entry>
<title>drm/mediatek: handle events when enabling/disabling crtc</title>
<updated>2020-02-28T14:42:27Z</updated>
<author>
<name>Bibby Hsieh</name>
<email>bibby.hsieh@mediatek.com</email>
</author>
<published>2019-12-10T05:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a316f73b09fdf893ed7f525afb72e28cd8165288'/>
<id>urn:sha1:a316f73b09fdf893ed7f525afb72e28cd8165288</id>
<content type='text'>
[ Upstream commit 411f5c1eacfebb1f6e40b653d29447cdfe7282aa ]

The driver currently handles vblank events only when updating planes on
an already enabled CRTC. The atomic update API however allows requesting
an event when enabling or disabling a CRTC. This currently leads to
event objects being leaked in the kernel and to events not being sent
out. Fix it.

Signed-off-by: Bibby Hsieh &lt;bibby.hsieh@mediatek.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto</title>
<updated>2019-09-21T05:14:07Z</updated>
<author>
<name>Nishka Dasgupta</name>
<email>nishkadg.linux@gmail.com</email>
</author>
<published>2019-07-06T13:30:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=22571a43d06412a7681de4d7ee383b70a73d8e43'/>
<id>urn:sha1:22571a43d06412a7681de4d7ee383b70a73d8e43</id>
<content type='text'>
commit 165d42c012be69900f0e2f8545626cb9e7d4a832 upstream.

Each iteration of for_each_child_of_node puts the previous
node, but in the case of a goto from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
goto in two places.
Issue found with Coccinelle.

Fixes: 119f5173628a (drm/mediatek: Add DRM Driver for Mediatek SoC MT8173)

Signed-off-by: Nishka Dasgupta &lt;nishkadg.linux@gmail.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/mediatek: fix unbind functions</title>
<updated>2019-07-10T07:55:43Z</updated>
<author>
<name>Hsin-Yi Wang</name>
<email>hsinyi@chromium.org</email>
</author>
<published>2019-05-29T10:25:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9c6c4d8ff554d8241d546e12a120c075c58f440'/>
<id>urn:sha1:b9c6c4d8ff554d8241d546e12a120c075c58f440</id>
<content type='text'>
[ Upstream commit 8fd7a37b191f93737f6280a9b5de65f98acc12c9 ]

detatch panel in mtk_dsi_destroy_conn_enc(), since .bind will try to
attach it again.

Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver")
Signed-off-by: Hsin-Yi Wang &lt;hsinyi@chromium.org&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: fix possible object reference leak</title>
<updated>2019-05-10T15:52:09Z</updated>
<author>
<name>Wen Yang</name>
<email>wen.yang99@zte.com.cn</email>
</author>
<published>2019-04-03T16:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=684a9e97ba19bfde873f245f8bb198625f9d3ba5'/>
<id>urn:sha1:684a9e97ba19bfde873f245f8bb198625f9d3ba5</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>
</entry>
<entry>
<title>drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()</title>
<updated>2019-05-10T15:52:08Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2019-03-28T14:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=65dabcd68459e0debca3cbbb7e7610546ae3087a'/>
<id>urn:sha1:65dabcd68459e0debca3cbbb7e7610546ae3087a</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>
</entry>
<entry>
<title>drm/mediatek: fix OF sibling-node lookup</title>
<updated>2018-12-08T12:05:07Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2018-08-27T08:21:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d0095c5211b9b9ac5452eec0aa1320936ccd175e'/>
<id>urn:sha1:d0095c5211b9b9ac5452eec0aa1320936ccd175e</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;
[ johan: backport to 4.9 ]
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: don't use drm_put_dev</title>
<updated>2017-11-30T08:39:13Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-12-08T11:07:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8068342e9f55d3b9dedfbfc1516adb0340a07f10'/>
<id>urn:sha1:8068342e9f55d3b9dedfbfc1516adb0340a07f10</id>
<content type='text'>
[ Upstream commit ae9d2daecf086958a41ad216152ec208d70ba325 ]

fsl is already fully demidlayered in the probe function, but for
convenience stuck with drm_put_dev. Call the unregister/unref parts
separately, to make sure this driver works correct.

Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20161208110739.24417-3-daniel.vetter@ffwll.ch
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake</title>
<updated>2017-06-24T05:11:14Z</updated>
<author>
<name>YYS</name>
<email>nickey.yang@rock-chips.com</email>
</author>
<published>2017-03-21T08:27:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5899b635ecc7a8c4ae5007f2e74250ec4297feba'/>
<id>urn:sha1:5899b635ecc7a8c4ae5007f2e74250ec4297feba</id>
<content type='text'>
commit 014580ffab654bb83256783a2b185cf6c06dffaa upstream.

mtk_hdmi_setup_vendor_specific_infoframe will return before handle
mtk_hdmi_hw_send_info_frame.Because hdmi_vendor_infoframe_pack
returns the number of bytes packed into the binary buffer or
a negative error code on failure.
So correct it.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Signed-off-by: Nickey Yang &lt;nickey.yang@rock-chips.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/mediatek: fix null pointer dereference</title>
<updated>2016-11-24T06:53:15Z</updated>
<author>
<name>Matthias Brugger</name>
<email>matthias.bgg@gmail.com</email>
</author>
<published>2016-11-18T10:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5ad45307d990020b25a8f7486178b6e033790f70'/>
<id>urn:sha1:5ad45307d990020b25a8f7486178b6e033790f70</id>
<content type='text'>
The probe function requests the interrupt before initializing
the ddp component. Which leads to a null pointer dereference at boot.
Fix this by requesting the interrput after all components got
initialized properly.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC
MT8173.")
Signed-off-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;

Change-Id: I57193a7ab554dfb37c35a455900689333adf511c
</content>
</entry>
<entry>
<title>drm/mediatek: fixed the calc method of data rate per lane</title>
<updated>2016-11-24T06:53:14Z</updated>
<author>
<name>Jitao Shi</name>
<email>jitao.shi@mediatek.com</email>
</author>
<published>2016-11-16T03:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f6c872397028837c80685ee96c4011c62abe9a73'/>
<id>urn:sha1:f6c872397028837c80685ee96c4011c62abe9a73</id>
<content type='text'>
Tune dsi frame rate by pixel clock, dsi add some extra signal (i.e.
Tlpx, Ths-prepare, Ths-zero, Ths-trail,Ths-exit) when enter and exit LP
mode, those signals will cause h-time larger than normal and reduce FPS.
So need to multiply a coefficient to offset the extra signal's effect.
  coefficient = ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+
		 Ths_trail+Ths_exit)/(htotal*bpp/lane_number)

Signed-off-by: Jitao Shi &lt;jitao.shi@mediatek.com&gt;
Reviewed-by: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
</content>
</entry>
</feed>
