[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1f243f35b02d53fde5bf730a7da1a789186f62b1.1653564321.git.viresh.kumar@linaro.org>
Date: Thu, 26 May 2022 17:12:16 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Stanimir Varbanov <stanimir.varbanov@...aro.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Rafael Wysocki <rjw@...ysocki.net>,
Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 17/31] media: venus: Migrate to dev_pm_opp_set_config()
The OPP core now provides a unified API for setting all configuration
types, i.e. dev_pm_opp_set_config().
Lets start using it.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/media/platform/qcom/venus/pm_helpers.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index cb48c5ff3dee..16f8849896a9 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -294,12 +294,15 @@ static int load_scale_v1(struct venus_inst *inst)
static int core_get_v1(struct venus_core *core)
{
int ret;
+ struct dev_pm_opp_config config = {
+ .clk_name = "core",
+ };
ret = core_clks_get(core);
if (ret)
return ret;
- ret = devm_pm_opp_set_clkname(core->dev, "core");
+ ret = devm_pm_opp_set_config(core->dev, &config);
if (ret)
return ret;
@@ -862,6 +865,10 @@ static int vcodec_domains_get(struct venus_core *core)
const struct venus_resources *res = core->res;
struct device *pd;
unsigned int i;
+ struct dev_pm_opp_config config = {
+ .genpd_names = res->opp_pmdomain,
+ .virt_devs = &opp_virt_dev,
+ };
if (!res->vcodec_pmdomains_num)
goto skip_pmdomains;
@@ -879,7 +886,7 @@ static int vcodec_domains_get(struct venus_core *core)
return 0;
/* Attach the power domain for setting performance state */
- ret = devm_pm_opp_attach_genpd(dev, res->opp_pmdomain, &opp_virt_dev);
+ ret = devm_pm_opp_set_config(dev, &config);
if (ret)
goto opp_attach_err;
@@ -978,6 +985,9 @@ static int core_get_v4(struct venus_core *core)
struct device *dev = core->dev;
const struct venus_resources *res = core->res;
int ret;
+ struct dev_pm_opp_config config = {
+ .clk_name = "core",
+ };
ret = core_clks_get(core);
if (ret)
@@ -1003,7 +1013,7 @@ static int core_get_v4(struct venus_core *core)
if (legacy_binding)
return 0;
- ret = devm_pm_opp_set_clkname(dev, "core");
+ ret = devm_pm_opp_set_config(dev, &config);
if (ret)
return ret;
--
2.31.1.272.g89b43f80a514
Powered by blists - more mailing lists