summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/lima/lima_devfreq.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-11-20 11:29:39 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-11-20 11:29:39 -0300
commitb3c39b1a96a67a7e246d562f44d04ce6f9ef878f (patch)
tree6874debfde448db313bd7c53c3aca59687038c1f /drivers/gpu/drm/lima/lima_devfreq.c
parent63a3bf5e8d9e79ce456c8f73d4395a5a51d841b1 (diff)
parent77c51ba552a1c4f73228766e43ae37c4101b3758 (diff)
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes and check if libraries used that comes from other trees continue to work with tools/perf, such as tools/lib/bpf. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/lima/lima_devfreq.c')
-rw-r--r--drivers/gpu/drm/lima/lima_devfreq.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
index 011be7ff51e1a..bc8fb4e38d0a7 100644
--- a/drivers/gpu/drm/lima/lima_devfreq.c
+++ b/drivers/gpu/drm/lima/lima_devfreq.c
@@ -112,11 +112,6 @@ int lima_devfreq_init(struct lima_device *ldev)
unsigned long cur_freq;
int ret;
const char *regulator_names[] = { "mali", NULL };
- const char *clk_names[] = { "core", NULL };
- struct dev_pm_opp_config config = {
- .regulator_names = regulator_names,
- .clk_names = clk_names,
- };
if (!device_property_present(dev, "operating-points-v2"))
/* Optional, continue without devfreq */
@@ -124,7 +119,15 @@ int lima_devfreq_init(struct lima_device *ldev)
spin_lock_init(&ldevfreq->lock);
- ret = devm_pm_opp_set_config(dev, &config);
+ /*
+ * clkname is set separately so it is not affected by the optional
+ * regulator setting which may return error.
+ */
+ ret = devm_pm_opp_set_clkname(dev, "core");
+ if (ret)
+ return ret;
+
+ ret = devm_pm_opp_set_regulators(dev, regulator_names);
if (ret) {
/* Continue if the optional regulator is missing */
if (ret != -ENODEV)