Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vikash Garodia" <vikash.garodia@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [RFC PATCH 01/11] dt-bindings: media: qcom,sm8550-iris: Add vpu sub nodes
Date: Thu, 09 Jul 2026 12:46:34 +0000	[thread overview]
Message-ID: <20260709124634.AB1971F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709-vpu_iommu_iova_handling-v1-1-72bb62cb2dfd@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `oneOf` constraint allows invalid hybrid configurations with both top-level `iommus` and a single stream subnode.
- [Low] Unnecessary `#address-cells` and `#size-cells` properties added to the parent node will trigger a `dtc` warning because no child nodes have `reg` or `ranges` properties.
--

--- Patch [1]: [RFC PATCH 01/11] dt-bindings: media: qcom,sm8550-iris: Add vpu sub nodes ---
commit 952135a9f5f9889eefcc3ad627cf18f885374f2d
Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>

dt-bindings: media: qcom,sm8550-iris: Add vpu sub nodes

VPU hardwares have a limitation where VPU streams are associated with
dedicated addressable address range. To address this limitation, the subset
of stream/s are now represented as sub nodes, so that they can be associated
to the respective addressable range.

> diff --git a/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml b/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml
> index 0400ca1bff05d..bf4d24ce90bd3 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml
> @@ -91,6 +91,51 @@ properties:
>    opp-table:
>      type: object
>  
> +  '#address-cells':
> +    const: 2
> +
> +  '#size-cells':
> +    const: 2
> +

[Severity: Low]
Does the addition of #address-cells and #size-cells properties to the parent
node trigger a dtc warning?

Since none of the new child nodes (non-pixel, pixel, firmware, or opp-table)
use a reg or ranges property, the avoid_unnecessary_addr_size compiler warning
might be triggered during dt_binding_check.

[ ... ]

> @@ -98,9 +143,15 @@ required:
>    - interconnect-names
>    - resets
>    - reset-names
> -  - iommus
>    - dma-coherent
>  
> +oneOf:
> +  - required:
> +      - iommus
> +  - required:
> +      - non-pixel
> +      - pixel
> +

[Severity: Medium]
Will this oneOf constraint allow invalid hybrid configurations to pass
validation?

If a devicetree incorrectly specifies a top-level iommus property alongside
only one of the subnodes (such as non-pixel), the first branch evaluates to
true and the second branch evaluates to false. Because exactly one branch is
true, the oneOf condition is satisfied instead of rejecting the hybrid state.

Should the branches explicitly forbid the properties of the other branch to
prevent this?

[ ... ]

> @@ -177,12 +228,21 @@ examples:
>          resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>;
>          reset-names = "bus";
>  
> -        iommus = <&apps_smmu 0x1940 0x0000>,
> -                 <&apps_smmu 0x1947 0x0000>;
>          dma-coherent;
>  
>          operating-points-v2 = <&iris_opp_table>;
>  
> +        #address-cells = <2>;
> +        #size-cells = <2>;
> +        iris_non_pixel: non-pixel {

[Severity: Low]
Does explicitly setting these properties in the example cause dt_binding_check
to emit a warning due to the lack of reg properties in the child nodes?

> +            iommus = <&apps_smmu 0x1940 0x0000>;
> +            memory-region = <&iris_resv>;
> +        };
> +
> +        iris_pixel: pixel {
> +            iommus = <&apps_smmu 0x1947 0x0000>;
> +        };
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260709-vpu_iommu_iova_handling-v1-0-72bb62cb2dfd@oss.qualcomm.com?part=1

  reply	other threads:[~2026-07-09 12:46 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7GAZnP6jPoRrcDnaVzeaB98cONLhtvbiEXV1yD5MJJrA9pCnC9lmlSiCGA8vlDezSXADjmFiqo3ZdClO5SxCFA==@protonmail.internalid>
2026-07-09 12:35 ` [RFC PATCH 00/11] : media: iris: Migrate iommus to iris sub nodes Vikash Garodia
2026-07-09 12:35   ` [RFC PATCH 01/11] dt-bindings: media: qcom,sm8550-iris: Add vpu " Vikash Garodia
2026-07-09 12:46     ` sashiko-bot [this message]
2026-07-09 12:50     ` Dmitry Baryshkov
2026-07-10  6:02       ` Vikash Garodia
2026-07-10 15:53         ` Dmitry Baryshkov
2026-07-11  5:46           ` Vikash Garodia
2026-07-10 22:02     ` Bryan O'Donoghue
2026-07-09 12:35   ` [RFC PATCH 02/11] media: iris: Add hooks to initialize and tear down context banks Vikash Garodia
2026-07-09 12:57     ` sashiko-bot
2026-07-09 12:35   ` [RFC PATCH 03/11] media: iris: Add helper to create a context bank device Vikash Garodia
2026-07-09 13:10     ` sashiko-bot
2026-07-09 12:35   ` [RFC PATCH 04/11] media: iris: Add helper to select relevant " Vikash Garodia
2026-07-09 12:35   ` [RFC PATCH 05/11] media: iris: Skip DMA mask setting to core device when IOMMU is not mapped Vikash Garodia
2026-07-09 13:10     ` Dmitry Baryshkov
2026-07-09 13:43     ` sashiko-bot
2026-07-09 12:35   ` [RFC PATCH 06/11] media: iris: Add hooks for pixel and non-pixel context banks Vikash Garodia
2026-07-09 13:14     ` Dmitry Baryshkov
2026-07-10  6:32       ` Vikash Garodia
2026-07-10 16:03         ` Dmitry Baryshkov
2026-07-09 13:54     ` sashiko-bot
2026-07-10 16:12       ` Dmitry Baryshkov
2026-07-09 12:35   ` [RFC PATCH 07/11] arm64: dts: qcom: hamoa: Move Iris IOMMUs to sub nodes Vikash Garodia
2026-07-09 13:03     ` Dmitry Baryshkov
2026-07-10  6:05       ` Vikash Garodia
2026-07-10 21:05         ` Dmitry Baryshkov
2026-07-09 14:10     ` sashiko-bot
2026-07-10 10:48     ` Bryan O'Donoghue
2026-07-10 22:46     ` Bryan O'Donoghue
2026-07-09 12:35   ` [RFC PATCH 08/11] arm64: dts: qcom: sm8550: Move Iris IOMMUs to child nodes Vikash Garodia
2026-07-09 14:30     ` sashiko-bot
2026-07-09 12:35   ` [RFC PATCH 09/11] arm64: dts: qcom: lemans: " Vikash Garodia
2026-07-09 14:44     ` sashiko-bot
2026-07-09 12:35   ` [RFC PATCH 10/11] arm64: dts: qcom: monaco: " Vikash Garodia
2026-07-09 15:03     ` sashiko-bot
2026-07-09 12:35   ` [RFC PATCH 11/11] arm64: dts: qcom: sm8650: " Vikash Garodia
2026-07-09 15:29     ` sashiko-bot
2026-07-10 10:35   ` [RFC PATCH 00/11] : media: iris: Migrate iommus to iris sub nodes Bryan O'Donoghue
2026-07-10 13:36     ` Vikash Garodia
2026-07-10 13:38       ` Bryan O'Donoghue
2026-07-10 14:02         ` Vikash Garodia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260709124634.AB1971F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vikash.garodia@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox