From 3c85c5083625a1b31553f147c90431e80b0af63e Mon Sep 17 00:00:00 2001 From: Hyeonseong Gil Date: Mon, 21 May 2018 09:23:15 +0900 Subject: [PATCH] [RAMEN9610-8149] [COMMON] samsung: exynos-dm: Check gov_min_freq with policy_max Change-Id: I9caef6ce27e524135d688f97a0fe5b83bb8dcfa6 Signed-off-by: Hyeonseong Gil --- drivers/soc/samsung/exynos-dm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 779d49262288..2f4c19cdd115 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -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; -- 2.20.1