* [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88
@ 2025-06-06 12:50 Louis-Alexis Eyraud
2025-06-11 9:07 ` AngeloGioacchino Del Regno
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Louis-Alexis Eyraud @ 2025-06-06 12:50 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: kernel, dri-devel, linux-mediatek, linux-kernel,
linux-arm-kernel, Louis-Alexis Eyraud
Reorder output format arrays in both MT8195 DPI and DP_INTF block
configuration by decreasing preference order instead of alphanumeric
one, as expected by the atomic_get_output_bus_fmts callback function
of drm_bridge controls, so the RGB ones are used first during the
bus format negotiation process.
Fixes: 20fa6a8fc588 ("drm/mediatek: mtk_dpi: Allow additional output formats on MT8195/88")
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 6fb85bc6487a019cdcdb3770dc06a1deab8d5bda..a2fdceadf209f6d2166e7523b82ca18c82c7d435 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -1095,7 +1095,6 @@ static const u32 mt8183_output_fmts[] = {
};
static const u32 mt8195_dpi_output_fmts[] = {
- MEDIA_BUS_FMT_BGR888_1X24,
MEDIA_BUS_FMT_RGB888_1X24,
MEDIA_BUS_FMT_RGB888_2X12_LE,
MEDIA_BUS_FMT_RGB888_2X12_BE,
@@ -1103,18 +1102,19 @@ static const u32 mt8195_dpi_output_fmts[] = {
MEDIA_BUS_FMT_YUYV8_1X16,
MEDIA_BUS_FMT_YUYV10_1X20,
MEDIA_BUS_FMT_YUYV12_1X24,
+ MEDIA_BUS_FMT_BGR888_1X24,
MEDIA_BUS_FMT_YUV8_1X24,
MEDIA_BUS_FMT_YUV10_1X30,
};
static const u32 mt8195_dp_intf_output_fmts[] = {
- MEDIA_BUS_FMT_BGR888_1X24,
MEDIA_BUS_FMT_RGB888_1X24,
MEDIA_BUS_FMT_RGB888_2X12_LE,
MEDIA_BUS_FMT_RGB888_2X12_BE,
MEDIA_BUS_FMT_RGB101010_1X30,
MEDIA_BUS_FMT_YUYV8_1X16,
MEDIA_BUS_FMT_YUYV10_1X20,
+ MEDIA_BUS_FMT_BGR888_1X24,
MEDIA_BUS_FMT_YUV8_1X24,
MEDIA_BUS_FMT_YUV10_1X30,
};
---
base-commit: b3bded85d838336326ce78e394e7818445e11f20
change-id: 20250606-mtk_dpi-mt8195-fix-wrong-color-5aab0f6d2d27
Best regards,
--
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88
2025-06-06 12:50 [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88 Louis-Alexis Eyraud
@ 2025-06-11 9:07 ` AngeloGioacchino Del Regno
2025-06-25 7:22 ` CK Hu (胡俊光)
2025-06-25 15:17 ` Chun-Kuang Hu
2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-06-11 9:07 UTC (permalink / raw)
To: Louis-Alexis Eyraud, Chun-Kuang Hu, Philipp Zabel, David Airlie,
Simona Vetter, Matthias Brugger
Cc: kernel, dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel
Il 06/06/25 14:50, Louis-Alexis Eyraud ha scritto:
> Reorder output format arrays in both MT8195 DPI and DP_INTF block
> configuration by decreasing preference order instead of alphanumeric
> one, as expected by the atomic_get_output_bus_fmts callback function
> of drm_bridge controls, so the RGB ones are used first during the
> bus format negotiation process.
>
> Fixes: 20fa6a8fc588 ("drm/mediatek: mtk_dpi: Allow additional output formats on MT8195/88")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Well actually there is a way to make this still behave while having those
alphabetically sorted, which I was thinking that was already properly implemented
for MediaTek drivers.
Apparently it's not true for *all* of them... but then, just keeping things ordered
by preference is a simpler solution and probably the best one for now.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88
2025-06-06 12:50 [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88 Louis-Alexis Eyraud
2025-06-11 9:07 ` AngeloGioacchino Del Regno
@ 2025-06-25 7:22 ` CK Hu (胡俊光)
2025-06-25 15:17 ` Chun-Kuang Hu
2 siblings, 0 replies; 4+ messages in thread
From: CK Hu (胡俊光) @ 2025-06-25 7:22 UTC (permalink / raw)
To: p.zabel, chunkuang.hu, AngeloGioacchino Del Regno, airlied,
Louis-Alexis Eyraud, simona, matthias.bgg
Cc: dri-devel, linux-mediatek, linux-arm-kernel, kernel, linux-kernel
On Fri, 2025-06-06 at 14:50 +0200, Louis-Alexis Eyraud wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> Reorder output format arrays in both MT8195 DPI and DP_INTF block
> configuration by decreasing preference order instead of alphanumeric
> one, as expected by the atomic_get_output_bus_fmts callback function
> of drm_bridge controls, so the RGB ones are used first during the
> bus format negotiation process.
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Fixes: 20fa6a8fc588 ("drm/mediatek: mtk_dpi: Allow additional output formats on MT8195/88")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 6fb85bc6487a019cdcdb3770dc06a1deab8d5bda..a2fdceadf209f6d2166e7523b82ca18c82c7d435 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1095,7 +1095,6 @@ static const u32 mt8183_output_fmts[] = {
> };
>
> static const u32 mt8195_dpi_output_fmts[] = {
> - MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_RGB888_1X24,
> MEDIA_BUS_FMT_RGB888_2X12_LE,
> MEDIA_BUS_FMT_RGB888_2X12_BE,
> @@ -1103,18 +1102,19 @@ static const u32 mt8195_dpi_output_fmts[] = {
> MEDIA_BUS_FMT_YUYV8_1X16,
> MEDIA_BUS_FMT_YUYV10_1X20,
> MEDIA_BUS_FMT_YUYV12_1X24,
> + MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_YUV8_1X24,
> MEDIA_BUS_FMT_YUV10_1X30,
> };
>
> static const u32 mt8195_dp_intf_output_fmts[] = {
> - MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_RGB888_1X24,
> MEDIA_BUS_FMT_RGB888_2X12_LE,
> MEDIA_BUS_FMT_RGB888_2X12_BE,
> MEDIA_BUS_FMT_RGB101010_1X30,
> MEDIA_BUS_FMT_YUYV8_1X16,
> MEDIA_BUS_FMT_YUYV10_1X20,
> + MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_YUV8_1X24,
> MEDIA_BUS_FMT_YUV10_1X30,
> };
>
> ---
> base-commit: b3bded85d838336326ce78e394e7818445e11f20
> change-id: 20250606-mtk_dpi-mt8195-fix-wrong-color-5aab0f6d2d27
>
> Best regards,
> --
> Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88
2025-06-06 12:50 [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88 Louis-Alexis Eyraud
2025-06-11 9:07 ` AngeloGioacchino Del Regno
2025-06-25 7:22 ` CK Hu (胡俊光)
@ 2025-06-25 15:17 ` Chun-Kuang Hu
2 siblings, 0 replies; 4+ messages in thread
From: Chun-Kuang Hu @ 2025-06-25 15:17 UTC (permalink / raw)
To: Louis-Alexis Eyraud
Cc: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno, kernel, dri-devel,
linux-mediatek, linux-kernel, linux-arm-kernel
Hi, Louis:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com> 於 2025年6月6日 週五 下午8:52寫道:
>
> Reorder output format arrays in both MT8195 DPI and DP_INTF block
> configuration by decreasing preference order instead of alphanumeric
> one, as expected by the atomic_get_output_bus_fmts callback function
> of drm_bridge controls, so the RGB ones are used first during the
> bus format negotiation process.
Applied to mediatek-drm-fixes [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes
Regards,
Chun-Kuang.
>
> Fixes: 20fa6a8fc588 ("drm/mediatek: mtk_dpi: Allow additional output formats on MT8195/88")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 6fb85bc6487a019cdcdb3770dc06a1deab8d5bda..a2fdceadf209f6d2166e7523b82ca18c82c7d435 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1095,7 +1095,6 @@ static const u32 mt8183_output_fmts[] = {
> };
>
> static const u32 mt8195_dpi_output_fmts[] = {
> - MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_RGB888_1X24,
> MEDIA_BUS_FMT_RGB888_2X12_LE,
> MEDIA_BUS_FMT_RGB888_2X12_BE,
> @@ -1103,18 +1102,19 @@ static const u32 mt8195_dpi_output_fmts[] = {
> MEDIA_BUS_FMT_YUYV8_1X16,
> MEDIA_BUS_FMT_YUYV10_1X20,
> MEDIA_BUS_FMT_YUYV12_1X24,
> + MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_YUV8_1X24,
> MEDIA_BUS_FMT_YUV10_1X30,
> };
>
> static const u32 mt8195_dp_intf_output_fmts[] = {
> - MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_RGB888_1X24,
> MEDIA_BUS_FMT_RGB888_2X12_LE,
> MEDIA_BUS_FMT_RGB888_2X12_BE,
> MEDIA_BUS_FMT_RGB101010_1X30,
> MEDIA_BUS_FMT_YUYV8_1X16,
> MEDIA_BUS_FMT_YUYV10_1X20,
> + MEDIA_BUS_FMT_BGR888_1X24,
> MEDIA_BUS_FMT_YUV8_1X24,
> MEDIA_BUS_FMT_YUV10_1X30,
> };
>
> ---
> base-commit: b3bded85d838336326ce78e394e7818445e11f20
> change-id: 20250606-mtk_dpi-mt8195-fix-wrong-color-5aab0f6d2d27
>
> Best regards,
> --
> Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-25 15:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-06 12:50 [PATCH] drm/mediatek: mtk_dpi: Reorder output formats on MT8195/88 Louis-Alexis Eyraud
2025-06-11 9:07 ` AngeloGioacchino Del Regno
2025-06-25 7:22 ` CK Hu (胡俊光)
2025-06-25 15:17 ` Chun-Kuang Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®