linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] interconnect: Restore sync state by ignoring ipa-virt in provider count
@ 2022-04-27  1:32 Stephen Boyd
  2022-04-27 12:00 ` Alex Elder
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Boyd @ 2022-04-27  1:32 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: linux-kernel, patches, linux-pm, linux-arm-msm, Bjorn Andersson,
	Doug Anderson, Alex Elder, Taniya Das, Mike Tipton

Ignore compatible strings for the IPA virt drivers that were removed in
commits 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0
interconnects") and 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0
interconnects") so that the sync state logic can kick in again.
Otherwise all the interconnects in the system will stay pegged at max
speeds because 'providers_count' is always going to be one larger than
the number of drivers that will ever probe on sc7180 or sdx55. This
fixes suspend on sc7180 and sdx55 devices when you don't have a
devicetree patch to remove the ipa-virt compatible node.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Alex Elder <elder@linaro.org>
Cc: Taniya Das <quic_tdas@quicinc.com>
Cc: Mike Tipton <quic_mdtipton@quicinc.com>
Fixes: 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 interconnects")
Fixes: 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 interconnects")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/interconnect/core.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 9050ca1f4285..c52915a58b22 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -1087,9 +1087,15 @@ static int of_count_icc_providers(struct device_node *np)
 {
 	struct device_node *child;
 	int count = 0;
+	const struct of_device_id ignore_list[] = {
+		{ .compatible = "qcom,sc7180-ipa-virt" },
+		{ .compatible = "qcom,sdx55-ipa-virt" },
+		{}
+	};
 
 	for_each_available_child_of_node(np, child) {
-		if (of_property_read_bool(child, "#interconnect-cells"))
+		if (of_property_read_bool(child, "#interconnect-cells") &&
+		    likely(!of_match_node(ignore_list, child)))
 			count++;
 		count += of_count_icc_providers(child);
 	}

base-commit: 2fb251c265608636fc961b7d38e1a03937e57371
-- 
https://chromeos.dev


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-03 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27  1:32 [PATCH] interconnect: Restore sync state by ignoring ipa-virt in provider count Stephen Boyd
2022-04-27 12:00 ` Alex Elder
2022-04-27 20:52   ` Georgi Djakov
2022-04-29 18:52     ` Alex Elder
2022-04-27 14:35 ` Doug Anderson
2022-05-02 15:18 ` Nathan Chancellor
2022-05-03 19:07   ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).