linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] add support for MT8195 VPPSYS on MMSYS and MUTEX
@ 2022-10-11  7:03 Moudy Ho
  2022-10-11  7:03 ` [PATCH v2 1/7] dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS Moudy Ho
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Moudy Ho @ 2022-10-11  7:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Moudy Ho

Changes since v1:
- Depend on :
  [1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=681097
- Add compatible names to VPPSYS0 and VPPSYS1 in MMSYS binding file.
- Fix VPPSYS's MMSYS and MUTEX dts to pass the dtsb_check.
- Rename mtk_mmsys_merge_config() and mtk_mmsys_rsz_dcm_config() to
  mtk_mmsys_vpp_rsz_merge_config() and mtk_mmsys_vpp_rsz_dcm_config().
- Clean up mtk_mmsys_vpp_rsz_dcm_config().
- Add a comment to mtk_mutex_write_mod() and clean it up for use in more
  than 32 mods.

Hi,

This series add support for MT8195's two VPPSYS(Video Processor Pipe Subsystem),
under which there will be corresponding MMSYS and MUTEX settings that
need to be configured.

Moudy Ho (1):
  dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS

Roy-CW.Yeh (6):
  dt-bindings: soc: mediatek: Add support for MT8195 VPPSYS
  dts: arm64: mt8195: add MMSYS and MUTEX configuration for VPPSYS
  soc: mediatek: mmsys: add support for MT8195 VPPSYS
  soc: mediatek: mmsys: add config api for RSZ switching and DCM
  soc: mediatek: mutex: Add mtk_mutex_set_mod support to set MOD1
  soc: mediatek: mutex: support MT8195 VPPSYS

 .../bindings/arm/mediatek/mediatek,mmsys.yaml |   5 +-
 .../bindings/soc/mediatek/mediatek,mutex.yaml |   1 +
 arch/arm64/boot/dts/mediatek/mt8195.dtsi      |  30 +++-
 drivers/soc/mediatek/mt8195-mmsys.h           |  13 ++
 drivers/soc/mediatek/mtk-mmsys.c              |  64 +++++++++
 drivers/soc/mediatek/mtk-mmsys.h              |   1 +
 drivers/soc/mediatek/mtk-mutex.c              | 135 +++++++++++++++++-
 include/linux/soc/mediatek/mtk-mmsys.h        |   4 +
 include/linux/soc/mediatek/mtk-mutex.h        |  35 +++++
 9 files changed, 276 insertions(+), 12 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/7] dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS
  2022-10-11  7:03 [PATCH v2 0/7] add support for MT8195 VPPSYS on MMSYS and MUTEX Moudy Ho
@ 2022-10-11  7:03 ` Moudy Ho
  2022-10-11 12:21   ` Krzysztof Kozlowski
       [not found] ` <20221011070356.682-6-moudy.ho@mediatek.com>
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Moudy Ho @ 2022-10-11  7:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Moudy Ho

For MT8195, VPPSYS0 and VPPSYS1 are 2 display pipes with
hardware differences in power domains, clocks and subsystem counts,
which should be determined by compatible names.

Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
---
 .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
index 0711f1834fbd..493aa9e8d484 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
@@ -48,7 +48,10 @@ properties:
           - const: syscon
 
       - items:
-          - const: mediatek,mt8195-vdosys0
+          - enum:
+              - mediatek,mt8195-vdosys0
+              - mediatek,mt8195-vppsys0
+              - mediatek,mt8195-vppsys1
           - const: mediatek,mt8195-mmsys
           - const: syscon
 
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 5/7] soc: mediatek: mmsys: add config api for RSZ switching and DCM
       [not found] ` <20221011070356.682-6-moudy.ho@mediatek.com>
@ 2022-10-11 10:09   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-11 10:09 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Roy-CW.Yeh

Il 11/10/22 09:03, Moudy Ho ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
> 
> Due to MT8195 HW design, some RSZs have additional settings that
> need to be configured in MMSYS.
> 
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/7] dt-bindings: soc: mediatek: Add support for MT8195 VPPSYS
       [not found] ` <20221011070356.682-3-moudy.ho@mediatek.com>
@ 2022-10-11 10:09   ` AngeloGioacchino Del Regno
  2022-10-11 12:22   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-11 10:09 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Roy-CW.Yeh

Il 11/10/22 09:03, Moudy Ho ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
> 
> Add compatible for MT8195 VPPSYS on MUTEX.
> 
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 7/7] soc: mediatek: mutex: support MT8195 VPPSYS
       [not found] ` <20221011070356.682-8-moudy.ho@mediatek.com>
@ 2022-10-11 10:09   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-11 10:09 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Roy-CW.Yeh

Il 11/10/22 09:03, Moudy Ho ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
> 
> Add MT8195 VPPSYS0 and VPPSYS1 mutex info to driver data
> 
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 6/7] soc: mediatek: mutex: Add mtk_mutex_set_mod support to set MOD1
       [not found] ` <20221011070356.682-7-moudy.ho@mediatek.com>
@ 2022-10-11 10:09   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-11 10:09 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Roy-CW.Yeh

Il 11/10/22 09:03, Moudy Ho ha scritto:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
> 
> Add mtk_mutex_set_mod support to set MOD1
> 
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/7] dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS
  2022-10-11  7:03 ` [PATCH v2 1/7] dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS Moudy Ho
@ 2022-10-11 12:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-11 12:21 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group

On 11/10/2022 03:03, Moudy Ho wrote:
> For MT8195, VPPSYS0 and VPPSYS1 are 2 display pipes with
> hardware differences in power domains, clocks and subsystem counts,
> which should be determined by compatible names.
> 

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/7] dt-bindings: soc: mediatek: Add support for MT8195 VPPSYS
       [not found] ` <20221011070356.682-3-moudy.ho@mediatek.com>
  2022-10-11 10:09   ` [PATCH v2 2/7] dt-bindings: soc: mediatek: Add support for MT8195 VPPSYS AngeloGioacchino Del Regno
@ 2022-10-11 12:22   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-11 12:22 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Roy-CW.Yeh

On 11/10/2022 03:03, Moudy Ho wrote:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
> 
> Add compatible for MT8195 VPPSYS on MUTEX.
> 
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 3/7] dts: arm64: mt8195: add MMSYS and MUTEX configuration for VPPSYS
       [not found] ` <20221011070356.682-4-moudy.ho@mediatek.com>
@ 2022-10-11 12:23   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-11 12:23 UTC (permalink / raw)
  To: Moudy Ho, Rob Herring, Krzysztof Kozlowski, Matthias Brugger,
	AngeloGioacchino Del Regno, Chun-Kuang Hu
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group, Roy-CW.Yeh

On 11/10/2022 03:03, Moudy Ho wrote:
> From: "Roy-CW.Yeh" <roy-cw.yeh@mediatek.com>
> 
> Compatible names, node names, and GCE client registers for
> VPPSYS0 and VPPSYS1 should be renamed or added to match
> the binding file requirements.
> Also, add two nodes for MT8195 VPPSYS MUTEX.
> 
> Signed-off-by: Roy-CW.Yeh <roy-cw.yeh@mediatek.com>
> Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>

Use subject prefixes matching the subsystem (git log --oneline -- ...).

> ---
>  arch/arm64/boot/dts/mediatek/mt8195.dtsi | 30 ++++++++++++++++++++----
>  1 file changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> index 905d1a90b406..3e73bd58e54d 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
> @@ -1476,12 +1476,23 @@
>  			#clock-cells = <1>;
>  		};
>  
> -		vppsys0: clock-controller@14000000 {
> -			compatible = "mediatek,mt8195-vppsys0";
> +		vppsys0: syscon@14000000 {
> +			compatible = "mediatek,mt8195-vppsys0",
> +				     "mediatek,mt8195-mmsys", "syscon";

No. You change multiple pieces in one patch, some of them have much
bigger impact, like adding compatibles.

Split and describe *why* you are changing it.

>  			reg = <0 0x14000000 0 0x1000>;
> +			mediatek,gce-client-reg = <&gce1 SUBSYS_1400XXXX 0 0x1000>;
>  			#clock-cells = <1>;
>  		};
>  
> +		mutex@1400f000 {
> +			compatible = "mediatek,mt8195-vpp-mutex";

And you add some new nodes in a cleanup patch...

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-11 12:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11  7:03 [PATCH v2 0/7] add support for MT8195 VPPSYS on MMSYS and MUTEX Moudy Ho
2022-10-11  7:03 ` [PATCH v2 1/7] dt-bindings: arm: mediatek: mmsys: Add support for MT8195 VPPSYS Moudy Ho
2022-10-11 12:21   ` Krzysztof Kozlowski
     [not found] ` <20221011070356.682-6-moudy.ho@mediatek.com>
2022-10-11 10:09   ` [PATCH v2 5/7] soc: mediatek: mmsys: add config api for RSZ switching and DCM AngeloGioacchino Del Regno
     [not found] ` <20221011070356.682-8-moudy.ho@mediatek.com>
2022-10-11 10:09   ` [PATCH v2 7/7] soc: mediatek: mutex: support MT8195 VPPSYS AngeloGioacchino Del Regno
     [not found] ` <20221011070356.682-7-moudy.ho@mediatek.com>
2022-10-11 10:09   ` [PATCH v2 6/7] soc: mediatek: mutex: Add mtk_mutex_set_mod support to set MOD1 AngeloGioacchino Del Regno
     [not found] ` <20221011070356.682-3-moudy.ho@mediatek.com>
2022-10-11 10:09   ` [PATCH v2 2/7] dt-bindings: soc: mediatek: Add support for MT8195 VPPSYS AngeloGioacchino Del Regno
2022-10-11 12:22   ` Krzysztof Kozlowski
     [not found] ` <20221011070356.682-4-moudy.ho@mediatek.com>
2022-10-11 12:23   ` [PATCH v2 3/7] dts: arm64: mt8195: add MMSYS and MUTEX configuration for VPPSYS Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).