From c6482b781462a291495b9a3b8befa26d49a5ebd0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 20 Aug 2013 11:09:11 +0100 Subject: overlay: Sample power every second Found the bug, but still only read the msr once every second - mainly as an exercise in handling different sample rates. Signed-off-by: Chris Wilson --- overlay/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'overlay/power.c') diff --git a/overlay/power.c b/overlay/power.c index c7ca85cc..8097c933 100644 --- a/overlay/power.c +++ b/overlay/power.c @@ -75,7 +75,7 @@ int power_update(struct power *power) return EAGAIN; d_time = s->timestamp - d->timestamp; - if (d_time < 1200) { /* HW sample rate seems to be stable ~1Hz */ + if (d_time < 900) { /* HW sample rate seems to be stable ~1Hz */ power->count--; return power->count <= 1 ? EAGAIN : 0; } -- cgit v1.2.3