ACK: [PATCH 1/1] media: uvcvideo: Mark buffer error where overflow

Stefan Bader stefan.bader at canonical.com
Thu Nov 7 16:30:11 UTC 2019


On 25.10.19 18:30, 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: Stefan Bader <stefan.bader 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;
>  	}
>  }
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20191107/083f6017/attachment-0001.sig>


More information about the kernel-team mailing list