From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org, "hn.chen" <hn.chen@sunplusit.com>
Subject: Re: [PATCH v6 3/5] media: uvcvideo: Allow hw clock updates with buffers not full
Date: Fri, 10 Mar 2023 11:20:54 +0900 [thread overview]
Message-ID: <20230310022054.GG1045797@google.com> (raw)
In-Reply-To: <20220920-resend-hwtimestamp-v6-3-c7a99299ec35@chromium.org>
On (23/03/09 13:55), Ricardo Ribalda wrote:
[..]
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -754,10 +754,10 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
>
> spin_lock_irqsave(&clock->lock, flags);
>
> - if (clock->count < clock->size)
> + if (clock->count < 2)
> goto done;
>
> - first = &clock->samples[clock->head];
> + first = &clock->samples[(clock->head - clock->count) % clock->size];
This looks like a significant change: `rb->head` and `rb->head - INT`
are quite different things. May I ask for some clarifications?
[..]
> + /*
> + * Have at least 1/4 of a second of timestamps before we
> + * try to do any calculation. Otherwise we do not have enough
> + * precision. This value was determined by running Android CTS
> + * on different devices.
> + */
> + if ((y2 - y1) < (256 << 16))
256 << 16 is 1/4 of a second?
next prev parent reply other threads:[~2023-03-10 2:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 12:55 [PATCH v6 0/5] uvcvideo: Fixes for hw timestamping Ricardo Ribalda
2023-03-09 12:55 ` [PATCH v6 1/5] media: uvcvideo: Ignore empty TS packets Ricardo Ribalda
2023-03-10 1:57 ` Sergey Senozhatsky
2023-03-09 12:55 ` [PATCH v6 2/5] media: uvcvideo: Quirk for invalid dev_sof in Logitech C922 Ricardo Ribalda
2023-03-10 1:58 ` Sergey Senozhatsky
2023-03-09 12:55 ` [PATCH v6 3/5] media: uvcvideo: Allow hw clock updates with buffers not full Ricardo Ribalda
2023-03-10 2:20 ` Sergey Senozhatsky [this message]
2023-03-09 12:55 ` [PATCH v6 4/5] media: uvcvideo: Refactor clock circular buffer Ricardo Ribalda
2023-03-09 12:55 ` [PATCH v6 5/5] media: uvcvideo: Fix hw timestamp handling for slow FPS Ricardo Ribalda
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=20230310022054.GG1045797@google.com \
--to=senozhatsky@chromium.org \
--cc=hn.chen@sunplusit.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.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;
as well as URLs for NNTP newsgroup(s).