CHROMIUM: MALI: Don't require opp-hz-real when there is a single clock
It does not seem useful to introduce another redudant (and
non-upstream) entry in the device tree, especially if there is
only a single clock.
BUG=b:149806107
TEST=boot kukui
Change-Id: I065126860e03c386a00daff223806a3bceaa2812
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
diff --git a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
index e42fa23..6e681dd 100644
--- a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
+++ b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
@@ -432,9 +432,14 @@
err = of_property_read_u64(node, "opp-hz-real", real_freqs);
#endif
if (err < 0) {
- dev_warn(kbdev->dev, "Failed to read opp-hz-real property with error %d\n",
+ if (kbdev->nr_clocks == 1) {
+ /* Single clock, fall back to using opp-hz. */
+ real_freqs[0] = opp_freq;
+ } else {
+ dev_warn(kbdev->dev, "Failed to read opp-hz-real property with error %d\n",
err);
- continue;
+ continue;
+ }
}
#ifdef CONFIG_REGULATOR
err = of_property_read_u32_array(node,