ACK: [PATCH 1/1] media: uvcvideo: Mark buffer error where overflow
Connor Kuehl
connor.kuehl at canonical.com
Thu Oct 31 22:57:46 UTC 2019
On 10/25/19 9:30 AM, Kai-Heng Feng wrote:
> From: Baoyou Xie <baoyou.xie at linaro.org>
>
> BugLink: https://bugs.launchpad.net/bugs/1849871
>
> Some cameras post inaccurate frame where next frame data overlap
> it. this results in screen flicker, and it need to be prevented.
>
> So this patch marks the buffer error to discard the frame where
> buffer overflow.
>
> Signed-off-by: Baoyou Xie <baoyou.xie at linaro.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab at s-opensource.com>
> (cherry picked from commit dfc1648c576719b5a2701805aab1e208789d5969)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
Acked-by: Connor Kuehl <connor.kuehl at canonical.com>
> ---
> drivers/media/usb/uvc/uvc_video.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index 31d428c6bd20..924974125714 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -1089,6 +1089,7 @@ static void uvc_video_decode_data(struct uvc_streaming *stream,
> /* Complete the current frame if the buffer size was exceeded. */
> if (len > maxlen) {
> uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n");
> + buf->error = 1;
> buf->state = UVC_BUF_STATE_READY;
> }
> }
>
More information about the kernel-team
mailing list