[PATCH v4 1/5] drm/mediatek: Support "None" blending in OVL

2024-07-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drive

[PATCH v4 5/5] drm/mediatek: Support alpha blending in display driver

2024-07-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. For more information, there are three pixel blend modes in DRM driver: "None",

[PATCH v4 4/5] drm/mediatek: Support "Pre-multiplied" blending in Mixer

2024-07-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode in Mixer. Before this patch, only the coverage mode is supported. To replace the default setting that is set in mtk_ethdr_config(), we change mtk_ddp_write_mask() to mtk_ddp_write(), and this change will also reset the NON_PREMU

[PATCH v4 2/5] drm/mediatek: Support "None" blending in Mixer

2024-07-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_

[PATCH v4 3/5] drm/mediatek: Support "Pre-multiplied" blending in OVL

2024-07-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode on in OVL. Before this patch, only the "coverage" mode is supported. As whether OVL_CON_CLRFMT_MAN bit is enabled, (3 << 12) means different formats in the datasheet. To prevent misunderstandings going forward, instead of reusin

[PATCH v4 0/5] Support alpha blending in MTK display driver

2024-07-16 Thread Hsiao Chien Sung via B4 Relay
Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. Signed-off-by: Hsiao Chien Sung --- Changes in v4: - Add more information to the commit message - Link

[PATCH v3 5/5] drm/mediatek: Support alpha blending in display driver

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. For more information, there are three pixel blend modes in DRM driver: "None",

[PATCH v3 2/5] drm/mediatek: Support "None" blending in Mixer

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu/drm/mediatek/mtk_et

[PATCH v3 4/5] drm/mediatek: Support "Pre-multiplied" blending in Mixer

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode in Mixer. Before this patch, only the coverage mode is supported. To replace the default setting that is set in mtk_ethdr_config(), we change mtk_ddp_write_mask() to mtk_ddp_write(), and this change will also reset the NON_PREMU

[PATCH v3 3/5] drm/mediatek: Support "Pre-multiplied" blending in OVL

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode on in OVL. Before this patch, only the "coverage" mode is supported. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 32 +--- 1 file changed, 25 ins

[PATCH v3 0/5] Support alpha blending in MTK display driver

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. Signed-off-by: Hsiao Chien Sung --- Changes in v3: - Remove the Change-Id - Link to v2: https://lore.

[PATCH v3 1/5] drm/mediatek: Support "None" blending in OVL

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drive

[PATCH v2 1/5] drm/mediatek: Support "None" blending in OVL

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drive

[PATCH v2 0/5] Support alpha blending in MTK display driver

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. Signed-off-by: Hsiao Chien Sung --- Changes in v2: - Remove unnecessary codes - Add more information t

[PATCH v2 2/5] drm/mediatek: Support "None" blending in Mixer

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Change-Id: I9455c367bb74b75461935ecf4a3eb8e429f6e95e Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/me

[PATCH v2 5/5] drm/mediatek: Support alpha blending in display driver

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. For more information, there are three pixel blend modes in DRM driver: "None",

[PATCH v2 4/5] drm/mediatek: Support "Pre-multiplied" blending in Mixer

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode in Mixer. Before this patch, only the coverage mode is supported. To replace the default setting that is set in mtk_ethdr_config(), we change mtk_ddp_write_mask() to mtk_ddp_write(), and this change will also reset the NON_PREMU

[PATCH v2 3/5] drm/mediatek: Support "Pre-multiplied" blending in OVL

2024-07-10 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode on in OVL. Before this patch, only the "coverage" mode is supported. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 32 +--- 1 file changed, 25 ins

[PATCH 3/5] drm/mediatek: Support "Pre-multiplied" blending in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode on in OVL. Before this patch, only the "coverage" mode is supported. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 32 +--- 1 file changed, 25 insertions(+), 7 deleti

[PATCH 2/5] drm/mediatek: Support "None" blending in Mixer

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu/drm/med

[PATCH 5/5] drm/mediatek: Support alpha blending in display driver

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. For more information, there are three pixel blend modes in DRM driver: "None",

[PATCH 4/5] drm/mediatek: Support "Pre-multiplied" blending in Mixer

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "Pre-multiplied" alpha blending mode in Mixer. Before this patch, only the coverage mode is supported. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/m

[PATCH 0/5] Support alpha blending in MTK display driver

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by adding correct blend mode property when the planes init. Before this patch, only the "Coverage" mode (default) is supported. Signed-off-by: Hsiao Chien Sung --- Hsiao Chien Sung (5): drm/mediatek: Support "None" blending

[PATCH 1/5] drm/mediatek: Support "None" blending in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drive

[PATCH v3 08/14] drm/mediatek: Add DRM_MODE_ROTATE_0 to rotation property

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Always add DRM_MODE_ROTATE_0 to rotation property to meet IGT's (Intel GPU Tools) requirement. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung ---

[PATCH v3 03/14] drm/mediatek: Fix XRGB setting error in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 Rev

[PATCH v3 10/14] drm/mediatek: Set DRM mode configs accordingly

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 (> 4096). - The test "graphics.IgtKms.kms_cursor_crc" checks if the cursor si

[PATCH v3 12/14] drm/mediatek: Support RGBA8888 and RGBX8888 in OVL on MT8195

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support RGBA and RGBX formats in OVL on MT8195. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c

[PATCH v3 02/14] drm/mediatek: Use 8-bit alpha in ETHDR

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 9-bit alpha (max=0x100) is designed for special HDR related calculation, which should be disabled by default. Change the alpha value from 0x100 to 0xff in 8-bit form. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Reviewed-by: AngeloGioacchin

[PATCH v3 09/14] drm/mediatek: Add new color format MACROs in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Define new color formats to hide the bit operation in the MACROs to make the switch statement more concise. Change the MACROs to align the naming rule in DRM. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/dr

[PATCH v3 07/14] drm/mediatek: Add OVL compatible name for MT8195

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Add OVL compatible name for MT8195. Without this commit, DRM won't work after modifying the device tree. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien S

[PATCH v3 11/14] drm/mediatek: Support more 10bit formats in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support more 10bit formats in OVL. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --gi

[PATCH v3 13/14] drm/mediatek: Support DRM plane alpha in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c |

[PATCH v3 00/14] This series fixes the errors of MediaTek display driver found by IGT.

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
Signed-off-by: Hsiao Chien Sung --- Changes in v3: - Modify the commit message - Add a patch to fix destination alpha error in OVL - Link to v2: https://lore.kernel.org/all/20240619-mediatek-drm-next-v2-0-abf68f46f...@mediatek.com --- Changes in v2: - Seperate the changes that belong to another

[PATCH v3 14/14] drm/mediatek: Support DRM plane alpha in Mixer

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 6 +

[PATCH v3 05/14] drm/mediatek: Fix destination alpha error in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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

[PATCH v3 06/14] drm/mediatek: Turn off the layers with zero width or height

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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/me

[PATCH v3 01/14] drm/mediatek: Add missing plane settings when async update

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Fix an issue that plane coordinate was not saved when calling async update. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver

[PATCH v3 04/14] drm/mediatek: Fix XRGB setting error in Mixer

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 Reviewed-by: AngeloGi

[PATCH v2 09/14] drm/mediatek: Set DRM mode configs accordingly

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 (> 4096). - The test "graphics.IgtKms.kms_cursor_crc" checks if the cursor si

[PATCH v2 00/14] Fix the errors of MediaTek display driver found by IGT

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
This series fixes the errors of MediaTek display driver found by IGT. Signed-off-by: Hsiao Chien Sung --- Changes in v2: - Seperate the changes that belong to another repo (driver/soc/mediatek) - Move the fix patches to the front of the series - Link to v1: https://lore.kernel.org/r/20240616-med

[PATCH v2 10/14] drm/mediatek: Support more 10bit formats in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support more 10bit formats in OVL. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --gi

[PATCH v2 12/14] drm/mediatek: Support DRM plane alpha in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH v2 14/14] drm/mediatek: Fix XRGB setting error in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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: AngeloGioa

[PATCH v2 13/14] drm/mediatek: Support DRM plane alpha in Mixer

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/g

[PATCH v2 11/14] drm/mediatek: Support RGBA8888 and RGBX8888 in OVL on MT8195

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support RGBA and RGBX formats in OVL on MT8195. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediate

[PATCH v2 03/14] drm/mediatek: Fix XRGB setting error in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 Rev

[PATCH v2 04/14] drm/mediatek: Fix XRGB setting error in Mixer

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 Reviewed-by: AngeloGi

[PATCH v2 02/14] drm/mediatek: Disable 9-bit alpha in ETHDR

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung When 9-bit alpha is enabled, its value will be converted from 0-255 to 0-256 (255 = not defined). This is designed for special HDR related calculation, which should be disabled by default, otherwise, alpha blending will not work correctly. Fixes: 119f5173628a ("drm/mediate

[PATCH v2 01/14] drm/mediatek: Add missing plane settings when async update

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Fix an issue that plane coordinate was not saved when calling async update. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/d

[PATCH v2 08/14] drm/mediatek: Add new color format MACROs in OVL

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Define new color formats to hide the bit operation in the MACROs to make the switch statement more concise. Change the MACROs to align the naming rule in DRM. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/dr

[PATCH v2 07/14] drm/mediatek: Add DRM_MODE_ROTATE_0 to rotation property

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Always add DRM_MODE_ROTATE_0 to rotation property to meet IGT's (Intel GPU Tools) requirement. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ddp_comp.h | 6 +- drivers/gpu/drm/mediatek/

[PATCH v2 06/14] drm/mediatek: Add OVL compatible name for MT8195

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Add OVL compatible name for MT8195. Without this commit, DRM won't work after modifying the device tree. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 1 file changed, 2 ins

[PATCH v2 05/14] drm/mediatek: Turn off the layers with zero width or height

2024-06-19 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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/me

[PATCH 05/13] drm/mediatek: Set DRM mode configs accordingly

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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 (> 4096). - The test "graphics.IgtKms.kms_cursor_crc" checks if the cursor si

[PATCH 04/13] drm/mediatek: Add DRM_MODE_ROTATE_0 to rotation property

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Always add DRM_MODE_ROTATE_0 to rotation property to meet IGT's (Intel GPU Tools) requirement. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ddp_comp.h | 6 +- drivers/gpu/drm/mediatek/

[PATCH 10/13] drm/mediatek: Fix XRGB setting error in Mixer

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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") Signed-off-by: Hsiao Chien Sung Reviewed

[PATCH 12/13] drm/mediatek: Support DRM plane alpha in OVL

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drive

[PATCH 09/13] drm/mediatek: Fix XRGB setting error in OVL

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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.") Signed-off-by: Hsiao Ch

[PATCH 01/13] soc: mediatek: Disable 9-bit alpha in ETHDR

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung When 9-bit alpha is enabled, its value will be converted from 0-255 to 0-256 (255 = not defined). This is designed for special HDR related calculation, which should be disabled by default, otherwise, alpha blending will not work correctly. Reviewed-by: AngeloGioacchino Del

[PATCH 11/13] drm/mediatek: Add new color format MACROs in OVL

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Define new color formats to hide the bit operation in the MACROs to make the switch statement more concise. Change the MACROs to align the naming rule in DRM. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 14 ---

[PATCH 00/13] Fix the errors of MediaTek display driver found by IGT

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
This series fixes the errors of MediaTek display driver found by IGT. Signed-off-by: Hsiao Chien Sung --- Hsiao Chien Sung (13): soc: mediatek: Disable 9-bit alpha in ETHDR drm/mediatek: Add OVL compatible name for MT8195 drm/mediatek: Add missing plane settings when async updat

[PATCH 03/13] drm/mediatek: Add missing plane settings when async update

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Fix an issue that plane coordinate was not saved when calling async update. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/d

[PATCH 13/13] drm/mediatek: Support DRM plane alpha in Mixer

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu

[PATCH 07/13] drm/mediatek: Support more 10bit formats in OVL

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support more 10bit formats in OVL. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --gi

[PATCH 08/13] drm/mediatek: Support RGBA8888 and RGBX8888 in OVL on MT8195

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Support RGBA and RGBX formats in OVL on MT8195. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediate

[PATCH 02/13] drm/mediatek: Add OVL compatible name for MT8195

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung Add OVL compatible name for MT8195. Without this commit, DRM won't work after modifying the device tree. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 1 file changed, 2 ins

[PATCH 06/13] drm/mediatek: Turn off the layers with zero width or height

2024-06-16 Thread Hsiao Chien Sung via B4 Relay
From: Hsiao Chien Sung 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/me