devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] video encoder on mt8186
@ 2023-12-28 11:32 Eugen Hristev
  2023-12-28 11:32 ` [PATCH v3 1/6] media: mediatek: vcodec: fix possible unbalanced PM counter Eugen Hristev
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel

Hello,

This series adds support for the video encoder on mt8186.

Few patches fix the binding, there is a patch for the DT node,
and one patch for the driver that fixes an imbalance.

Changes in v3:
- removed the patch to add dma-ranges, because this was intentionally
removed (e.g. https://patchwork.kernel.org/project/linux-media/patch/20230303013842.23259-3-allen-kh.cheng@mediatek.com/ )
also removed dma-ranges and cells from the DT node

Changes in v2:
- change log in every patch

Eugen Hristev (5):
  media: mediatek: vcodec: fix possible unbalanced PM counter
  dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name
  arm64: dts: mediatek: mt8192: fix vencoder clock name
  dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186
  arm64: dts: mediatek: mt8186: fix VENC power domain clocks

Kyrie Wu (1):
  arm64: dts: mediatek: mt8186: Add venc node

 .../media/mediatek,vcodec-encoder.yaml        | 31 ++++++++++---------
 arch/arm64/boot/dts/mediatek/mt8186.dtsi      | 23 +++++++++++++-
 arch/arm64/boot/dts/mediatek/mt8192.dtsi      |  2 +-
 .../vcodec/encoder/mtk_vcodec_enc_pm.c        |  4 ++-
 .../vcodec/encoder/mtk_vcodec_enc_pm.h        |  2 +-
 .../mediatek/vcodec/encoder/venc_drv_if.c     |  5 ++-
 6 files changed, 47 insertions(+), 20 deletions(-)

-- 
2.34.1


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

* [PATCH v3 1/6] media: mediatek: vcodec: fix possible unbalanced PM counter
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
@ 2023-12-28 11:32 ` Eugen Hristev
  2023-12-28 11:32 ` [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name Eugen Hristev
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel

It is possible that mtk_vcodec_enc_pw_on fails, and in that scenario
the PM counter is not incremented, and subsequent call to
mtk_vcodec_enc_pw_off decrements the counter, leading to a PM imbalance.
Fix by bailing out of venc_if_encode in the case when mtk_vcodec_enc_pw_on
fails.

Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
Changes in v3:
-none
Changes in v2:
- collect R-b

 .../platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c     | 4 +++-
 .../platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h     | 2 +-
 drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c | 5 ++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c
index a22b7dfc656e..1a2b14a3e219 100644
--- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c
+++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.c
@@ -58,13 +58,15 @@ int mtk_vcodec_init_enc_clk(struct mtk_vcodec_enc_dev *mtkdev)
 	return 0;
 }
 
-void mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm)
+int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm)
 {
 	int ret;
 
 	ret = pm_runtime_resume_and_get(pm->dev);
 	if (ret)
 		dev_err(pm->dev, "pm_runtime_resume_and_get fail: %d", ret);
+
+	return ret;
 }
 
 void mtk_vcodec_enc_pw_off(struct mtk_vcodec_pm *pm)
diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h
index 157ea08ba9e3..2e28f25e36cc 100644
--- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h
+++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_pm.h
@@ -10,7 +10,7 @@
 #include "mtk_vcodec_enc_drv.h"
 
 int mtk_vcodec_init_enc_clk(struct mtk_vcodec_enc_dev *dev);
-void mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm);
+int mtk_vcodec_enc_pw_on(struct mtk_vcodec_pm *pm);
 void mtk_vcodec_enc_pw_off(struct mtk_vcodec_pm *pm);
 void mtk_vcodec_enc_clock_on(struct mtk_vcodec_pm *pm);
 void mtk_vcodec_enc_clock_off(struct mtk_vcodec_pm *pm);
diff --git a/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c b/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c
index c402a686f3cb..e83747b8d69a 100644
--- a/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c
+++ b/drivers/media/platform/mediatek/vcodec/encoder/venc_drv_if.c
@@ -64,7 +64,9 @@ int venc_if_encode(struct mtk_vcodec_enc_ctx *ctx,
 	ctx->dev->curr_ctx = ctx;
 	spin_unlock_irqrestore(&ctx->dev->irqlock, flags);
 
-	mtk_vcodec_enc_pw_on(&ctx->dev->pm);
+	ret = mtk_vcodec_enc_pw_on(&ctx->dev->pm);
+	if (ret)
+		goto venc_if_encode_pw_on_err;
 	mtk_vcodec_enc_clock_on(&ctx->dev->pm);
 	ret = ctx->enc_if->encode(ctx->drv_handle, opt, frm_buf,
 				  bs_buf, result);
@@ -75,6 +77,7 @@ int venc_if_encode(struct mtk_vcodec_enc_ctx *ctx,
 	ctx->dev->curr_ctx = NULL;
 	spin_unlock_irqrestore(&ctx->dev->irqlock, flags);
 
+venc_if_encode_pw_on_err:
 	mtk_venc_unlock(ctx);
 	return ret;
 }
-- 
2.34.1


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

* [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
  2023-12-28 11:32 ` [PATCH v3 1/6] media: mediatek: vcodec: fix possible unbalanced PM counter Eugen Hristev
@ 2023-12-28 11:32 ` Eugen Hristev
  2024-01-02  9:13   ` AngeloGioacchino Del Regno
  2023-12-28 11:32 ` [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder " Eugen Hristev
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel, Rob Herring

Looking at the binding it makes sense that the `-vp8` compatible has
the `venc_lt_sel` while the other bindings have the `venc_sel` as name for
the clock.
This was also mentioned in the txt version of the binding before the
conversion:
 `
 clock-names: avc encoder must contain "venc_sel", vp8 encoder must
 contain "venc_lt_sel", decoder must contain "vcodecpll", "univpll_d2",
 `

So it is easier to check for compatible that includes vp8, since that's
just one, to have the requirement for the clock name property as
`venc_lt_sel`, rather than for all the others, some of which are missing,
thus for them, the requirement is wrongly `venc_lt_sel`.

Reordered the if/then/else to match `-vp8` and have all the rest of
the compatibles using the other clock name (`venc_sel`).

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes in v3:
- collect R-B
Changes in v2:
- new patch.
 .../bindings/media/mediatek,vcodec-encoder.yaml       | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
index a2051b31fa29..849721c0571a 100644
--- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
@@ -109,10 +109,7 @@ allOf:
       properties:
         compatible:
           enum:
-            - mediatek,mt8173-vcodec-enc
-            - mediatek,mt8188-vcodec-enc
-            - mediatek,mt8192-vcodec-enc
-            - mediatek,mt8195-vcodec-enc
+            - mediatek,mt8173-vcodec-enc-vp8
 
     then:
       properties:
@@ -122,8 +119,8 @@ allOf:
             maxItems: 1
         clock-names:
           items:
-            - const: venc_sel
-    else:  # for vp8 hw encoder
+            - const: venc_lt_sel
+    else:
       properties:
         clock:
           items:
@@ -131,7 +128,7 @@ allOf:
             maxItems: 1
         clock-names:
           items:
-            - const: venc_lt_sel
+            - const: venc_sel
 
 additionalProperties: false
 
-- 
2.34.1


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

* [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder clock name
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
  2023-12-28 11:32 ` [PATCH v3 1/6] media: mediatek: vcodec: fix possible unbalanced PM counter Eugen Hristev
  2023-12-28 11:32 ` [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name Eugen Hristev
@ 2023-12-28 11:32 ` Eugen Hristev
  2024-01-02  9:13   ` AngeloGioacchino Del Regno
  2023-12-28 11:32 ` [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186 Eugen Hristev
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel

Clock name should be `venc_sel` as per binding.
Fix the warning message :
arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dtb: vcodec@17020000: clock-names:0: 'venc_sel' was expected
        from schema $id: http://devicetree.org/schemas/media/mediatek,vcodec-encoder.yaml#

Fixes: aa8f3711fc87 ("arm64: dts: mt8192: Add H264 venc device node")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
Changes in v3:
none
Changes in v2:
- new patch.
 arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
index 69f4cded5dbb..f1fc14e53f8c 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi
@@ -1770,7 +1770,7 @@ vcodec_enc: vcodec@17020000 {
 			mediatek,scp = <&scp>;
 			power-domains = <&spm MT8192_POWER_DOMAIN_VENC>;
 			clocks = <&vencsys CLK_VENC_SET1_VENC>;
-			clock-names = "venc-set1";
+			clock-names = "venc_sel";
 			assigned-clocks = <&topckgen CLK_TOP_VENC_SEL>;
 			assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D4>;
 		};
-- 
2.34.1


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

* [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
                   ` (2 preceding siblings ...)
  2023-12-28 11:32 ` [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder " Eugen Hristev
@ 2023-12-28 11:32 ` Eugen Hristev
  2024-01-02  9:14   ` AngeloGioacchino Del Regno
  2023-12-28 11:32 ` [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Eugen Hristev
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel, Rob Herring

Add compatible for the mt8186 encoder which currently works in the same
way as mt8183.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes in v3:
- collect R-b
Changes in v2:
- new patch.
 .../media/mediatek,vcodec-encoder.yaml        | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
index 849721c0571a..b45743d0a9ec 100644
--- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml
@@ -16,14 +16,18 @@ description: |+
 
 properties:
   compatible:
-    enum:
-      - mediatek,mt8173-vcodec-enc-vp8
-      - mediatek,mt8173-vcodec-enc
-      - mediatek,mt8183-vcodec-enc
-      - mediatek,mt8188-vcodec-enc
-      - mediatek,mt8192-vcodec-enc
-      - mediatek,mt8195-vcodec-enc
-
+    oneOf:
+      - items:
+          - enum:
+              - mediatek,mt8173-vcodec-enc-vp8
+              - mediatek,mt8173-vcodec-enc
+              - mediatek,mt8183-vcodec-enc
+              - mediatek,mt8188-vcodec-enc
+              - mediatek,mt8192-vcodec-enc
+              - mediatek,mt8195-vcodec-enc
+      - items:
+          - const: mediatek,mt8186-vcodec-enc
+          - const: mediatek,mt8183-vcodec-enc
   reg:
     maxItems: 1
 
-- 
2.34.1


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

* [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
                   ` (3 preceding siblings ...)
  2023-12-28 11:32 ` [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186 Eugen Hristev
@ 2023-12-28 11:32 ` Eugen Hristev
  2024-01-02  9:14   ` AngeloGioacchino Del Regno
  2023-12-28 11:32 ` [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node Eugen Hristev
  2024-01-29 10:41 ` (subset) [PATCH v3 0/6] video encoder on mt8186 AngeloGioacchino Del Regno
  6 siblings, 1 reply; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel

The larb clock is in fact a subsys clock, so it must be prefixed by
'subsys-' to be correctly identified in the driver.

Fixes: d9e43c1e7a38 ("arm64: dts: mt8186: Add power domains controller")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
Changes in v2,v3:
- none.

 arch/arm64/boot/dts/mediatek/mt8186.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index df0c04f2ba1d..66ead3f23336 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -1061,7 +1061,7 @@ power-domain@MT8186_POWER_DOMAIN_VENC {
 						reg = <MT8186_POWER_DOMAIN_VENC>;
 						clocks = <&topckgen CLK_TOP_VENC>,
 							 <&vencsys CLK_VENC_CKE1_VENC>;
-						clock-names = "venc0", "larb";
+						clock-names = "venc0", "subsys-larb";
 						mediatek,infracfg = <&infracfg_ao>;
 						#power-domain-cells = <0>;
 					};
-- 
2.34.1


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

* [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
                   ` (4 preceding siblings ...)
  2023-12-28 11:32 ` [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Eugen Hristev
@ 2023-12-28 11:32 ` Eugen Hristev
  2024-01-02  9:14   ` AngeloGioacchino Del Regno
  2024-01-29 10:41 ` (subset) [PATCH v3 0/6] video encoder on mt8186 AngeloGioacchino Del Regno
  6 siblings, 1 reply; 14+ messages in thread
From: Eugen Hristev @ 2023-12-28 11:32 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg,
	angelogioacchino.delregno, linux-mediatek
  Cc: eugen.hristev, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel, Kyrie Wu, Allen-KH Cheng,
	Hsin-Yi Wang

From: Kyrie Wu <kyrie.wu@mediatek.com>

Add video encoder node.

Signed-off-by: Kyrie Wu <kyrie.wu@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
[eugen.hristev@collabora.com: minor cleanup]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
Changes in v3:
- remove dma ranges and cells.
Changes in v2:
- change node name
- change compatible to include 8186
- change props order
- change clock name to cope with binding

 arch/arm64/boot/dts/mediatek/mt8186.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index 66ead3f23336..bafb0845e986 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -1993,6 +1993,27 @@ larb7: smi@17010000 {
 			power-domains = <&spm MT8186_POWER_DOMAIN_VENC>;
 		};
 
+		venc: video-encoder@17020000 {
+			compatible = "mediatek,mt8186-vcodec-enc", "mediatek,mt8183-vcodec-enc";
+			reg = <0 0x17020000 0 0x2000>;
+			interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>;
+			iommus = <&iommu_mm IOMMU_PORT_L7_VENC_RCPU>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_REC>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_BSDMA>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_SV_COMV>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_RD_COMV>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_CUR_LUMA>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_CUR_CHROMA>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_REF_LUMA>,
+				 <&iommu_mm IOMMU_PORT_L7_VENC_REF_CHROMA>;
+			clocks = <&vencsys CLK_VENC_CKE1_VENC>;
+			clock-names = "venc_sel";
+			assigned-clocks = <&topckgen CLK_TOP_VENC>;
+			assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL_D3>;
+			power-domains = <&spm MT8186_POWER_DOMAIN_VENC>;
+			mediatek,scp = <&scp>;
+		};
+
 		camsys: clock-controller@1a000000 {
 			compatible = "mediatek,mt8186-camsys";
 			reg = <0 0x1a000000 0 0x1000>;
-- 
2.34.1


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

* Re: [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder clock name
  2023-12-28 11:32 ` [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder " Eugen Hristev
@ 2024-01-02  9:13   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:13 UTC (permalink / raw)
  To: Eugen Hristev, tiffany.lin, andrew-ct.chen, matthias.bgg,
	linux-mediatek
  Cc: linux-media, devicetree, linux-kernel, linux-arm-kernel, robh+dt,
	kernel

Il 28/12/23 12:32, Eugen Hristev ha scritto:
> Clock name should be `venc_sel` as per binding.
> Fix the warning message :
> arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dtb: vcodec@17020000: clock-names:0: 'venc_sel' was expected
>          from schema $id: http://devicetree.org/schemas/media/mediatek,vcodec-encoder.yaml#
> 
> Fixes: aa8f3711fc87 ("arm64: dts: mt8192: Add H264 venc device node")
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>

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



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

* Re: [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name
  2023-12-28 11:32 ` [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name Eugen Hristev
@ 2024-01-02  9:13   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:13 UTC (permalink / raw)
  To: Eugen Hristev, tiffany.lin, andrew-ct.chen, matthias.bgg,
	linux-mediatek
  Cc: linux-media, devicetree, linux-kernel, linux-arm-kernel, robh+dt,
	kernel, Rob Herring

Il 28/12/23 12:32, Eugen Hristev ha scritto:
> Looking at the binding it makes sense that the `-vp8` compatible has
> the `venc_lt_sel` while the other bindings have the `venc_sel` as name for
> the clock.
> This was also mentioned in the txt version of the binding before the
> conversion:
>   `
>   clock-names: avc encoder must contain "venc_sel", vp8 encoder must
>   contain "venc_lt_sel", decoder must contain "vcodecpll", "univpll_d2",
>   `
> 
> So it is easier to check for compatible that includes vp8, since that's
> just one, to have the requirement for the clock name property as
> `venc_lt_sel`, rather than for all the others, some of which are missing,
> thus for them, the requirement is wrongly `venc_lt_sel`.
> 
> Reordered the if/then/else to match `-vp8` and have all the rest of
> the compatibles using the other clock name (`venc_sel`).
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

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



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

* Re: [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186
  2023-12-28 11:32 ` [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186 Eugen Hristev
@ 2024-01-02  9:14   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:14 UTC (permalink / raw)
  To: Eugen Hristev, tiffany.lin, andrew-ct.chen, matthias.bgg,
	linux-mediatek
  Cc: linux-media, devicetree, linux-kernel, linux-arm-kernel, robh+dt,
	kernel, Rob Herring

Il 28/12/23 12:32, Eugen Hristev ha scritto:
> Add compatible for the mt8186 encoder which currently works in the same
> way as mt8183.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

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



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

* Re: [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks
  2023-12-28 11:32 ` [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Eugen Hristev
@ 2024-01-02  9:14   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:14 UTC (permalink / raw)
  To: Eugen Hristev, tiffany.lin, andrew-ct.chen, matthias.bgg,
	linux-mediatek
  Cc: linux-media, devicetree, linux-kernel, linux-arm-kernel, robh+dt,
	kernel

Il 28/12/23 12:32, Eugen Hristev ha scritto:
> The larb clock is in fact a subsys clock, so it must be prefixed by
> 'subsys-' to be correctly identified in the driver.
> 
> Fixes: d9e43c1e7a38 ("arm64: dts: mt8186: Add power domains controller")
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>

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



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

* Re: [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node
  2023-12-28 11:32 ` [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node Eugen Hristev
@ 2024-01-02  9:14   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:14 UTC (permalink / raw)
  To: Eugen Hristev, tiffany.lin, andrew-ct.chen, matthias.bgg,
	linux-mediatek
  Cc: linux-media, devicetree, linux-kernel, linux-arm-kernel, robh+dt,
	kernel, Kyrie Wu, Allen-KH Cheng, Hsin-Yi Wang

Il 28/12/23 12:32, Eugen Hristev ha scritto:
> From: Kyrie Wu <kyrie.wu@mediatek.com>
> 
> Add video encoder node.
> 
> Signed-off-by: Kyrie Wu <kyrie.wu@mediatek.com>
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
> [eugen.hristev@collabora.com: minor cleanup]
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>

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



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

* Re: (subset) [PATCH v3 0/6] video encoder on mt8186
  2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
                   ` (5 preceding siblings ...)
  2023-12-28 11:32 ` [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node Eugen Hristev
@ 2024-01-29 10:41 ` AngeloGioacchino Del Regno
  2024-01-29 10:47   ` AngeloGioacchino Del Regno
  6 siblings, 1 reply; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-29 10:41 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg, linux-mediatek,
	Eugen Hristev
  Cc: AngeloGioacchino Del Regno, linux-media, devicetree, linux-kernel,
	linux-arm-kernel, robh+dt, kernel


On Thu, 28 Dec 2023 13:32:39 +0200, Eugen Hristev wrote:
> This series adds support for the video encoder on mt8186.
> 
> Few patches fix the binding, there is a patch for the DT node,
> and one patch for the driver that fixes an imbalance.
> 
> Changes in v3:
> - removed the patch to add dma-ranges, because this was intentionally
> removed (e.g. https://patchwork.kernel.org/project/linux-media/patch/20230303013842.23259-3-allen-kh.cheng@mediatek.com/ )
> also removed dma-ranges and cells from the DT node
> 
> [...]

Applied to v6.4-next/dts64, thanks!

[2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name
      commit: b8248c4831787f0854e2e856fa83da68ad5afcde
[3/6] arm64: dts: mediatek: mt8192: fix vencoder clock name
      commit: 0157de54920b556d575ffc82ae5d16f2b4cb9494
[4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186
      commit: 178eaba322868a75c2e0ad078fcf91c3a6f5abba
[5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks
      commit: 2a08dba6bf6637295175f48ad870a24833955cd4
[6/6] arm64: dts: mediatek: mt8186: Add venc node
      commit: f971c7ee301bbd423e06f82bcae768223a4dd602

Best regards,
-- 
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

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

* Re: (subset) [PATCH v3 0/6] video encoder on mt8186
  2024-01-29 10:41 ` (subset) [PATCH v3 0/6] video encoder on mt8186 AngeloGioacchino Del Regno
@ 2024-01-29 10:47   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 14+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-29 10:47 UTC (permalink / raw)
  To: tiffany.lin, andrew-ct.chen, matthias.bgg, linux-mediatek,
	Eugen Hristev
  Cc: linux-media, devicetree, linux-kernel, linux-arm-kernel, robh+dt,
	kernel

Il 29/01/24 11:41, AngeloGioacchino Del Regno ha scritto:
> 
> On Thu, 28 Dec 2023 13:32:39 +0200, Eugen Hristev wrote:
>> This series adds support for the video encoder on mt8186.
>>
>> Few patches fix the binding, there is a patch for the DT node,
>> and one patch for the driver that fixes an imbalance.
>>
>> Changes in v3:
>> - removed the patch to add dma-ranges, because this was intentionally
>> removed (e.g. https://patchwork.kernel.org/project/linux-media/patch/20230303013842.23259-3-allen-kh.cheng@mediatek.com/ )
>> also removed dma-ranges and cells from the DT node
>>
>> [...]
> 
> Applied to v6.4-next/dts64, thanks!
> 

Sorry, typo: v6.8-next/dts64

> [2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name
>        commit: b8248c4831787f0854e2e856fa83da68ad5afcde
> [3/6] arm64: dts: mediatek: mt8192: fix vencoder clock name
>        commit: 0157de54920b556d575ffc82ae5d16f2b4cb9494
> [4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186
>        commit: 178eaba322868a75c2e0ad078fcf91c3a6f5abba
> [5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks
>        commit: 2a08dba6bf6637295175f48ad870a24833955cd4
> [6/6] arm64: dts: mediatek: mt8186: Add venc node
>        commit: f971c7ee301bbd423e06f82bcae768223a4dd602
> 
> Best regards,



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

end of thread, other threads:[~2024-01-29 10:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-28 11:32 [PATCH v3 0/6] video encoder on mt8186 Eugen Hristev
2023-12-28 11:32 ` [PATCH v3 1/6] media: mediatek: vcodec: fix possible unbalanced PM counter Eugen Hristev
2023-12-28 11:32 ` [PATCH v3 2/6] dt-bindings: media: mtk-vcodec-encoder: fix non-vp8 clock name Eugen Hristev
2024-01-02  9:13   ` AngeloGioacchino Del Regno
2023-12-28 11:32 ` [PATCH v3 3/6] arm64: dts: mediatek: mt8192: fix vencoder " Eugen Hristev
2024-01-02  9:13   ` AngeloGioacchino Del Regno
2023-12-28 11:32 ` [PATCH v3 4/6] dt-bindings: media: mtk-vcodec-encoder: add compatible for mt8186 Eugen Hristev
2024-01-02  9:14   ` AngeloGioacchino Del Regno
2023-12-28 11:32 ` [PATCH v3 5/6] arm64: dts: mediatek: mt8186: fix VENC power domain clocks Eugen Hristev
2024-01-02  9:14   ` AngeloGioacchino Del Regno
2023-12-28 11:32 ` [PATCH v3 6/6] arm64: dts: mediatek: mt8186: Add venc node Eugen Hristev
2024-01-02  9:14   ` AngeloGioacchino Del Regno
2024-01-29 10:41 ` (subset) [PATCH v3 0/6] video encoder on mt8186 AngeloGioacchino Del Regno
2024-01-29 10:47   ` 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;
as well as URLs for NNTP newsgroup(s).