From ffc481b8acc22ee8bbbf142db5b74d99c6bde926 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 7 Feb 2014 09:59:42 +0100 Subject: [PATCH] tests/pm_rps: Round requested freq correctly The kernel will round it, so if we don't we'll have a spurious mismatch. Happens on my machine here with 650-1300MHz range, where the midpoint is 975. Cc: Jeff McGee Signed-off-by: Daniel Vetter --- tests/pm_rps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/pm_rps.c b/tests/pm_rps.c index 4670381..27e7587 100644 --- a/tests/pm_rps.c +++ b/tests/pm_rps.c @@ -350,6 +350,9 @@ static void min_max_config(void (*check)(void)) { int fmid = (origfreqs[RPn] + origfreqs[RP0]) / 2; + /* hw (and so kernel) currently rounds to 50 MHz ... */ + fmid = fmid / 50 * 50; + log("\nCheck original min and max...\n"); check(); -- 2.7.4