diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-08-03 10:42:36 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-10 05:08:33 -0700 |
commit | a8226e33836ed99dbde26e754e61222ad5a647bd (patch) | |
tree | 2b8005388c285658e5c656e49b9ee2af2e5d5c40 /include | |
parent | 003c9d50b7ff38041dbd3582f386bc886a68dba5 (diff) | |
download | chrome-ec-a8226e33836ed99dbde26e754e61222ad5a647bd.tar.gz |
fpsensor: Add timing statistics.
This commit adds some basic timing statistics around fingerprint
capture, matching, and overall timing for returning a response for a
fingerprint. A new host command is added, EC_CMD_FP_STATS, which
returns these metrics. Additionally, ectool has been extended with the
`fpstats` to command retrieve these metrics.
BUG=b:111316382
BRANCH=None
TEST=Flash nocturne_fp, perform capture and match, view results using
ectool and verify that they are reasonable.
Change-Id: Ib675116eebc8131d7b30e721d00eccfdb8905821
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1162961
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 8e09e7a892..a0289970c7 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -5056,6 +5056,23 @@ struct __ec_align4 ec_response_fp_context { uint32_t nonce[FP_CONTEXT_NONCE_WORDS]; }; +#define EC_CMD_FP_STATS 0x0407 + +#define FPSTATS_CAPTURE_INV (1 << 0) +#define FPSTATS_MATCHING_INV (1 << 1) + +struct __ec_align2 ec_response_fp_stats { + uint32_t capture_time_us; + uint32_t matching_time_us; + uint32_t overall_time_us; + struct { + uint32_t lo; + uint32_t hi; + } overall_t0; + uint8_t timestamps_invalid; + int8_t template_matched; +}; + /*****************************************************************************/ /* Touchpad MCU commands: range 0x0500-0x05FF */ |