This series part 1 of a huge restructuring of the entire multimedia part of MediaTek SoCs, especially mediatek-drm, and contains only a set of changes that don't require any simultaneous updates in the mediatek-drm driver.
This adds support for correctly advertising the MediaTek Mute-X IP as a source of trigger signals (because that's what it is), hence for adding #trigger-source-cells in the Mute-X devicetree node and for specifying a Mute-X trigger-source in all of the MTK Display Controller components supporting or requiring one, as previously it was kind of hacked up as a static array in the Mute-X driver, for both MDP and DISP components, which is, well, depending on the point of view, actually wrong. Moreover, this goes on with the first part for a rework of MediaTek MMSYS, which is a requirement for the upcoming huge restructuring of the mediatek-drm driver; this starts adding boilerplate required for setting up MMSYS entries with decoupling of "component type" to "component instance number". As of now, all of the components in MediaTek DRM, hence also in the MMSYS driver, are thrown in a catch-all enumeration that does not make any distinction between Type-Instance relationship, and it is like so (mock-up names ahead): DISPLAY_DITHER0 DISPLAY_DITHER1 DISPLAY_DSI0 DISPLAY_DSI1 ... and so on. Since the number of components is now becoming uncontrollably large, the catch-all enumeration poses a big issue as the mediatek-drm driver is allocating a huge array that will be only half full (optimistically, because usually it's way less than half full) and with repeated ops assignment for each and every instance of the very same Sub-IP, effectively treating every instance of a Sub-IP like it is completely different from one another (for example, like DSI0 and DSI1 are as different as DITHER0 and DSI1). This has to change. It had to change months ago, but now it has become not only a maintenance burden, but also a... (sorry) big mess. And well, that... especially looking forward to add support for newer SoCs, using even more components in one pipeline, and using different and newer components (of new types...), making the catch-all enum to grow of another ~20 entries or more. So, this is PART 1 of this huge restructuring, which will impact many drivers, including soc/mediatek's mutex and mmsys, most of drm/mediatek and, in the future, also media/mediatek/mtk-mdp3 (and eventually its firmwareless implementation which, for components handling, will be as complicated as mediatek-drm and, without this restructuring, would be yet another boulder). AngeloGioacchino Del Regno (6): dt-bindings: soc: mediatek: mutex: Improve title and description dt-bindings: soc: mediatek: mutex: Allow #trigger-source-cells dt-bindings: display: mediatek: Allow trigger-sources on relevant HW soc: mediatek: mtk-mutex: Add new functions to add/remove triggers soc: mediatek: mtk-mmsys: Rework routes to specify component ID soc: mediatek: mtk-mmsys: Use MMSYS_ROUTE() in default routing table .../display/mediatek/mediatek,aal.yaml | 3 + .../display/mediatek/mediatek,ccorr.yaml | 3 + .../display/mediatek/mediatek,color.yaml | 3 + .../display/mediatek/mediatek,dither.yaml | 3 + .../display/mediatek/mediatek,dp.yaml | 3 + .../display/mediatek/mediatek,dpi.yaml | 3 + .../display/mediatek/mediatek,dsc.yaml | 3 + .../display/mediatek/mediatek,dsi.yaml | 3 + .../display/mediatek/mediatek,ethdr.yaml | 3 + .../display/mediatek/mediatek,gamma.yaml | 3 + .../display/mediatek/mediatek,merge.yaml | 3 + .../display/mediatek/mediatek,od.yaml | 3 + .../display/mediatek/mediatek,ovl-2l.yaml | 3 + .../display/mediatek/mediatek,ovl.yaml | 3 + .../display/mediatek/mediatek,padding.yaml | 3 + .../display/mediatek/mediatek,postmask.yaml | 3 + .../display/mediatek/mediatek,rdma.yaml | 3 + .../display/mediatek/mediatek,split.yaml | 3 + .../display/mediatek/mediatek,ufoe.yaml | 3 + .../display/mediatek/mediatek,wdma.yaml | 3 + .../bindings/soc/mediatek/mediatek,mutex.yaml | 21 +- drivers/soc/mediatek/mt6893-mmsys.h | 34 +- drivers/soc/mediatek/mt8167-mmsys.h | 21 +- drivers/soc/mediatek/mt8173-mmsys.h | 28 +- drivers/soc/mediatek/mt8183-mmsys.h | 14 +- drivers/soc/mediatek/mt8186-mmsys.h | 22 +- drivers/soc/mediatek/mt8188-mmsys.h | 78 ++--- drivers/soc/mediatek/mt8192-mmsys.h | 20 +- drivers/soc/mediatek/mt8195-mmsys.h | 181 +++++------ drivers/soc/mediatek/mt8365-mmsys.h | 20 +- drivers/soc/mediatek/mtk-mmsys.h | 299 ++++++++---------- drivers/soc/mediatek/mtk-mutex.c | 60 ++++ include/linux/soc/mediatek/mtk-mutex.h | 6 + 33 files changed, 474 insertions(+), 390 deletions(-) -- 2.54.0
