Commit 90406541 authored by Ionela Voinescu's avatar Ionela Voinescu
Browse files

TEMP FIX: always call _find_current_opp(dev, opp_table)

This fixes commit 81c4d8a3.

Before the commit above, we always used to obtain information about the
current OPP from hardware. If this performance level was different from
the one we wanted to set, we would go ahead and set it. But after this
patch, we use a cached value for the current opp which (somehow) ends up
being different from what hardware has knowledge of. This results in
an opp change request sometimes failing.
parent dbe534bd
......@@ -961,6 +961,10 @@ static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
mutex_unlock(&opp_table->lock);
}
/* Drop reference to previous current_opp */
if (likely(opp_table->current_opp))
dev_pm_opp_put(opp_table->current_opp);
opp_table->current_opp = opp;
}
......@@ -1001,9 +1005,7 @@ static int _set_opp(struct device *dev, struct opp_table *opp_table,
if (unlikely(!opp))
return _disable_opp_table(dev, opp_table);
/* Find the currently set OPP if we don't know already */
if (unlikely(!opp_table->current_opp))
_find_current_opp(dev, opp_table);
_find_current_opp(dev, opp_table);
old_opp = opp_table->current_opp;
......
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