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>
This commit is contained in:
Chris Wilson 2013-08-20 11:09:11 +01:00
parent c888507b68
commit c6482b7814

View File

@ -75,7 +75,7 @@ int power_update(struct power *power)
return EAGAIN; return EAGAIN;
d_time = s->timestamp - d->timestamp; 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--; power->count--;
return power->count <= 1 ? EAGAIN : 0; return power->count <= 1 ? EAGAIN : 0;
} }