[RAMEN9610-8149] [COMMON] samsung: exynos-dm: Check gov_min_freq with policy_max
authorHyeonseong Gil <hs.gil@samsung.com>
Mon, 21 May 2018 00:23:15 +0000 (09:23 +0900)
committerhskang <hs1218.kang@samsung.com>
Thu, 15 Nov 2018 04:58:21 +0000 (13:58 +0900)
Change-Id: I9caef6ce27e524135d688f97a0fe5b83bb8dcfa6
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/soc/samsung/exynos-dm.c

index 779d4926228863e6368859d8d2278a68f8bd628e..2f4c19cdd11512d70d71fdd3ae5b8a9238b362b1 100644 (file)
@@ -797,6 +797,9 @@ static int __DM_CALL(int dm_type, unsigned long *target_freq)
        old_min_freq = dm->min_freq;
        dm->gov_min_freq = (u32)(*target_freq);
 
+       if (dm->gov_min_freq > dm->policy_max_freq)
+               dm->gov_min_freq = dm->policy_max_freq;
+
        for (i = 0; i < exynos_dm->domain_count; i++)
                (&exynos_dm->dm_data[i])->constraint_checked = 0;