summaryrefslogtreecommitdiff
path: root/overlay/power.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-20 11:09:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-20 11:09:11 +0100
commitc6482b781462a291495b9a3b8befa26d49a5ebd0 (patch)
tree3d300c1f1c3019c59d529a45be7a179ee09d08c0 /overlay/power.c
parentc888507b68c665e15d02defae9d341245c87b1c2 (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/power.c')
-rw-r--r--overlay/power.c2
1 files changed, 1 insertions, 1 deletions
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;
}