<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/mediatek, branch v6.1.53</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.53</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.53'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-09-13T07:42:43+00:00</updated>
<entry>
<title>drm/mediatek: Fix potential memory leak if vmap() fail</title>
<updated>2023-09-13T07:42:43+00:00</updated>
<author>
<name>Sui Jingfeng</name>
<email>suijingfeng@loongson.cn</email>
</author>
<published>2023-07-06T13:40:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=867aa88c9efa512aaf3902ea2cbe4f2ae1a4d2d0'/>
<id>urn:sha1:867aa88c9efa512aaf3902ea2cbe4f2ae1a4d2d0</id>
<content type='text'>
[ Upstream commit 379091e0f6d179d1a084c65de90fa44583b14a70 ]

Also return -ENOMEM if such a failure happens, the implement should take
responsibility for the error handling.

Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function")
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Signed-off-by: Sui Jingfeng &lt;suijingfeng@loongson.cn&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230706134000.130098-1-suijingfeng@loongson.cn/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: Remove freeing not dynamic allocated memory</title>
<updated>2023-09-13T07:42:43+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2023-07-14T09:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d6a25792fc1b7b434d855d317e4d77b3cab7cae'/>
<id>urn:sha1:4d6a25792fc1b7b434d855d317e4d77b3cab7cae</id>
<content type='text'>
[ Upstream commit 27b9e2ea3f2757da26bb8280e46f7fdbb1acb219 ]

Fixing the coverity issue of:
mtk_drm_cmdq_pkt_destroy frees address of mtk_crtc-&gt;cmdq_handle

So remove the free function.

Fixes: 7627122fd1c0 ("drm/mediatek: Add cmdq_handle in mtk_crtc")
Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230714094908.13087-2-jason-jh.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: dp: Add missing error checks in mtk_dp_parse_capabilities</title>
<updated>2023-09-13T07:42:43+00:00</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
<email>angelogioacchino.delregno@collabora.com</email>
</author>
<published>2023-07-25T07:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b625a6eaf2bf4ec7f962a26805b6d1927e3e8442'/>
<id>urn:sha1:b625a6eaf2bf4ec7f962a26805b6d1927e3e8442</id>
<content type='text'>
[ Upstream commit cfc146137a9f12e883ba64bc496b6da4d23f26d5 ]

If reading the RX capabilities fails the training pattern will be set
wrongly: add error checking for drm_dp_read_dpcd_caps() and return if
anything went wrong with it.

While at it, also add a less critical error check when writing to
clear the ESI0 IRQ vector.

Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Tested-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230725073234.55892-2-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: dp: Change the aux retries times when receiving AUX_DEFER</title>
<updated>2023-05-11T14:03:12+00:00</updated>
<author>
<name>Xinlei Lee</name>
<email>xinlei.lee@mediatek.com</email>
</author>
<published>2023-03-29T06:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=41a51318ab37d17946009d8cd9931553651e3347'/>
<id>urn:sha1:41a51318ab37d17946009d8cd9931553651e3347</id>
<content type='text'>
[ Upstream commit 9243d70e05c5989f84f840612965f96b524da925 ]

DP 1.4a Section 2.8.7.1.5.6.1:
A DP Source device shall retry at least seven times upon receiving
AUX_DEFER before giving up the AUX transaction.

The drm_dp_i2c_do_msg() function in the drm_dp_helper.c file will
judge the status of the msg-&gt;reply parameter passed to aux_transfer
for different processing.

Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Signed-off-by: Xinlei Lee &lt;xinlei.lee@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1680072203-10394-1-git-send-email-xinlei.lee@mediatek.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: dp: Only trigger DRM HPD events if bridge is attached</title>
<updated>2023-05-11T14:03:08+00:00</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wenst@chromium.org</email>
</author>
<published>2023-02-02T04:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6524d3d58797975cc40b85be1e9b89721b4e8d0b'/>
<id>urn:sha1:6524d3d58797975cc40b85be1e9b89721b4e8d0b</id>
<content type='text'>
[ Upstream commit 36b617f7e4ae663fcadd202ea061ca695ca75539 ]

The MediaTek DisplayPort interface bridge driver starts its interrupts
as soon as its probed. However when the interrupts trigger the bridge
might not have been attached to a DRM device. As drm_helper_hpd_irq_event()
does not check whether the passed in drm_device is valid or not, a NULL
pointer passed in results in a kernel NULL pointer dereference in it.

Check whether the bridge is attached and only trigger an HPD event if
it is.

Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: Guillaume Ranquet &lt;granquet@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230202045734.2773503-1-wenst@chromium.org/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: Clean dangling pointer on bind error path</title>
<updated>2023-03-10T08:33:17+00:00</updated>
<author>
<name>Nícolas F. R. A. Prado</name>
<email>nfraprado@collabora.com</email>
</author>
<published>2022-11-22T14:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7b551a501fa714890e55bae73efede1185728d72'/>
<id>urn:sha1:7b551a501fa714890e55bae73efede1185728d72</id>
<content type='text'>
[ Upstream commit 36aa8c61af55675ed967900fbe5deb32d776f051 ]

mtk_drm_bind() can fail, in which case drm_dev_put() is called,
destroying the drm_device object. However a pointer to it was still
being held in the private object, and that pointer would be passed along
to DRM in mtk_drm_sys_prepare() if a suspend were triggered at that
point, resulting in a panic. Clean the pointer when destroying the
object in the error path to prevent this from happening.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221122143949.3493104-1-nfraprado@collabora.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc</title>
<updated>2023-03-10T08:33:17+00:00</updated>
<author>
<name>ruanjinjie</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2022-12-05T09:51:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67ea657c7891c2f86a7750395640d9bdf2555926'/>
<id>urn:sha1:67ea657c7891c2f86a7750395640d9bdf2555926</id>
<content type='text'>
[ Upstream commit 5bf1e3bd7da625ccf9a22c8cb7d65271e6e47f4c ]

As the devm_kcalloc may return NULL, the return value needs to be checked
to avoid NULL poineter dereference.

Fixes: 31c5558dae05 ("drm/mediatek: Refactor plane init")
Signed-off-by: ruanjinjie &lt;ruanjinjie@huawei.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20221205095115.2905090-1-ruanjinjie@huawei.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: Drop unbalanced obj unref</title>
<updated>2023-03-10T08:33:17+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@chromium.org</email>
</author>
<published>2023-01-19T23:12:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c21de3b3bcd1a5e9ac05c45b8d52812eb9d64782'/>
<id>urn:sha1:c21de3b3bcd1a5e9ac05c45b8d52812eb9d64782</id>
<content type='text'>
[ Upstream commit 4deef811828e87e26a978d5d6433b261d4713849 ]

In the error path, mtk_drm_gem_object_mmap() is dropping an obj
reference that it doesn't own.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Rob Clark &lt;robdclark@chromium.org&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230119231255.2883365-1-robdclark@gmail.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: Use NULL instead of 0 for NULL pointer</title>
<updated>2023-03-10T08:33:17+00:00</updated>
<author>
<name>Miles Chen</name>
<email>miles.chen@mediatek.com</email>
</author>
<published>2023-01-11T02:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=407f40df3b603e47edbd52dbbd25d73dbd985524'/>
<id>urn:sha1:407f40df3b603e47edbd52dbbd25d73dbd985524</id>
<content type='text'>
[ Upstream commit 4744cde06f57dd6fbaac468663b1fe2f653eaa16 ]

Use NULL for NULL pointer to fix the following sparse warning:
drivers/gpu/drm/mediatek/mtk_drm_gem.c:265:27: sparse: warning: Using plain integer as NULL pointer

Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function")
Signed-off-by: Miles Chen &lt;miles.chen@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230111024443.24559-1-miles.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd</title>
<updated>2023-03-10T08:33:17+00:00</updated>
<author>
<name>Xinlei Lee</name>
<email>xinlei.lee@mediatek.com</email>
</author>
<published>2023-01-10T05:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a46566628b1c399e117e5c08df4afae3c44df9f'/>
<id>urn:sha1:6a46566628b1c399e117e5c08df4afae3c44df9f</id>
<content type='text'>
[ Upstream commit 91aeaed2c1147e3b1157dc084d23f190856a6c23 ]

According to Figure 16 Turnaround Procedure on page 36 in [1], you
can see the status of LP-00 -&gt; LP10 -&gt; LP11. This state can correspond
to the state of DSI from LP00 -&gt; LP11 in mtk_dsi_lane_ready function
in mtk_dsi.c.

LP-00 -&gt; LP10 -&gt; LP11 takes about 2*TLPX time (refer to [1] page 51
to see that TLPX is 50ns)

The delay at the end of the mtk_dsi_lane_ready function should be
greater than the 2*TLPX specified by the DSI spec, and less than
the time specified by the DSI_RX (generally 6ms to 40ms), to avoid
problems caused by the RX specification

[1]:mipi_D-PHY_specification_v1-1

Fixes: 39e8d062b03c ("drm/mediatek: Keep dsi as LP00 before dcs cmds transfer")
Signed-off-by: Xinlei Lee &lt;xinlei.lee@mediatek.com&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1673330093-6771-2-git-send-email-xinlei.lee@mediatek.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
