[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230315123452.GA1927922@google.com>
Date: Wed, 15 Mar 2023 21:34:52 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
Sergey Senozhatsky <senozhatsky@...omium.org>,
"hn.chen" <hn.chen@...plusit.com>
Subject: Re: [PATCH v7 6/6] media: uvcvideo: Fix hw timestamp handling for
slow FPS
On (23/03/10 10:01), Ricardo Ribalda wrote:
[..]
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -473,6 +473,21 @@ static void uvc_video_clock_add_sample(struct uvc_clock *clock,
>
> spin_lock_irqsave(&clock->lock, flags);
>
> + /* Delete last overflows */
> + if (clock->head == clock->last_sof_overflow)
> + clock->last_sof_overflow = -1;
> +
> + /* Handle overflows */
> + if (clock->count > 0 && clock->last_sof > sample->dev_sof) {
Per offline discussion, we set clock->last_sof to sameple->dev_sof
right before uvc_video_clock_add_sample() so this condition is always
false. clock->sof needs to be updated after overflow handling checks.
Powered by blists - more mailing lists