All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	linuxarm@huawei.com, mauro.chehab@huawei.com,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: uvc: limit max bandwidth for HDMI capture
Date: Fri, 25 Jun 2021 15:18:15 -0400	[thread overview]
Message-ID: <0d5ce46a81ca02a9cf2a01175818846fba802194.camel@ndufresne.ca> (raw)
In-Reply-To: <20210622102948.47b86fbe@coco.lan>

Le mardi 22 juin 2021 à 10:29 +0200, Mauro Carvalho Chehab a écrit :
> Em Mon, 21 Jun 2021 21:22:26 +0300
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:
> 
> > Hi Mauro,
> > 
> > Thank you for the patch.
> 
> Thanks for reviewing it!
> 
> > 
> > On Mon, Feb 01, 2021 at 08:08:59PM +0100, Mauro Carvalho Chehab wrote:
> > > This device:
> > >         534d:2109 MacroSilicon
> > > 
> > > Announces that it supports several frame intervals for
> > > their resolutions for MJPEG compression:
> > > 
> > >         VideoStreaming Interface Descriptor:
> > >         bLength                            46
> > >         bDescriptorType                    36
> > >         bDescriptorSubtype                  7 (FRAME_MJPEG)
> > >         bFrameIndex                         1
> > >         bmCapabilities                   0x00
> > >           Still image unsupported
> > >         wWidth                           1920
> > >         wHeight                          1080
> > >         dwMinBitRate                   768000
> > >         dwMaxBitRate                196608000
> > >         dwMaxVideoFrameBufferSize     4147200
> > >         dwDefaultFrameInterval         166666
> > >         bFrameIntervalType                  5
> > >         dwFrameInterval( 0)            166666
> > >         dwFrameInterval( 1)            333333
> > >         dwFrameInterval( 2)            400000
> > >         dwFrameInterval( 3)            500000
> > >         dwFrameInterval( 4)           1000000
> > > 
> > > However, the highest frame interval (166666), which means 60 fps
> > > is not supported. For such resolution, the maximum interval
> > > is, instead 333333 (30 fps).  
> > 
> > What happens if you try to select it ?
> 
> Basically, URBs get lost: they cause apps like qv4l2 to crash
> sometimes, with:
> 
> 	v4l-convert: libjpeg error: Corrupt JPEG data: premature end of data segment

This is the emulated format handler that decodes jpeg behind application back
that is broken. The converter should implement this in a nicer way. E.g. it
could return ERROR buffer with payload = 0 in that case.

> 
> The image keeps blinking, and part of the image is replaced by
> white noise.
> 
> Clearly, it tries to send more data than the maximum available bandwidth
> on this chipset.
> 
> 
> Sent a v2 addressing the issues you pointed.
> 
> 
> Thanks,
> Mauro



      parent reply	other threads:[~2021-06-25 19:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 19:08 [PATCH] media: uvc: limit max bandwidth for HDMI capture Mauro Carvalho Chehab
2021-06-21 18:22 ` Laurent Pinchart
2021-06-22  8:29   ` Mauro Carvalho Chehab
2021-06-22  8:50     ` Dave Stevenson
2021-06-22  8:59       ` Laurent Pinchart
2021-06-22  9:09         ` Mauro Carvalho Chehab
2021-06-25 19:18     ` Nicolas Dufresne [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=0d5ce46a81ca02a9cf2a01175818846fba802194.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mauro.chehab@huawei.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mchehab@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.