<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/mediatek, branch v6.6.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-12-20T16:02:02+00:00</updated>
<entry>
<title>drm/mediatek: Fix access violation in mtk_drm_crtc_dma_dev_get</title>
<updated>2023-12-20T16:02:02+00:00</updated>
<author>
<name>Stuart Lee</name>
<email>stuart.lee@mediatek.com</email>
</author>
<published>2023-11-10T01:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03e63e497a404f444f5af25e120739da3a4f03ff'/>
<id>urn:sha1:03e63e497a404f444f5af25e120739da3a4f03ff</id>
<content type='text'>
commit b6961d187fcd138981b8707dac87b9fcdbfe75d1 upstream.

Add error handling to check NULL input in
mtk_drm_crtc_dma_dev_get function.

While display path is not configured correctly, none of crtc is
established. So the caller of mtk_drm_crtc_dma_dev_get may pass
input parameter *crtc as NULL, Which may cause coredump when
we try to get the container of NULL pointer.

Fixes: cb1d6bcca542 ("drm/mediatek: Add dma dev get function")
Signed-off-by: Stuart Lee &lt;stuart.lee@mediatek.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: AngeloGioacchino DEl Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Tested-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20231110012914.14884-2-stuart.lee@mediatek.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: Add spinlock for setting vblank event in atomic_begin</title>
<updated>2023-12-20T16:01:54+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2023-09-20T09:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d6e9cb7b95165b40e7718b017c16b543d93411a'/>
<id>urn:sha1:7d6e9cb7b95165b40e7718b017c16b543d93411a</id>
<content type='text'>
[ Upstream commit fe4c5f662097978b6c91c23a13c24ed92339a180 ]

Add spinlock protection to avoid race condition on vblank event
between mtk_drm_crtc_atomic_begin() and mtk_drm_finish_page_flip().

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Suggested-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Reviewed-by: Fei Shao &lt;fshao@chromium.org&gt;
Tested-by: Fei Shao &lt;fshao@chromium.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230920090658.31181-1-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: fix kernel oops if no crtc is found</title>
<updated>2023-12-20T16:01:54+00:00</updated>
<author>
<name>Michael Walle</name>
<email>mwalle@kernel.org</email>
</author>
<published>2023-09-05T08:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8964524158ace2f0fcc055e663ab5308cae40175'/>
<id>urn:sha1:8964524158ace2f0fcc055e663ab5308cae40175</id>
<content type='text'>
[ Upstream commit 4662817aed5a9d6c695658d0105d8ff4b84ac6cb ]

drm_crtc_from_index(0) might return NULL if there are no CRTCs
registered at all which will lead to a kernel oops in
mtk_drm_crtc_dma_dev_get(). Add the missing return value check.

Fixes: 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195")
Signed-off-by: Michael Walle &lt;mwalle@kernel.org&gt;
Reviewed-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Tested-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Tested-by: Eugen Hristev &lt;eugen.hristev@collabora.com&gt;
Reviewed-by: Eugen Hristev &lt;eugen.hristev@collabora.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230905084922.3908121-1-mwalle@kernel.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/dp: fix memory leak on -&gt;get_edid callback error path</title>
<updated>2023-11-28T17:20:12+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2023-09-14T13:10:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4aa9db1eab76654aedbebe49d336bf6bc8b397d6'/>
<id>urn:sha1:4aa9db1eab76654aedbebe49d336bf6bc8b397d6</id>
<content type='text'>
commit fcaf9761fd5884a64eaac48536f8c27ecfd2e6bc upstream.

Setting new_edid to NULL leaks the buffer.

Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Cc: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
Cc: Guillaume Ranquet &lt;granquet@baylibre.com&gt;
Cc: Bo-Chen Chen &lt;rex-bc.chen@mediatek.com&gt;
Cc: CK Hu &lt;ck.hu@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Cc: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: &lt;stable@vger.kernel.org&gt; # v6.1+
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Reviewed-by: Guillaume Ranquet &lt;granquet@baylibre.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230914131058.2472260-1-jani.nikula@intel.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek/dp: fix memory leak on -&gt;get_edid callback audio detection</title>
<updated>2023-11-28T17:20:12+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2023-09-14T15:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=658eaf65c3bd186ec1edf2f73b95647b2ce29efa'/>
<id>urn:sha1:658eaf65c3bd186ec1edf2f73b95647b2ce29efa</id>
<content type='text'>
commit dab12fa8d2bd3868cf2de485ed15a3feef28a13d upstream.

The sads returned by drm_edid_to_sad() needs to be freed.

Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195")
Cc: Guillaume Ranquet &lt;granquet@baylibre.com&gt;
Cc: Bo-Chen Chen &lt;rex-bc.chen@mediatek.com&gt;
Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Cc: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: &lt;stable@vger.kernel.org&gt; # v6.1+
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Reviewed-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230914155317.2511876-1-jani.nikula@intel.com/
Signed-off-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling</title>
<updated>2023-11-20T10:59:12+00:00</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
<email>angelogioacchino.delregno@collabora.com</email>
</author>
<published>2023-05-23T10:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f3ea1ec432d8db8640a396e88ebb1700e4d9103'/>
<id>urn:sha1:8f3ea1ec432d8db8640a396e88ebb1700e4d9103</id>
<content type='text'>
[ Upstream commit 5855d422a6f250f3518f43b49092c8e87a5e42be ]

Due to the initial confusion about MIPI_DSI_MODE_EOT_PACKET, properly
renamed to MIPI_DSI_MODE_NO_EOT_PACKET, reflecting its actual meaning,
both the DSI_TXRX_CON register setting for bit (HSTX_)DIS_EOT and the
later calculation for horizontal sync-active (HSA), back (HBP) and
front (HFP) porches got incorrect due to the logic being inverted.

This means that a number of settings were wrong because....:
 - DSI_TXRX_CON register setting: bit (HSTX_)DIS_EOT should be
   set in order to disable the End of Transmission packet;
 - Horizontal Sync and Back/Front porches: The delta used to
   calculate all of HSA, HBP and HFP should account for the
   additional EOT packet.

Before this change...
 - Bit (HSTX_)DIS_EOT was being set when EOT packet was enabled;
 - For HSA/HBP/HFP delta... all three were wrong, as words were
   added when EOT disabled, instead of when EOT packet enabled!

Invert the logic around flag MIPI_DSI_MODE_NO_EOT_PACKET in the
MediaTek DSI driver to fix the aforementioned issues.

Fixes: 8b2b99fd7931 ("drm/mediatek: dsi: Fine tune the line time caused by EOTp")
Fixes: c87d1c4b5b9a ("drm/mediatek: dsi: Use symbolized register definition")
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Tested-by: Michael Walle &lt;mwalle@kernel.org&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230523104234.7849-1-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: Fix iommu fault during crtc enabling</title>
<updated>2023-11-20T10:59:11+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2023-08-09T12:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12d322fc6e658417ec5febc443c3889937baea99'/>
<id>urn:sha1:12d322fc6e658417ec5febc443c3889937baea99</id>
<content type='text'>
[ Upstream commit 53412dc2905401207f264dc30890f6b9e41524a6 ]

The difference between drm_atomic_helper_commit_tail() and
drm_atomic_helper_commit_tail_rpm() is
drm_atomic_helper_commit_tail() will commit plane first and
then enable crtc, drm_atomic_helper_commit_tail_rpm() will
enable crtc first and then commit plane.

Before mediatek-drm enables crtc, the power and clk required
by OVL have not been turned on, so the commit plane cannot be
committed before crtc is enabled. That means OVL layer should
not be enabled before crtc is enabled.
Therefore, the atomic_commit_tail of mediatek-drm is hooked with
drm_atomic_helper_commit_tail_rpm().

Another reason is that the plane_state of drm_atomic_state is not
synchronized with the plane_state stored in mtk_crtc during crtc enablng,
so just set all planes to disabled.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230809125722.24112-3-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: Fix iommu fault by swapping FBs after updating plane state</title>
<updated>2023-11-20T10:59:11+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2023-08-09T12:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0776389bd8757f74f63dc756f4952ee2f7736097'/>
<id>urn:sha1:0776389bd8757f74f63dc756f4952ee2f7736097</id>
<content type='text'>
[ Upstream commit 3ec71e05ae6e7f46512e568ed81c92be589003dd ]

According to the comment in drm_atomic_helper_async_commit(),
we should make sure FBs have been swapped, so that cleanups in the
new_state performs a cleanup in the old FB.

So we should move swapping FBs after calling mtk_plane_update_new_state(),
to avoid using the old FB which could be freed.

Fixes: 1a64a7aff8da ("drm/mediatek: Fix cursor plane no update")
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/linux-mediatek/patch/20230809125722.24112-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: Add mmsys_dev_num to mt8188 vdosys0 driver data</title>
<updated>2023-11-20T10:59:11+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2023-10-04T02:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc46695b7c87b21bd9b9159143ff8b3baae07ca7'/>
<id>urn:sha1:bc46695b7c87b21bd9b9159143ff8b3baae07ca7</id>
<content type='text'>
[ Upstream commit ff64e4c31d969cdba20a41969edb3def15f3aaa0 ]

Add missing mmsys_dev_num to mt8188 vdosys0 driver data.

Fixes: 54b48080278a ("drm/mediatek: Add mediatek-drm of vdosys0 support for mt8188")
Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Fei Shao &lt;fshao@chromium.org&gt;
Tested-by: Fei Shao &lt;fshao@chromium.org&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20231004024013.18956-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: Fix coverity issue with unintentional integer overflow</title>
<updated>2023-11-20T10:59:09+00:00</updated>
<author>
<name>Jason-JH.Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2023-09-07T09:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96312a251d4dcee5d36e32edba3002bfde0ddd9c'/>
<id>urn:sha1:96312a251d4dcee5d36e32edba3002bfde0ddd9c</id>
<content type='text'>
[ Upstream commit b0b0d811eac6b4c52cb9ad632fa6384cf48869e7 ]

1. Instead of multiplying 2 variable of different types. Change to
assign a value of one variable and then multiply the other variable.

2. Add a int variable for multiplier calculation instead of calculating
different types multiplier with dma_addr_t variable directly.

Fixes: 1a64a7aff8da ("drm/mediatek: Fix cursor plane no update")
Signed-off-by: Jason-JH.Lin &lt;jason-jh.lin@mediatek.com&gt;
Reviewed-by: Alexandre Mergnat &lt;amergnat@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230907091425.9526-1-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>
</feed>
