All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vikash Garodia" <vikash.garodia@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org,
	media-ci@linuxtv.org, robh@kernel.org
Subject: Re: [PATCH v2 01/12] dt-bindings: media: qcom,venus: Add context bank subnodes to common schema
Date: Fri, 31 Jul 2026 18:36:06 +0000	[thread overview]
Message-ID: <20260731183606.936E31F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <20260731-vpu_iommu_iova_handling-v2-1-da52b5228dbd@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The newly defined context bank subnodes are entirely inaccessible to the targeted `sm8550-iris` platform.
- [Medium] Missing required properties in the common schema's subnode validation block.
- [Medium] Schema validation conflict for migrated child schemas due to unconditionally required `iommus` property.
--

--- Patch [1]: [PATCH v2 01/12] dt-bindings: media: qcom,venus: Add context bank subnodes to common schema ---
commit f7ccdc698c2e9a5f1a41568fd6c456d9da607bec
Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>

dt-bindings: media: qcom,venus: Add context bank subnodes to common schema

This commit describes each VPU SMMU stream as its own context bank subnode
to associate it with its reachable IOVA range. It adds non-pixel, pixel,
and video-firmware to the common schema, replacing the single iommus
property approach.

> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> index b21bed3148484..bfd8b1ad47312 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
[ ... ]
> @@ -91,21 +91,6 @@ properties:
>      deprecated: true
>      additionalProperties: false
>  
> -  video-firmware:
> -    type: object
> -    additionalProperties: false
> -
> -    description: |
> -      Firmware subnode is needed when the platform does not
> -      have TrustZone.
> -
> -    properties:
> -      iommus:
> -        maxItems: 1
> -
> -    required:
> -      - iommus
> -
>  required:
>    - compatible
>    - power-domain-names

[Severity: Medium]
Does the unconditionally required iommus property in this file break migrations?

Since the common schema makes iommus optional when the new subnodes are
present via a oneOf block, if a platform like sc7180 is migrated to use the
new subnode layout (dropping the parent iommus), it will fail
make dt_binding_check because qcom,sc7180-venus.yaml still unconditionally
mandates iommus in its local required list.

> diff --git a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml
> index 59a3fde846d21..ccae41bed757b 100644
> --- a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml
> @@ -47,6 +47,50 @@ properties:
>      minItems: 1
>      maxItems: 4
>  
> +  dma-ranges: true
> +
> +  #address-cells:
> +    const: 2
> +
> +  #size-cells:
> +    const: 2
> +
> +  non-pixel:

[Severity: High]
Are these newly defined context bank subnodes accessible to the targeted
sm8550-iris platform?

The commit message notes this limitation applies to every VPU generation and
specifically mentions fixing an issue on sm8550. However,
qcom,sm8550-iris.yaml does not appear to include a $ref to
qcom,venus-common.yaml and sets unevaluatedProperties: false.

Would adding non-pixel or pixel subnodes to the sm8550 device tree result in
an immediate validation failure because the properties are undeclared in the
iris schema?

[ ... ]
> @@ -55,4 +99,11 @@ required:
>    - memory-region
>    - power-domains
>  
> +oneOf:
> +  - required:
> +      - iommus
> +  - required:
> +      - non-pixel
> +      - pixel

[Severity: Medium]
Should #address-cells, #size-cells, and dma-ranges be enforced here when the
subnodes are used?

The commit message explains that adding the subnodes requires these supporting
properties on the parent video-codec node. Without enforcing them in this
oneOf block alongside non-pixel and pixel, device trees can omit these
properties and still pass validation.

Could this cause of_translate_dma_region() to fail or return incorrect IOVAs
at runtime if the properties are omitted?

> +
>  additionalProperties: true

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260731-vpu_iommu_iova_handling-v2-0-da52b5228dbd@oss.qualcomm.com?part=1

  reply	other threads:[~2026-07-31 18:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 18:22 [PATCH v2 00/12] media: iris: Migrate iommus to iris sub nodes Vikash Garodia
2026-07-31 18:22 ` [PATCH v2 01/12] dt-bindings: media: qcom,venus: Add context bank subnodes to common schema Vikash Garodia
2026-07-31 18:36   ` sashiko-bot [this message]
2026-07-31 18:22 ` [PATCH v2 02/12] dt-bindings: media: qcom,sm8550-iris: Add context bank subnodes Vikash Garodia
2026-07-31 18:31   ` sashiko-bot
2026-07-31 20:36   ` Rob Herring (Arm)
2026-07-31 18:22 ` [PATCH v2 03/12] media: iris: Add platform hooks for context bank device setup Vikash Garodia
2026-07-31 18:36   ` sashiko-bot
2026-07-31 18:22 ` [PATCH v2 04/12] media: iris: Add helper to create a context bank device Vikash Garodia
2026-07-31 18:22 ` [PATCH v2 05/12] media: iris: Route buffers to the matching " Vikash Garodia
2026-07-31 18:57   ` sashiko-bot
2026-07-31 18:22 ` [PATCH v2 06/12] media: iris: Skip DMA mask setup when the core device has no IOMMU Vikash Garodia
2026-07-31 18:43   ` sashiko-bot
2026-07-31 18:22 ` [PATCH v2 07/12] media: iris: Create pixel and non-pixel context banks on VPU3x Vikash Garodia
2026-07-31 18:41   ` sashiko-bot
2026-07-31 18:22 ` [PATCH v2 08/12] arm64: dts: qcom: hamoa: Add Iris context bank subnodes Vikash Garodia
2026-07-31 18:22 ` [PATCH v2 09/12] arm64: dts: qcom: sm8550: " Vikash Garodia
2026-07-31 18:38   ` sashiko-bot
2026-07-31 18:22 ` [PATCH v2 10/12] arm64: dts: qcom: lemans: " Vikash Garodia
2026-07-31 18:22 ` [PATCH v2 11/12] arm64: dts: qcom: monaco: " Vikash Garodia
2026-07-31 18:22 ` [PATCH v2 12/12] arm64: dts: qcom: sm8650: " 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=20260731183606.936E31F00AC4@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=media-ci@linuxtv.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.