@@ -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;
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@linaro.org> --- drivers/media/platform/qcom/venus/pm_helpers.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)