diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-20 11:09:11 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-20 11:09:11 +0100 |
commit | c6482b781462a291495b9a3b8befa26d49a5ebd0 (patch) | |
tree | 3d300c1f1c3019c59d529a45be7a179ee09d08c0 /overlay/power.c | |
parent | c888507b68c665e15d02defae9d341245c87b1c2 (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.c | 2 |
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; } |