devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count
@ 2023-12-27 13:08 Eugen Hristev
  2023-12-27 13:08 ` [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node Eugen Hristev
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eugen Hristev @ 2023-12-27 13:08 UTC (permalink / raw)
  To: bin.liu, matthias.bgg, angelogioacchino.delregno, linux-media,
	devicetree
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Eugen Hristev

MT8186 has 4 iommus in the list, to cope with this situation, adjust
the maxItems to 4 (instead of previous 2).
Add also minItems as 1 since iommus are mandatory, to avoid warning
on the example.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
 .../devicetree/bindings/media/mediatek-jpeg-encoder.yaml       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
index 37800e1908cc..60c75b9312e8 100644
--- a/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
@@ -38,7 +38,8 @@ properties:
     maxItems: 1
 
   iommus:
-    maxItems: 2
+    minItems: 1
+    maxItems: 4
     description: |
       Points to the respective IOMMU block with master port as argument, see
       Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
-- 
2.34.1


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

* [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node
  2023-12-27 13:08 [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count Eugen Hristev
@ 2023-12-27 13:08 ` Eugen Hristev
  2024-01-02  9:28   ` AngeloGioacchino Del Regno
  2024-01-02  9:29 ` [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count AngeloGioacchino Del Regno
  2024-01-09  3:27 ` Rob Herring
  2 siblings, 1 reply; 7+ messages in thread
From: Eugen Hristev @ 2023-12-27 13:08 UTC (permalink / raw)
  To: bin.liu, matthias.bgg, angelogioacchino.delregno, linux-media,
	devicetree
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Allen-KH Cheng,
	Hsin-Yi Wang, Max Staudt, Ricardo Ribalda, Eugen Hristev

From: Allen-KH Cheng <allen-kh.cheng@mediatek.com>

Add JPEG encoder node.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Max Staudt <mstaudt@chromium.org>
Tested-by: Max Staudt <mstaudt@chromium.org>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
[eugen.hristev@collabora.com: minor cleanup]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt8186.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index e451b6c8cd9e..ef1b269f9184 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -2054,6 +2054,19 @@ venc: video-encoder@17020000 {
 			mediatek,scp = <&scp>;
 		};
 
+		jpgenc: jpgenc@17030000 {
+			compatible = "mediatek,mt8186-jpgenc", "mediatek,mtk-jpgenc";
+			reg = <0 0x17030000 0 0x10000>;
+			interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&vencsys CLK_VENC_CKE2_JPGENC>;
+			clock-names = "jpgenc";
+			power-domains = <&spm MT8186_POWER_DOMAIN_VENC>;
+			iommus = <&iommu_mm IOMMU_PORT_L7_JPGENC_Y_RDMA>,
+				 <&iommu_mm IOMMU_PORT_L7_JPGENC_C_RDMA>,
+				 <&iommu_mm IOMMU_PORT_L7_JPGENC_Q_TABLE>,
+				 <&iommu_mm IOMMU_PORT_L7_JPGENC_BSDMA>;
+		};
+
 		camsys: clock-controller@1a000000 {
 			compatible = "mediatek,mt8186-camsys";
 			reg = <0 0x1a000000 0 0x1000>;
-- 
2.34.1


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

* Re: [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node
  2023-12-27 13:08 ` [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node Eugen Hristev
@ 2024-01-02  9:28   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:28 UTC (permalink / raw)
  To: Eugen Hristev, bin.liu, matthias.bgg, linux-media, devicetree
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Allen-KH Cheng,
	Hsin-Yi Wang, Max Staudt, Ricardo Ribalda

Il 27/12/23 14:08, Eugen Hristev ha scritto:
> From: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> 
> Add JPEG encoder node.
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Reviewed-by: Max Staudt <mstaudt@chromium.org>
> Tested-by: Max Staudt <mstaudt@chromium.org>
> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> [eugen.hristev@collabora.com: minor cleanup]
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
> ---
>   arch/arm64/boot/dts/mediatek/mt8186.dtsi | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
> index e451b6c8cd9e..ef1b269f9184 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
> @@ -2054,6 +2054,19 @@ venc: video-encoder@17020000 {
>   			mediatek,scp = <&scp>;
>   		};
>   
> +		jpgenc: jpgenc@17030000 {

Can we please call this jpeg-encoder@17030000 instead?

> +			compatible = "mediatek,mt8186-jpgenc", "mediatek,mtk-jpgenc";
> +			reg = <0 0x17030000 0 0x10000>;
> +			interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH 0>;
> +			clocks = <&vencsys CLK_VENC_CKE2_JPGENC>;
> +			clock-names = "jpgenc";

clock-names ...
iommus ....
power-domains ...

Cheers,
Angelo



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

* Re: [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count
  2023-12-27 13:08 [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count Eugen Hristev
  2023-12-27 13:08 ` [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node Eugen Hristev
@ 2024-01-02  9:29 ` AngeloGioacchino Del Regno
  2024-01-09  3:27 ` Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-01-02  9:29 UTC (permalink / raw)
  To: Eugen Hristev, bin.liu, matthias.bgg, linux-media, devicetree
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek

Il 27/12/23 14:08, Eugen Hristev ha scritto:
> MT8186 has 4 iommus in the list, to cope with this situation, adjust
> the maxItems to 4 (instead of previous 2).
> Add also minItems as 1 since iommus are mandatory, to avoid warning
> on the example.
> 
> Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
> ---
>   .../devicetree/bindings/media/mediatek-jpeg-encoder.yaml       | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml b/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
> index 37800e1908cc..60c75b9312e8 100644
> --- a/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
> +++ b/Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml
> @@ -38,7 +38,8 @@ properties:
>       maxItems: 1
>   
>     iommus:
> -    maxItems: 2
> +    minItems: 1
> +    maxItems: 4
>       description: |
>         Points to the respective IOMMU block with master port as argument, see
>         Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.

(commit title) `ioomus` is something I've never heard of before... :-P

Please fix the typo, after which:

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


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

* Re: [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count
  2023-12-27 13:08 [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count Eugen Hristev
  2023-12-27 13:08 ` [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node Eugen Hristev
  2024-01-02  9:29 ` [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count AngeloGioacchino Del Regno
@ 2024-01-09  3:27 ` Rob Herring
  2024-01-15  3:57   ` Eugen Hristev
  2 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2024-01-09  3:27 UTC (permalink / raw)
  To: Eugen Hristev
  Cc: bin.liu, matthias.bgg, angelogioacchino.delregno, linux-media,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Wed, Dec 27, 2023 at 03:08:11PM +0200, Eugen Hristev wrote:
> MT8186 has 4 iommus in the list, to cope with this situation, adjust
> the maxItems to 4 (instead of previous 2).
> Add also minItems as 1 since iommus are mandatory, to avoid warning
> on the example.

maxItems alone means minItems is the same size. If IOMMU is required, 
then 'required' is where that is defined. Is there a case where 1 IOMMU 
is valid? If so, what h/w has this case.

Rob


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

* Re: [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count
  2024-01-09  3:27 ` Rob Herring
@ 2024-01-15  3:57   ` Eugen Hristev
  2024-01-22  7:54     ` Matthias Brugger
  0 siblings, 1 reply; 7+ messages in thread
From: Eugen Hristev @ 2024-01-15  3:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: bin.liu, matthias.bgg, angelogioacchino.delregno, linux-media,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On 1/9/24 05:27, Rob Herring wrote:
> On Wed, Dec 27, 2023 at 03:08:11PM +0200, Eugen Hristev wrote:
>> MT8186 has 4 iommus in the list, to cope with this situation, adjust
>> the maxItems to 4 (instead of previous 2).
>> Add also minItems as 1 since iommus are mandatory, to avoid warning
>> on the example.
> 
> maxItems alone means minItems is the same size. If IOMMU is required, 
> then 'required' is where that is defined. Is there a case where 1 IOMMU 
> is valid? If so, what h/w has this case.
> 
> Rob
> 
> 

Hello Rob,

Without setting a minItems , the example in the binding fails, because it has just
2 items, while the maxItems is now 4.
I set minItems as 1 to avoid restricting any kind of hardware to have at least 2
items, but if you claim that previously, maxItems=minItems=2 , I will change this to 2.
Is that fine with you ?

Eugen

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

* Re: [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count
  2024-01-15  3:57   ` Eugen Hristev
@ 2024-01-22  7:54     ` Matthias Brugger
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Brugger @ 2024-01-22  7:54 UTC (permalink / raw)
  To: Eugen Hristev, Rob Herring
  Cc: bin.liu, angelogioacchino.delregno, linux-media, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek



On 15/01/2024 04:57, Eugen Hristev wrote:
> On 1/9/24 05:27, Rob Herring wrote:
>> On Wed, Dec 27, 2023 at 03:08:11PM +0200, Eugen Hristev wrote:
>>> MT8186 has 4 iommus in the list, to cope with this situation, adjust
>>> the maxItems to 4 (instead of previous 2).
>>> Add also minItems as 1 since iommus are mandatory, to avoid warning
>>> on the example.
>>
>> maxItems alone means minItems is the same size. If IOMMU is required,
>> then 'required' is where that is defined. Is there a case where 1 IOMMU
>> is valid? If so, what h/w has this case.
>>
>> Rob
>>
>>
> 
> Hello Rob,
> 
> Without setting a minItems , the example in the binding fails, because it has just
> 2 items, while the maxItems is now 4.
> I set minItems as 1 to avoid restricting any kind of hardware to have at least 2
> items, but if you claim that previously, maxItems=minItems=2 , I will change this to 2.
> Is that fine with you ?
> 

I think that's what you should do yes. If in the future there shows up a 
platform with just one iommu, then we can fix that.

Regards,
Matthias

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

end of thread, other threads:[~2024-01-22  7:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-27 13:08 [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count Eugen Hristev
2023-12-27 13:08 ` [PATCH 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node Eugen Hristev
2024-01-02  9:28   ` AngeloGioacchino Del Regno
2024-01-02  9:29 ` [PATCH 1/2] dt-bindings: media: mediatek-jpeg-encoder: change max ioomus count AngeloGioacchino Del Regno
2024-01-09  3:27 ` Rob Herring
2024-01-15  3:57   ` Eugen Hristev
2024-01-22  7:54     ` Matthias Brugger

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).