<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/mediatek, branch v6.10.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.10.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.10.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-03T07:00:02+00:00</updated>
<entry>
<title>drm/mediatek/dp: Fix spurious kfree()</title>
<updated>2024-08-03T07:00:02+00:00</updated>
<author>
<name>Michael Walle</name>
<email>mwalle@kernel.org</email>
</author>
<published>2024-06-04T08:33:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5d98f78ef3aed91cba08bb41f4dd12c34c67b08'/>
<id>urn:sha1:c5d98f78ef3aed91cba08bb41f4dd12c34c67b08</id>
<content type='text'>
[ Upstream commit 8ad49a92cff4bab13eb2f2725243f5f31eff3f3b ]

drm_edid_to_sad() might return an error or just zero. If that is the
case, we must not free the SADs because there was no allocation in
the first place.

Fixes: dab12fa8d2bd ("drm/mediatek/dp: fix memory leak on -&gt;get_edid callback audio detection")
Signed-off-by: Michael Walle &lt;mwalle@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20240604083337.1879188-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: dpi/dsi: Fix possible_crtcs calculation</title>
<updated>2024-08-03T07:00:02+00:00</updated>
<author>
<name>Michael Walle</name>
<email>mwalle@kernel.org</email>
</author>
<published>2024-06-06T09:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d44a63b4860a0a2ae64ab1a075b92f92437ba30'/>
<id>urn:sha1:7d44a63b4860a0a2ae64ab1a075b92f92437ba30</id>
<content type='text'>
[ Upstream commit 9ff6df49e6cbcc9834865870d7c4f3059b0891d3 ]

mtk_find_possible_crtcs() assumes that the main path will always have
the CRTC with id 0, the ext id 1 and the third id 2. This is only true
if the paths are all available. But paths are optional (see also
comment in mtk_drm_kms_init()), e.g. the main path might not be enabled
or available at all. Then the CRTC IDs will shift one up, e.g. ext will
be 0 and the third path will be 1.

To fix that, dynamically calculate the IDs by the presence of the paths.

While at it, make the return code a signed one and return -ENODEV if no
path is found and handle the error in the callers.

Fixes: 5aa8e7647676 ("drm/mediatek: dpi/dsi: Change the getting possible_crtc way")
Suggested-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Signed-off-by: Michael Walle &lt;mwalle@kernel.org&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240606092122.2026313-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: Remove less-than-zero comparison of an unsigned value</title>
<updated>2024-08-03T07:00:02+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-14T03:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8e7d26610fffc5fcaaaae6d98131234dcb57ed4'/>
<id>urn:sha1:b8e7d26610fffc5fcaaaae6d98131234dcb57ed4</id>
<content type='text'>
[ Upstream commit 4ed9dd7fde22ed614384c03f8049723cbe7e6a58 ]

Fix a Coverity error that less-than-zero comparison of an unsigned value
is never true.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240614034937.23978-1-shawn.sung@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: Set DRM mode configs accordingly</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a4ce184dcc6e8e0fb7745d9ff9646bbd3db678d'/>
<id>urn:sha1:8a4ce184dcc6e8e0fb7745d9ff9646bbd3db678d</id>
<content type='text'>
[ Upstream commit a4c9410b31cac463599898edb5111ca9bc0810bd ]

Set DRM mode configs limitation according to the hardware capabilities
and pass the IGT checks as below:

- The test "graphics.IgtKms.kms_plane" requires a frame buffer with
  width of 4512 pixels (&gt; 4096).
- The test "graphics.IgtKms.kms_cursor_crc" checks if the cursor size is
  defined, and run the test with cursor size from 1x1 to 512x512.

Please notice that the test conditions may change as IGT is updated.

Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-10-a9d62d2e2c7e@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 DRM_MODE_ROTATE_0 to rotation property</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d4c45d40198094785afd39b56463eeeb5a1803a'/>
<id>urn:sha1:0d4c45d40198094785afd39b56463eeeb5a1803a</id>
<content type='text'>
[ Upstream commit 74608d8feefd1675388f23362aac8df4ac3af931 ]

Always add DRM_MODE_ROTATE_0 to rotation property to meet
IGT's (Intel GPU Tools) requirement.

Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-8-a9d62d2e2c7e@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 OVL compatible name for MT8195</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19ef723f6edd6345a13f3f7686f0ede7400a2109'/>
<id>urn:sha1:19ef723f6edd6345a13f3f7686f0ede7400a2109</id>
<content type='text'>
[ Upstream commit 6fb7a0985fd16868b5d72eb3e3de7524a6000e6e ]

Add OVL compatible name for MT8195.
Without this commit, DRM won't work after modifying the device tree.

Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-7-a9d62d2e2c7e@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: Turn off the layers with zero width or height</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a063acc5d33d655dc9504e54d5debcac9919837d'/>
<id>urn:sha1:a063acc5d33d655dc9504e54d5debcac9919837d</id>
<content type='text'>
[ Upstream commit 6b9946f4550d8dad8bc1af2db97286ca449af786 ]

We found that IGT (Intel GPU Tool) will try to commit layers with
zero width or height and lead to undefined behaviors in hardware.
Disable the layers in such a situation.

Fixes: 453c3364632a ("drm/mediatek: Add ovl_adaptor support for MT8195")
Fixes: d886c0009bd0 ("drm/mediatek: Add ETHDR support for MT8195")
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-6-a9d62d2e2c7e@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 destination alpha error in OVL</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e28b7aa8be1444781077ea8301c8d938343f109'/>
<id>urn:sha1:5e28b7aa8be1444781077ea8301c8d938343f109</id>
<content type='text'>
[ Upstream commit 31c0fbf67c8c0bb38d7fb21d404ea3dbd619d99e ]

The formula of Coverage alpha blending is:
dst.a = dst.a * (0xff - src.a * SCA / 0xff) / 0xff
      + src.a * SCA / 0xff

dst.a: destination alpha
src.a: pixel alpha
SCA  : plane alpha

When SCA = 0xff, the formula becomes:
dst.a = dst.a * (0xff - src.a) + src.a

This patch is to set the destination alpha (background) to 0xff:
- When dst.a = 0    (before), dst.a = src.a
- When dst.a = 0xff (after) , dst.a = 0xff * (0xff - src.a) + src.a

According to the fomula above:
- When src.a = 0   , dst.a = 0
- When src.a = 0xff, dst.a = 0xff
This two cases are just still correct. But when src.a is
between 0 and 0xff, the difference starts to appear

Fixes: 616443ca577e ("drm/mediatek: Move cmdq_reg info from struct mtk_ddp_comp to sub driver private data")
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-5-a9d62d2e2c7e@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 XRGB setting error in Mixer</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c3411d859f1615467592b38dab11ac20cc9185a'/>
<id>urn:sha1:8c3411d859f1615467592b38dab11ac20cc9185a</id>
<content type='text'>
[ Upstream commit 8e418bee401b7cfd0bc40d187afea2c6b08b44ec ]

Although the alpha channel in XRGB formats can be ignored, ALPHA_CON
must be configured accordingly when using XRGB formats or it will still
affects CRC generation.

Fixes: d886c0009bd0 ("drm/mediatek: Add ETHDR support for MT8195")
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-4-a9d62d2e2c7e@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 XRGB setting error in OVL</title>
<updated>2024-08-03T06:59:58+00:00</updated>
<author>
<name>Hsiao Chien Sung</name>
<email>shawn.sung@mediatek.com</email>
</author>
<published>2024-06-19T16:38:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91ef5af76f7ec7383930d2884856808d707c527d'/>
<id>urn:sha1:91ef5af76f7ec7383930d2884856808d707c527d</id>
<content type='text'>
[ Upstream commit 765f284f1fe172573021056f7e337ee53f252969 ]

CONST_BLD must be enabled for XRGB formats although the alpha channel
can be ignored, or OVL will still read the value from memory.
This error only affects CRC generation.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Reviewed-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Hsiao Chien Sung &lt;shawn.sung@mediatek.com&gt;
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240620-igt-v3-3-a9d62d2e2c7e@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>
