* [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value
@ 2017-12-26 2:52 Lipengcheng
2017-12-26 5:00 ` Manu Gautam
2018-01-08 11:54 ` Felipe Balbi
0 siblings, 2 replies; 4+ messages in thread
From: Lipengcheng @ 2017-12-26 2:52 UTC (permalink / raw)
To: balbi@kernel.org
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, Lipengcheng
The value is 4, it can cache four descriptors. When streaming_interval = 1,
it can tolerate 500us. Some busy scenes, it may be more than 500us because
cpu scheduling is not timely. There will have some problems. It is better
set to eight.
Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
---
drivers/usb/gadget/function/uvc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
index a64e07e..901487e 100644
--- a/drivers/usb/gadget/function/uvc.h
+++ b/drivers/usb/gadget/function/uvc.h
@@ -90,7 +90,7 @@ extern unsigned int uvc_gadget_trace_param;
* Driver specific constants
*/
-#define UVC_NUM_REQUESTS 4
+#define UVC_NUM_REQUESTS 8
#define UVC_MAX_REQUEST_SIZE 64
#define UVC_MAX_EVENTS 4
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value
2017-12-26 2:52 [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value Lipengcheng
@ 2017-12-26 5:00 ` Manu Gautam
2017-12-26 5:11 ` Lipengcheng
2018-01-08 11:54 ` Felipe Balbi
1 sibling, 1 reply; 4+ messages in thread
From: Manu Gautam @ 2017-12-26 5:00 UTC (permalink / raw)
To: Lipengcheng, balbi@kernel.org
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Hi,
On 12/26/2017 8:22 AM, Lipengcheng wrote:
> The value is 4, it can cache four descriptors. When streaming_interval = 1,
> it can tolerate 500us. Some busy scenes, it may be more than 500us because
> cpu scheduling is not timely. There will have some problems. It is better
> set to eight.
>
> Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> ---
> drivers/usb/gadget/function/uvc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
> index a64e07e..901487e 100644
> --- a/drivers/usb/gadget/function/uvc.h
> +++ b/drivers/usb/gadget/function/uvc.h
> @@ -90,7 +90,7 @@ extern unsigned int uvc_gadget_trace_param;
> * Driver specific constants
> */
>
> -#define UVC_NUM_REQUESTS 4
> +#define UVC_NUM_REQUESTS 8
Can we rather make it 16?
I ran into similar issue on QCOM platform with DWC3 and with 8 requests also data loss
was observed. 16 requests (i.e. ~2msec) worked fine.
> #define UVC_MAX_REQUEST_SIZE 64
> #define UVC_MAX_EVENTS 4
>
> --
> 2.7.4
>
> N�����r��y���b�X��ǧv�^�){.n�+����{�����^n�r���z�\x1a��h����&��\x1e�G���h�\x03(�階�ݢj"��\x1a�^[m�����z�ޖ���f���h���~�mml==
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value
2017-12-26 5:00 ` Manu Gautam
@ 2017-12-26 5:11 ` Lipengcheng
0 siblings, 0 replies; 4+ messages in thread
From: Lipengcheng @ 2017-12-26 5:11 UTC (permalink / raw)
To: Manu Gautam, balbi@kernel.org
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Hi,
> -----Original Message-----
> From: Manu Gautam [mailto:mgautam@codeaurora.org]
> Sent: Tuesday, December 26, 2017 1:01 PM
> To: Lipengcheng; balbi@kernel.org
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org
> Subject: Re: [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value
>
> Hi,
>
>
> On 12/26/2017 8:22 AM, Lipengcheng wrote:
> > The value is 4, it can cache four descriptors. When streaming_interval
> > = 1, it can tolerate 500us. Some busy scenes, it may be more than
> > 500us because cpu scheduling is not timely. There will have some
> > problems. It is better set to eight.
> >
> > Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> > ---
> > drivers/usb/gadget/function/uvc.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/gadget/function/uvc.h
> > b/drivers/usb/gadget/function/uvc.h
> > index a64e07e..901487e 100644
> > --- a/drivers/usb/gadget/function/uvc.h
> > +++ b/drivers/usb/gadget/function/uvc.h
> > @@ -90,7 +90,7 @@ extern unsigned int uvc_gadget_trace_param;
> > * Driver specific constants
> > */
> >
> > -#define UVC_NUM_REQUESTS 4
> > +#define UVC_NUM_REQUESTS 8
>
> Can we rather make it 16?
> I ran into similar issue on QCOM platform with DWC3 and with 8 requests also data loss was observed. 16 requests (i.e. ~2msec) worked fine.
I think 16 is ok. The value 4 has a bit too small .In hisilicon asic, I set the value 32(4ms) and it is ok. The bad impact is the need to expend more memory space. So therefore need to match with the respective chip platform to find the appropriate value.
>
> > #define UVC_MAX_REQUEST_SIZE 64
> > #define UVC_MAX_EVENTS 4
> >
> > --
> > 2.7.4
> >
> > N r y b X ǧv ^ ){.n + { ^n r z \x1a h & \x1e G h \x03(
> > 階 ݢj" \x1a ^[m z ޖ f h ~ mml==
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value
2017-12-26 2:52 [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value Lipengcheng
2017-12-26 5:00 ` Manu Gautam
@ 2018-01-08 11:54 ` Felipe Balbi
1 sibling, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2018-01-08 11:54 UTC (permalink / raw)
To: Lipengcheng
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, Lipengcheng, Laurent Pinchart
[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]
Hi,
Lipengcheng <lpc.li@hisilicon.com> writes:
> The value is 4, it can cache four descriptors. When streaming_interval = 1,
> it can tolerate 500us. Some busy scenes, it may be more than 500us because
> cpu scheduling is not timely. There will have some problems. It is better
> set to eight.
>
> Signed-off-by: Pengcheng Li <lpc.li@hisilicon.com>
> ---
> drivers/usb/gadget/function/uvc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
> index a64e07e..901487e 100644
> --- a/drivers/usb/gadget/function/uvc.h
> +++ b/drivers/usb/gadget/function/uvc.h
> @@ -90,7 +90,7 @@ extern unsigned int uvc_gadget_trace_param;
> * Driver specific constants
> */
>
> -#define UVC_NUM_REQUESTS 4
> +#define UVC_NUM_REQUESTS 8
if you want to be taken seriously, the bare minimum you can do is to use
scripts/get_maintainer.pl to help with a proper Cc list:
$ scripts/get_maintainer.pl -f drivers/usb/gadget/function/uvc.h
Laurent Pinchart <laurent.pinchart@ideasonboard.com> (maintainer:USB WEBCAM GADGET)
Felipe Balbi <balbi@kernel.org> (maintainer:USB GADGET/PERIPHERAL SUBSYSTEM)
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM)
linux-usb@vger.kernel.org (open list:USB WEBCAM GADGET)
linux-kernel@vger.kernel.org (open list)
Laurent, what do you think about this?
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-08 11:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26 2:52 [PATCH] usb: gadget: uvc:change the UVC_NUM_REQUESTS value Lipengcheng
2017-12-26 5:00 ` Manu Gautam
2017-12-26 5:11 ` Lipengcheng
2018-01-08 11:54 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox