Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 09/18] media: iris: Add platform flag for instantaneous bandwidth voting
Date: Tue, 07 Jul 2026 22:46:08 +0000	[thread overview]
Message-ID: <20260707224608.BD8721F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260708-iris-ar50lt-v6-9-374f0a46c23b@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Pre-existing issues:
- [High] State desynchronization on interconnect bandwidth update failure, leading to permanent bandwidth voting bypass.
- [High] The interconnect bandwidth vote for the 'cpu-cfg' path is permanently dropped to 0 after the first suspend cycle.
--

--- Patch [9]: [PATCH v6 09/18] media: iris: Add platform flag for instantaneous bandwidth voting ---
commit 626a7011b6fd7b2bb9e6fe29e1b8acf22f4ae173
Author: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>

media: iris: Add platform flag for instantaneous bandwidth voting
    
AR50LT require explicit instantaneous bandwidth (IB) voting in addition
to average bandwidth (AB) when configuring interconnect QoS. This
requirement is due to QSB (Qualcomm System Bus) 128b to
QNS ( Qualcomm Network Switch) 256b conversion at video noc in AR50LT
which is not needed for other IRIS cores.

In preparation of adding support for AR50LT core, introduce
platform-configurable IB multiplier and enable IB voting for all SoCs.
Existing platforms default to IB == AB, while AR50LT requires 2x peak
bandwidth.

[ ... ]

> diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/media/platform/qcom/iris/iris_resources.c
> index 773f6548370a2..caeaf199cef74 100644
> --- a/drivers/media/platform/qcom/iris/iris_resources.c
> +++ b/drivers/media/platform/qcom/iris/iris_resources.c
> @@ -18,6 +18,7 @@
>  
>  int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw)
>  {
> +	u32 icc_ib_multiplier = core->iris_platform_data->icc_ib_multiplier;

[Severity: High]
This isn't a bug introduced by this patch, but does this function
permanently drop the interconnect bandwidth vote for the 'cpu-cfg' path
after the first suspend cycle?

During initialization, 'cpu-cfg' is set to bw_min_kbps. On suspend,
iris_unset_icc_bw() sets all interconnect paths (including 'cpu-cfg') to 0.

However, upon resume, iris_set_icc_bw() iterates through the paths but
only updates 'video-mem':

	for (i = 0; i < core->icc_count; i++) {
		if (!strcmp(core->icc_tbl[i].name, "video-mem")) {
			bw_kbps = icc_bw;
			...

When icc_bulk_set_bw() is called at the end of this function, 'cpu-cfg'
remains at 0. This could lead to a fatal system crash on Qualcomm SoCs
when register access to the VPU is attempted over the AHB bus without
this bandwidth.

>  	unsigned long bw_kbps = 0, bw_prev = 0;
>  	const struct icc_info *icc_tbl;
>  	int ret = 0, i;
> @@ -36,6 +37,7 @@ int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw)
>  				return ret;
>  
>  			core->icc_tbl[i].avg_bw = bw_kbps;
> +			core->icc_tbl[i].peak_bw = bw_kbps * icc_ib_multiplier;
>  
>  			core->power.icc_bw = bw_kbps;
>  			break;

[Severity: High]
This is a pre-existing issue, but can updating core->power.icc_bw here
lead to state desynchronization if the actual hardware vote fails?

This updates the internal state before ensuring the vote succeeds:

			core->power.icc_bw = bw_kbps;
			break;
		}
	}

	return icc_bulk_set_bw(core->icc_count, core->icc_tbl);

If icc_bulk_set_bw() returns an error, the operation is aborted but the
software state remains updated. On the next call to iris_set_icc_bw()
with a similar bandwidth, the check abs(bw_kbps - bw_prev) < BW_THRESHOLD
will succeed. This causes it to return early and bypass the interconnect
update, leaving the hardware operating with insufficient or no interconnect
bandwidth.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-iris-ar50lt-v6-0-374f0a46c23b@oss.qualcomm.com?part=9

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

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 22:28 [PATCH v6 00/18] media: iris: Add AR50LT core support and enable Agatti platform Dmitry Baryshkov
2026-07-07 22:28 ` [PATCH v6 01/18] media: iris: Add Gen2 firmware autodetect and fallback Dmitry Baryshkov
2026-07-07 22:46   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 02/18] media: iris: Skip UBWC configuration when not supported Dmitry Baryshkov
2026-07-07 22:28 ` [PATCH v6 03/18] media: iris: drop IRIS_FMT_foo enumeration Dmitry Baryshkov
2026-07-08  5:32   ` Vikash Garodia
2026-07-07 22:28 ` [PATCH v6 04/18] media: iris: Filter UBWC raw formats based on hardware capabilities Dmitry Baryshkov
2026-07-07 22:45   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 05/18] media: iris: Introduce set_preset_register as a vpu_op Dmitry Baryshkov
2026-07-07 22:28 ` [PATCH v6 06/18] media: iris: Introduce interrupt_init " Dmitry Baryshkov
2026-07-07 22:28 ` [PATCH v6 07/18] media: iris: add vpu op hook to disable ARP buffer Dmitry Baryshkov
2026-07-07 22:28 ` [PATCH v6 08/18] media: iris: Add platform data field for watchdog interrupt mask Dmitry Baryshkov
2026-07-07 22:28 ` [PATCH v6 09/18] media: iris: Add platform flag for instantaneous bandwidth voting Dmitry Baryshkov
2026-07-07 22:46   ` sashiko-bot [this message]
2026-07-07 22:28 ` [PATCH v6 10/18] media: iris: skip PIPE if it is not supported by the platform Dmitry Baryshkov
2026-07-07 22:57   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 11/18] media: iris: Add framework support for AR50_LITE video core Dmitry Baryshkov
2026-07-07 22:42   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 12/18] media: iris: add minimal GET_PROPERTY implementation Dmitry Baryshkov
2026-07-07 22:50   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 13/18] media: iris: update buffer requirements based on received info Dmitry Baryshkov
2026-07-07 22:49   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 14/18] media: iris: implement support for the Agatti platform Dmitry Baryshkov
2026-07-07 22:53   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 15/18] media: iris: Introduce buffer size calculations for AR50LT Dmitry Baryshkov
2026-07-07 22:50   ` sashiko-bot
2026-07-07 22:28 ` [PATCH v6 16/18] media: iris: add Gen2 firmware support on the Agatti platform Dmitry Baryshkov
2026-07-07 22:29 ` [PATCH v6 17/18] media: venus: skip QCM2290 if Iris driver is enabled Dmitry Baryshkov
2026-07-07 22:50   ` sashiko-bot
2026-07-07 22:29 ` [PATCH v6 18/18] media: iris: constify inst_fw_cap_sm8250_dec Dmitry Baryshkov

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=20260707224608.BD8721F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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