File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -163,13 +163,6 @@ int panthor_devfreq_init(struct panthor_device *ptdev)
163
163
164
164
cur_freq = clk_get_rate (ptdev -> clks .core );
165
165
166
- opp = devfreq_recommended_opp (dev , & cur_freq , 0 );
167
- if (IS_ERR (opp ))
168
- return PTR_ERR (opp );
169
-
170
- panthor_devfreq_profile .initial_freq = cur_freq ;
171
- ptdev -> current_frequency = cur_freq ;
172
-
173
166
/* Regulator coupling only takes care of synchronizing/balancing voltage
174
167
* updates, but the coupled regulator needs to be enabled manually.
175
168
*
@@ -200,18 +193,24 @@ int panthor_devfreq_init(struct panthor_device *ptdev)
200
193
return ret ;
201
194
}
202
195
196
+ opp = devfreq_recommended_opp (dev , & cur_freq , 0 );
197
+ if (IS_ERR (opp ))
198
+ return PTR_ERR (opp );
199
+
200
+ panthor_devfreq_profile .initial_freq = cur_freq ;
201
+ ptdev -> current_frequency = cur_freq ;
202
+
203
203
/*
204
204
* Set the recommend OPP this will enable and configure the regulator
205
205
* if any and will avoid a switch off by regulator_late_cleanup()
206
206
*/
207
207
ret = dev_pm_opp_set_opp (dev , opp );
208
+ dev_pm_opp_put (opp );
208
209
if (ret ) {
209
210
DRM_DEV_ERROR (dev , "Couldn't set recommended OPP\n" );
210
211
return ret ;
211
212
}
212
213
213
- dev_pm_opp_put (opp );
214
-
215
214
/* Find the fastest defined rate */
216
215
opp = dev_pm_opp_find_freq_floor (dev , & freq );
217
216
if (IS_ERR (opp ))
You can’t perform that action at this time.
0 commit comments