Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wangao Wang" <wangao.wang@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	media-ci@linuxtv.org
Subject: Re: [PATCH v3 4/5] arm64: dts: qcom: eliza-mtp: Enable iris video codec
Date: Tue, 17 Nov 2026 06:52:14 +0000	[thread overview]
Message-ID: <sashiko-outbox-218281@kernel.org> (raw)
In-Reply-To: <20261117-add_iris_for_eliza-v3-4-02a55a9272ef@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] arm64: dts: qcom: eliza-mtp: iris_probe() fails due to
  child-node iommus
- [High] media: iris: NULL deref in iris_set_slice_count() from
  incomplete eliza_data
--

commit 0429ecb16555afb36c6bba89f407a14fa28f8a19
Author: Wangao Wang <wangao.wang@oss.qualcomm.com>

arm64: dts: qcom: eliza-mtp: Enable iris video codec

This commit enables the iris video codec device tree node on the Eliza MTP
board.

> diff --git a/arch/arm64/boot/dts/qcom/eliza-mtp.dts b/arch/arm64/boot/dts/qcom/eliza-mtp.dts
> index ee05192adcfb9..e5a698602dfc7 100644
> --- a/arch/arm64/boot/dts/qcom/eliza-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/eliza-mtp.dts
> @@ -430,6 +430,10 @@ &gpu_zap_shader {
>  	firmware-name = "qcom/eliza/gen71700_zap.mbn";
>  };
>  
> +&iris {
> +	status = "okay";
> +};

[Severity: High]
Does enabling &iris cause iris_probe() to fail with -ENOMEM?

In commit "arm64: dts: qcom: eliza: Add iris video codec node", the
video-codec@aa00000 node places its iommus phandles inside non-pixel and
pixel child nodes rather than on the video-codec node itself:

arch/arm64/boot/dts/qcom/eliza.dtsi {
    ...
		iris: video-codec@aa00000 {
    ...
			non-pixel {
				iommus = <&apps_smmu 0x1940 0x0>;
				iommu-ranges = <0x25800000 0xba800000>;
			};

			pixel {
				iommus = <&apps_smmu 0x1947 0x0>;
			};
		};
}

The upstream iris driver does not parse those child nodes and instead
operates directly on the top-level platform device.  Because the parent
node has no iommus property, pdev->dev is not attached to apps_smmu and
use_dma_iommu(dev) is false, so iris_probe() -> iris_reserve_iova_region()
-> dma_iova_try_alloc() fails immediately.  This layout also fails
dtbs_check against Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml,
which requires iommus on the video-codec node and sets
unevaluatedProperties: false.

[Severity: High]
Can enabling &iris lead to a NULL pointer dereference in
iris_set_slice_count() when encoding with multiple slices?

Enabling this node binds the device to eliza_data (added in commit "media:
iris: Add support for Eliza" in
drivers/media/platform/qcom/iris/iris_platform_vpu3x.c), which omits
.slice_caps, .wd_intr_mask, and .icc_ib_multiplier unlike the other VPU3x
platform descriptors.  When a user configures multi-slice mode
(V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB or
V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES), iris_set_slice_count()
dereferences inst->core->iris_platform_data->slice_caps unconditionally:

drivers/media/platform/qcom/iris/iris_ctrls.c:iris_set_slice_count() {
    ...
	slice_caps = inst->core->iris_platform_data->slice_caps;
    ...
	if (fps > slice_caps->max_slice_frame_rate ||
	    (rc_type != HFI_RC_OFF && rc_type != HFI_RC_CBR_CFR &&
    ...
}

Leaving .wd_intr_mask and .icc_ib_multiplier zero-initialized in
eliza_data also causes iris_vpu_clear_interrupt() and iris_vpu_watchdog()
to ignore hardware watchdog interrupts, and causes iris_set_icc_bw() to
vote 0 peak bandwidth on the video-mem interconnect path.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117-add_iris_for_eliza-v3-0-02a55a9272ef@oss.qualcomm.com?part=4

  reply	other threads:[~2026-11-17  6:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  6:34 [PATCH v3 0/5] media: iris: Enable Iris video codec on Eliza Wangao Wang
2026-11-17  6:34 ` [PATCH v3 1/5] dt-bindings: media: qcom,sm8550-iris: Document Eliza IRIS accelerator Wangao Wang
2026-11-17  6:34 ` [PATCH v3 2/5] media: iris: Add support for Eliza Wangao Wang
2026-11-17  6:47   ` sashiko-bot
2026-11-17  6:34 ` [PATCH v3 3/5] arm64: dts: qcom: eliza: Add iris video codec node Wangao Wang
2026-11-17  6:56   ` sashiko-bot
2026-11-17  6:34 ` [PATCH v3 4/5] arm64: dts: qcom: eliza-mtp: Enable iris video codec Wangao Wang
2026-11-17  6:52   ` sashiko-bot [this message]
2026-11-17  6:34 ` [PATCH v3 5/5] arm64: dts: qcom: eliza-evk: " Wangao Wang

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=sashiko-outbox-218281@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=wangao.wang@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