Commit f2f4d2b8 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Viresh Kumar

opp: Handle missing OPP table in dev_pm_opp_xlate_performance_state()

NVIDIA Tegra SoCs have a power domains topology such that child domains
only clamp a power rail, while parent domain controls shared performance
state of the multiple child domains. In this case child's domain doesn't
need to have OPP table. Hence we want to allow children power domains to
pass performance state to the parent domain if child's domain doesn't have
OPP table.

The dev_pm_opp_xlate_performance_state() gets src_table=NULL if a child
power domain doesn't have OPP table and in this case we should pass the
performance state to the parent domain.
Tested-by: default avatarPeter Geis <pgwipeout@gmail.com>
Tested-by: default avatarNicolas Chauvet <kwizart@gmail.com>
Tested-by: default avatarMatt Merhar <mattmerhar@protonmail.com>
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent b4b9e223
...@@ -2339,7 +2339,7 @@ int dev_pm_opp_xlate_performance_state(struct opp_table *src_table, ...@@ -2339,7 +2339,7 @@ int dev_pm_opp_xlate_performance_state(struct opp_table *src_table,
* and so none of them have the "required-opps" property set. Return the * and so none of them have the "required-opps" property set. Return the
* pstate of the src_table as it is in such cases. * pstate of the src_table as it is in such cases.
*/ */
if (!src_table->required_opp_count) if (!src_table || !src_table->required_opp_count)
return pstate; return pstate;
for (i = 0; i < src_table->required_opp_count; i++) { for (i = 0; i < src_table->required_opp_count; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment