* [PATCH v2] soc: mediatek: mt8167-mmsys: fix errors in multiple-output display paths
@ 2026-11-17 12:09 Luca Leonardo Scorcia
2026-11-17 12:10 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 2+ messages in thread
From: Luca Leonardo Scorcia @ 2026-11-17 12:09 UTC (permalink / raw)
To: linux-mediatek
Cc: Luca Leonardo Scorcia, Matthias Brugger,
AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel
Some display blocks can be used to define multiple-output pipelines.
The current code uses mtk_mmsys_update_bits to clear the mask bits and
set the desired output block bit when initializing or disconnecting a
pipeline. This breaks multiple output pipelines (only the last one set
produces output).
Fix this by using the block bit alone as mask for multiple output route
components.
Also address some unfortunate copy and paste errors in routes between
OVL<->WDMA0, DITHER0<->UFOE and DITHER0<->WDMA0.
Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Fixes: 96c2b43b1fb3 ("soc: mediatek: mt8167-mmsys: add routes for all display paths")
---
Changes in v2:
- Added Fixes tag
v1: [1]
[1] https://lore.kernel.org/linux-mediatek/20261117113402.728183-1-l.scorcia@gmail.com/
drivers/soc/mediatek/mt8167-mmsys.h | 32 +++++++++++++++++++----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/soc/mediatek/mt8167-mmsys.h b/drivers/soc/mediatek/mt8167-mmsys.h
index 858779ace895..45df210b5775 100644
--- a/drivers/soc/mediatek/mt8167-mmsys.h
+++ b/drivers/soc/mediatek/mt8167-mmsys.h
@@ -79,7 +79,7 @@
static const struct mtk_mmsys_routes mt8167_mmsys_routing_table[] = {
/* OVL0<->COLOR0 */
MMSYS_ROUTE(OVL, 0, COLOR, 0,
- MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, MT8167_OVL0_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, MT8167_OVL0_MOUT_EN_COLOR0,
MT8167_OVL0_MOUT_EN_COLOR0),
MMSYS_ROUTE(OVL, 0, COLOR, 0,
MT8167_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN, MT8167_COLOR0_SEL_IN_MASK,
@@ -87,26 +87,36 @@ static const struct mtk_mmsys_routes mt8167_mmsys_routing_table[] = {
/* OVL0<->WDMA0 */
MMSYS_ROUTE(OVL, 0, WDMA, 0,
- MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, MT8167_OVL0_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, MT8167_OVL0_MOUT_EN_WDMA0,
MT8167_OVL0_MOUT_EN_WDMA0),
MMSYS_ROUTE(OVL, 0, WDMA, 0,
- MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_COLOR0_SEL_IN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_WDMA0_SEL_IN_MASK,
MT8167_WDMA0_SEL_IN_OVL0),
- /* DITHER0 outputs */
+ /* DITHER0 output to RDMA */
MMSYS_ROUTE(DITHER, 0, RDMA, 0,
- MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_RDMA0,
MT8167_DITHER_MOUT_EN_RDMA0),
+
+ /* DITHER<->UFOE */
MMSYS_ROUTE(DITHER, 0, UFOE, 0,
- MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_UFOE,
MT8167_DITHER_MOUT_EN_UFOE),
+ MMSYS_ROUTE(DITHER, 0, UFOE, 0,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_SEL_IN, MT8167_UFOE_SEL_IN_MASK,
+ MT8167_UFOE_SEL_IN_DITHER),
+
+ /* DITHER<->WDMA */
MMSYS_ROUTE(DITHER, 0, WDMA, 0,
- MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN, MT8167_DITHER_MOUT_EN_WDMA0,
MT8167_DITHER_MOUT_EN_WDMA0),
+ MMSYS_ROUTE(DITHER, 0, WDMA, 0,
+ MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_WDMA0_SEL_IN_MASK,
+ MT8167_WDMA0_SEL_IN_DITHER),
/* UFOE<->DSI0 */
MMSYS_ROUTE(UFOE, 0, DSI, 0,
- MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_DSI0,
MT8167_UFOE_MOUT_EN_DSI0),
MMSYS_ROUTE(UFOE, 0, DSI, 0,
MT8167_DISP_REG_CONFIG_DISP_DSI0_SEL_IN, MT8167_DSI0_SEL_IN_MASK,
@@ -114,7 +124,7 @@ static const struct mtk_mmsys_routes mt8167_mmsys_routing_table[] = {
/* UFOE<->DPI0 */
MMSYS_ROUTE(UFOE, 0, DPI, 0,
- MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_DPI0,
MT8167_UFOE_MOUT_EN_DPI0),
MMSYS_ROUTE(UFOE, 0, DPI, 0,
MT8167_DISP_REG_CONFIG_DISP_DPI0_SEL_IN, MT8167_DPI0_SEL_IN_MASK,
@@ -122,7 +132,7 @@ static const struct mtk_mmsys_routes mt8167_mmsys_routing_table[] = {
/* UFOE<->DPI1 */
MMSYS_ROUTE(UFOE, 0, DPI, 1,
- MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_DPI1,
MT8167_UFOE_MOUT_EN_DPI1),
MMSYS_ROUTE(UFOE, 0, DPI, 1,
MT8167_DISP_REG_CONFIG_DISP_DPI1_SEL_IN, MT8167_DPI1_SEL_IN_MASK,
@@ -130,7 +140,7 @@ static const struct mtk_mmsys_routes mt8167_mmsys_routing_table[] = {
/* UFOE<->WDMA0 */
MMSYS_ROUTE(UFOE, 0, WDMA, 0,
- MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_MASK,
+ MT8167_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, MT8167_UFOE_MOUT_EN_WDMA0,
MT8167_UFOE_MOUT_EN_WDMA0),
MMSYS_ROUTE(UFOE, 0, WDMA, 0,
MT8167_DISP_REG_CONFIG_DISP_WDMA0_SEL_IN, MT8167_WDMA0_SEL_IN_MASK,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] soc: mediatek: mt8167-mmsys: fix errors in multiple-output display paths
2026-11-17 12:09 [PATCH v2] soc: mediatek: mt8167-mmsys: fix errors in multiple-output display paths Luca Leonardo Scorcia
@ 2026-11-17 12:10 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-11-17 12:10 UTC (permalink / raw)
To: linux-mediatek, Luca Leonardo Scorcia
Cc: Matthias Brugger, linux-kernel, linux-arm-kernel
On Tue, 17 Nov 2026 13:09:12 +0100, Luca Leonardo Scorcia wrote:
> Some display blocks can be used to define multiple-output pipelines.
> The current code uses mtk_mmsys_update_bits to clear the mask bits and
> set the desired output block bit when initializing or disconnecting a
> pipeline. This breaks multiple output pipelines (only the last one set
> produces output).
>
> Fix this by using the block bit alone as mask for multiple output route
> components.
>
> [...]
Applied to v7.4-next/soc, thanks!
[1/1] soc: mediatek: mt8167-mmsys: fix errors in multiple-output display paths
commit: ffcbc063e8df3cdb50576a4bc20b3d9669e2c43a
Cheers,
Angelo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-17 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 12:09 [PATCH v2] soc: mediatek: mt8167-mmsys: fix errors in multiple-output display paths Luca Leonardo Scorcia
2026-11-17 12:10 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox