From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Gwendal Grignou <gwendal@chromium.org>,
bleung@chromium.org, bhanumaiya@chromium.org
Cc: groeck@chromium.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform: chrome: Fix EC timestamp overflow
Date: Wed, 1 Jul 2020 11:11:26 +0200 [thread overview]
Message-ID: <2f4f14e9-c7cb-ec6d-e3e9-b9f4132db808@collabora.com> (raw)
In-Reply-To: <20200630075203.3054990-1-gwendal@chromium.org>
Hi Gwendal,
Thank you for your patch.
On 30/6/20 9:52, Gwendal Grignou wrote:
> EC is using 32 bit timestamps (us), and before converting it to 64bit
> they were not casted, so it would overflow every 4s.
> Regular overflow every ~70 minutes was not taken into acoun either.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Applied for 5.9 with a slightly modified subject, platform/chrome:
cros_ec_sensorhub: ...
> ---
> drivers/platform/chrome/cros_ec_sensorhub_ring.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_sensorhub_ring.c b/drivers/platform/chrome/cros_ec_sensorhub_ring.c
> index 23960f3acc0b1..641d91088cee2 100644
> --- a/drivers/platform/chrome/cros_ec_sensorhub_ring.c
> +++ b/drivers/platform/chrome/cros_ec_sensorhub_ring.c
> @@ -465,9 +465,7 @@ cros_ec_sensor_ring_process_event(struct cros_ec_sensorhub *sensorhub,
> * Disable filtering since we might add more jitter
> * if b is in a random point in time.
> */
> - new_timestamp = fifo_timestamp -
> - fifo_info->timestamp * 1000 +
> - in->timestamp * 1000;
> + new_timestamp = c - b * 1000 + a * 1000;
> /*
> * The timestamp can be stale if we had to use the fifo
> * info timestamp.
>
prev parent reply other threads:[~2020-07-01 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 7:52 Gwendal Grignou
2020-07-01 9:11 ` Enric Balletbo i Serra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2f4f14e9-c7cb-ec6d-e3e9-b9f4132db808@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=bhanumaiya@chromium.org \
--cc=bleung@chromium.org \
--cc=groeck@chromium.org \
--cc=gwendal@chromium.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®