All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Giri Prasad Goriparthi" <giri.goriparthi@oss.qualcomm.com>
Cc: linux-scsi@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: talos: Add opp-level for UFS gear speed
Date: Wed, 02 Dec 2026 08:30:37 +0000	[thread overview]
Message-ID: <sashiko-outbox-245195@kernel.org> (raw)
In-Reply-To: <20261202-b4-ufs-qcom-multi-gear-scaling-v2-3-e2fe4cbce19d@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] arm64: dts: qcom: talos: ufs opp-level overwrites RPMHPD_CX
  required-opps vote
--

commit 6e8685a87ed8d43c7930a350f78d3142645dd78c
Author: Giri Prasad Goriparthi <giri.goriparthi@oss.qualcomm.com>

arm64: dts: qcom: talos: Add opp-level for UFS gear speed

This commit adds opp-level properties to the UFS OPP table in talos.dtsi to
specify the UFS HS gear level for each frequency entry.

> diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi b/arch/arm64/boot/dts/qcom/talos.dtsi
> index 1d74e459f892e..b9e21108637d2 100644
> --- a/arch/arm64/boot/dts/qcom/talos.dtsi
> +++ b/arch/arm64/boot/dts/qcom/talos.dtsi
> @@ -1498,6 +1498,7 @@ opp-50000000 {
>  						 /bits/ 64 <0>,
>  						 /bits/ 64 <0>,
>  						 /bits/ 64 <75000000>;
> +					opp-level = <1>;
>  					required-opps = <&rpmhpd_opp_low_svs>;
>  				};
>  
> @@ -1510,6 +1511,7 @@ opp-100000000 {
>  						 /bits/ 64 <0>,
>  						 /bits/ 64 <0>,
>  						 /bits/ 64 <150000000>;
> +					opp-level = <1>;
>  					required-opps = <&rpmhpd_opp_svs>;
>  				};
>  
> @@ -1522,6 +1524,7 @@ opp-200000000 {
>  						 /bits/ 64 <0>,
>  						 /bits/ 64 <0>,
>  						 /bits/ 64 <300000000>;
> +					opp-level = <3>;
>  					required-opps = <&rpmhpd_opp_nom>;
>  				};
>  			};

[Severity: High]
Does adding opp-level alongside required-opps here overwrite the UFS
controller's RPMHPD_CX performance state vote with the raw UFS gear number
(1 or 3)?

Because ufs_mem_hc has a single power-domains entry (<&gcc UFS_PHY_GDSC>,
which is a subdomain of RPMHPD_CX), __genpd_dev_pm_attach() attaches the
UFS device itself as opp_table->required_devs[0].

When _set_opp() scales up, _set_required_opps() votes for the required-opps
corner (64, 128, or 256) on the UFS device, and _set_opp_level() runs right
after on the same device:

drivers/opp/core.c:_set_opp() {
	...
	if (!scaling_down) {
		ret = _set_required_opps(dev, opp_table, opp, true);
		if (ret) {
			dev_err(dev, "Failed to set required opps: %d\n", ret);
			return ret;
		}

		ret = _set_opp_level(dev, opp);
		if (ret)
			return ret;
	}
	...
}

Previously opp->level was unset, so _set_opp_level() was a no-op. With
opp-level set to 1 or 3, _set_opp_level() calls
dev_pm_domain_set_performance_state(dev, opp->level) on the same UFS
device, replacing the SVS (128) or NOM (256) vote on RPMHPD_CX with 1 or 3
(dropping the UFS CX vote to enable_corner) before scaling UFS clocks up to
100 MHz or 200 MHz.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-b4-ufs-qcom-multi-gear-scaling-v2-0-e2fe4cbce19d@oss.qualcomm.com?part=3

      reply	other threads:[~2026-12-02  8:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  8:14 [PATCH v2 0/3] ufs-qcom: Add specified gear support for multi gear scaling Giri Prasad Goriparthi
2026-12-02  8:14 ` [PATCH v2 1/3] scsi: ufs: " Giri Prasad Goriparthi
2026-12-02  8:32   ` sashiko-bot
2026-12-02  8:14 ` [PATCH v2 2/3] arm64: dts: qcom: hamoa: Add opp-level for UFS gear speed Giri Prasad Goriparthi
2026-12-02  8:28   ` sashiko-bot
2026-12-02  8:15 ` [PATCH v2 3/3] arm64: dts: qcom: talos: " Giri Prasad Goriparthi
2026-12-02  8:30   ` sashiko-bot [this message]

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-245195@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=giri.goriparthi@oss.qualcomm.com \
    --cc=linux-scsi@vger.kernel.org \
    --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 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.