Re: usb: dwc3: dwc3 errors while video streaming with uvc-gadget

2018-11-05 Thread Laurent Pinchart
Hi Felipe, On Monday, 5 November 2018 14:05:59 EET Felipe Balbi wrote: > Laurent Pinchart writes: > > On Saturday, 3 November 2018 23:07:33 EET Terence Neill wrote: > >> Hi folks, > >> > >> Thanks for the replies, I really appreciate them. I've made some &g

Re: usb: dwc3: dwc3 errors while video streaming with uvc-gadget

2018-11-05 Thread Laurent Pinchart
ion/driver-api/usb/d > wc3.rst and point 7 mentions support for "Superspeed Bulk Streams" but I > was unsure if this meant that ONLY bulk streams were supported or whether > isochronous streams were also supported? That's a question for Felipe :-) -- Regards, Laurent Pinchart

Re: usb: dwc3: dwc3 errors while video streaming with uvc-gadget

2018-11-02 Thread Laurent Pinchart
> 4.19.0-041900rc8-generic (I updated to this version this morning to make > > sure I was using the latest dwc3 driver, the same problem exists (with a > > different error code -104) with the stock Ubuntu 18.04 kernel). > > > > Windows machine - Core i5-4570 - Windows 10 Enterprise. > > > > Any help with further investigation of this problem would be appreciated? > > Could this problem be caused by the configuration setup that I'm using > > for the uvc gadget? > > > > Thanks in advance for your help, -- Regards, Laurent Pinchart

Re: UVC gadget changes for v4.20

2018-10-02 Thread Laurent Pinchart
Hi Felipe, On Tuesday, 2 October 2018 10:26:25 EEST Felipe Balbi wrote: > Laurent Pinchart writes: > > Hi Felipe, > > > > (CC'ing Greg, in case you're on vacation) > > > > Ping ? I'd really like to get this merged in v4.20. Do you think that > > would be

Re: UVC gadget changes for v4.20

2018-10-01 Thread Laurent Pinchart
Hi Felipe, (CC'ing Greg, in case you're on vacation) Ping ? I'd really like to get this merged in v4.20. Do you think that would be possible ? On Tuesday, 25 September 2018 19:58:50 EEST Laurent Pinchart wrote: > Hi Felipe, > > The following changes sin

UVC gadget changes for v4.20

2018-09-25 Thread Laurent Pinchart
Joel Pepper (2): usb: gadget: uvc: configfs: Add bFrameIndex attributes usb: gadget: uvc: configfs: Prevent format changes after linking header Laurent Pinchart (14): usb: gadget: uvc: configfs: Don't wrap groups

Re: [PATCH v2 8/8] usb: gadget: uvc: configfs: Prevent format changes after linking header

2018-09-24 Thread Laurent Pinchart
Hi Kieran, On Monday, 24 September 2018 15:50:45 EEST Kieran Bingham wrote: > On 01/08/18 22:55, Laurent Pinchart wrote: > > From: Joel Pepper > > > > While checks are in place to avoid attributes and children of a format > > being manipulated after the format i

Re: [PATCH v2 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-09-24 Thread Laurent Pinchart
Hi Kieran, On Monday, 24 September 2018 15:22:57 EEST Kieran Bingham wrote: > On 01/08/18 22:55, Laurent Pinchart wrote: > > From: Joel Pepper > > > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > > - Automatically assign ascending bFrameInde

Re: [PATCH 0/3] Fix OMAP EHCI probe & assorted cleanups

2018-09-23 Thread Laurent Pinchart
Hi Lee, On Sunday, 23 September 2018 18:38:28 EEST Lee Jones wrote: > On Sun, 23 Sep 2018, Lee Jones wrote: > > On Sun, 23 Sep 2018, Laurent Pinchart wrote: > >> On Tuesday, 11 September 2018 19:25:38 EEST Tony Lindgren wrote: > >>> * Laurent Pinchart [180911

Re: [PATCH 0/3] Fix OMAP EHCI probe & assorted cleanups

2018-09-23 Thread Laurent Pinchart
Hi Tony, On Tuesday, 11 September 2018 19:25:38 EEST Tony Lindgren wrote: > * Laurent Pinchart [180911 16:12]: > > On Tuesday, 11 September 2018 18:16:41 EEST Tony Lindgren wrote: > >> * Laurent Pinchart [180911 15:10]: > >>> Hello, > >>> >

[PATCH 2/4] usb: gadget: uvc: configfs: Fix operation on big endian platforms

2018-09-18 Thread Laurent Pinchart
not needed. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 59 -- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c index 6031467f1868

[PATCH 0/4] usb: gadget: uvc: Fix endianness and sign issues

2018-09-18 Thread Laurent Pinchart
endianness correctly when parsing configfs attributes. The next patch goes on to simplify UVC configfs attribute macros, and the last patch finally fixes sign issues by using the correct format to print unsigned int values. Laurent Pinchart (4): usb: video: Fix endianness mismatches

[PATCH 1/4] usb: video: Fix endianness mismatches in descriptor structures

2018-09-18 Thread Laurent Pinchart
All UVC descriptors use little-endian format, update the data structures accordingly. Signed-off-by: Laurent Pinchart --- include/uapi/linux/usb/video.h | 304 - 1 file changed, 152 insertions(+), 152 deletions(-) diff --git a/include/uapi/linux/usb

[PATCH 4/4] usb: gadget: uvc: configfs: Use %u to print unsigned int values

2018-09-18 Thread Laurent Pinchart
The driver uses the %d format to print unsigned int values. The correct format is %u. Fix it. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 32 +++--- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/usb/gadget

[PATCH 3/4] usb: gadget: uvc: configfs: Simplify attributes macros

2018-09-18 Thread Laurent Pinchart
internally. The UVCG_OPTS_ATTR macro can be simplified further as all fields it deals with are unsigned int. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 184 - 1 file changed, 74 insertions(+), 110 deletions(-) diff --git a/drivers/usb

[PATCH] usb: gadget: uvc: Remove uvc_set_trace_param() function

2018-09-18 Thread Laurent Pinchart
The function is never called, remove it. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/f_uvc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index 0cc4a6220050..8c99392df593 100644

[PATCH 2/3] usb: gadget: uvc: Only halt video streaming endpoint in bulk mode

2018-09-18 Thread Laurent Pinchart
using isochronous endpoints, which we happily ignore, but some UDCs complain in the kernel log. Fix this by only trying to halt the endpoint in bulk mode. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 3/3] usb: gadget: uvc: Replace plain printk() with dev_*()

2018-09-18 Thread Laurent Pinchart
Adding device context to the kernel log messages make them more useful. Add new uvcg_* macros based on dev_*() that print both the gadget device name and the function name. While at it, remove a commented out printk statement and an unused printk-based macro. Signed-off-by: Laurent Pinchart

[PATCH 1/3] usb: gadget: uvc: Factor out video USB request queueing

2018-09-18 Thread Laurent Pinchart
USB requests for video data are queued from two different locations in the driver, with the same code block occurring twice. Factor it out to a function. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_video.c | 30 -- 1 file changed, 20

[PATCH] usb: gadget: uvc: configfs: Sort frame intervals upon writing

2018-09-18 Thread Laurent Pinchart
are in ascending order. Instead of silently failing the breaking of this rule, we sort the dwFrameIntervals upon writing to configfs. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 13 + 1 file changed, 13 insertions

Re: [PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-12 Thread Laurent Pinchart
Hi Roger, On Wednesday, 12 September 2018 10:57:31 EEST Roger Quadros wrote: > On 11/09/18 18:06, Laurent Pinchart wrote: > > Now that all platforms using OMAP USB host devices have been converted > > to DT, drop support for legacy non-DT probe from the driver. > > >

Re: [PATCH 1/3] mfd: omap-usb-host: Use regular platform device probe mechanism

2018-09-11 Thread Laurent Pinchart
On Tuesday, 11 September 2018 18:53:19 EEST Ladislav Michl wrote: > On Tue, Sep 11, 2018 at 06:06:08PM +0300, Laurent Pinchart wrote: > > The omap-usb-host driver uses platform_driver_probe() in the fs initcall > > level to ensure that the devices get probed before the EHCI and O

Re: [PATCH 0/3] Fix OMAP EHCI probe & assorted cleanups

2018-09-11 Thread Laurent Pinchart
Hi Tony, On Tuesday, 11 September 2018 18:16:41 EEST Tony Lindgren wrote: > * Laurent Pinchart [180911 15:10]: > > Hello, > > > > This series fixes a v4.19-rc1 regression that results in OMAP EHCI failing > > to probe (patch 1/3) and then moves on to cleaning up re

[PATCH 3/3] mfd: omap-usb-host: Drop support for non-DT probe

2018-09-11 Thread Laurent Pinchart
Now that all platforms using OMAP USB host devices have been converted to DT, drop support for legacy non-DT probe from the driver. Signed-off-by: Laurent Pinchart --- drivers/mfd/omap-usb-host.c| 153 +++-- include/linux/platform_data/usb-omap.h | 4

[PATCH 2/3] ARM: OMAP2+: Remove legacy USB initialization code

2018-09-11 Thread Laurent Pinchart
Several legacy USB-related functions, structures and macros are not used anymore after conversion to DT. Remove them. Signed-off-by: Laurent Pinchart --- arch/arm/mach-omap2/common.h| 2 - arch/arm/mach-omap2/omap_phy_internal.c | 96 + arch/arm/mach

[PATCH 1/3] mfd: omap-usb-host: Use regular platform device probe mechanism

2018-09-11 Thread Laurent Pinchart
-sysc"), as then omap-usb-host devices are now registered after the omap-usb-host driver initializes, and thus fail to probe due to platform_driver_probe() not finding any device. Fixes: 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") Signed-off-

[PATCH 0/3] Fix OMAP EHCI probe & assorted cleanups

2018-09-11 Thread Laurent Pinchart
. Tony, as patch 1/3 fixes a problem introduced by one of your DT changes, could you please review it ? Out of curiosity, is ethernet on the Pandaboard not part of your regression tests ? Lee, could you then please make sure the patch gets to mainline before v4.19 final ? Laurent Pinchart (3): mfd

Re: [PATCH 3/4] usb: dwc3: trace: log ep commands in hex

2018-08-23 Thread Laurent Pinchart
Hi Andy, On Thursday, 23 August 2018 12:57:57 EEST Andy Shevchenko wrote: > On Mon, Aug 20, 2018 at 3:21 PM Laurent Pinchart wrote: > > On Monday, 20 August 2018 15:06:31 EEST Andy Shevchenko wrote: > >> On Mon, Aug 20, 2018 at 2:25 PM, Laurent Pinchart wrote: > >>>

Re: [PATCH 3/4] usb: dwc3: trace: log ep commands in hex

2018-08-20 Thread Laurent Pinchart
Hi Andy, On Monday, 20 August 2018 15:06:31 EEST Andy Shevchenko wrote: > On Mon, Aug 20, 2018 at 2:25 PM, Laurent Pinchart wrote: > >> - TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x --> status: %s", > >> + TP_printk("%s: cmd '%s' [%

Re: [PATCH 2/4] usb: dwc3: gadget: check if dep->frame_number is still valid

2018-08-20 Thread Laurent Pinchart
er = DWC3_ALIGN_FRAME(dep); > + } > + This greatly improves the situation with the UVC function driver. However, we're still receiving errors from time to time related to missed transfer intervals, and those errors tend to occur in bursts. Kieran should be able to provide you with more information. Before acking this patch I would thus like to make sure that we're not missing part of the problem. > return __dwc3_gadget_kick_transfer(dep); > } -- Regards, Laurent Pinchart

Re: [PATCH 4/4] usb: dwc3: gadget: remove unnecessary dev_info()

2018-08-20 Thread Laurent Pinchart
dep->name); > dep->flags |= DWC3_EP_PENDING_REQUEST; > return -EAGAIN; > } -- Regards, Laurent Pinchart

Re: [PATCH 3/4] usb: dwc3: trace: log ep commands in hex

2018-08-20 Thread Laurent Pinchart
_entry->cmd), > __entry->cmd, __entry->param0, > __entry->param1, __entry->param2, -- Regards, Laurent Pinchart

Re: [PATCH 1/4] usb: dwc3: gadget: return errors from __dwc3_gadget_start_isoc()

2018-08-20 Thread Laurent Pinchart
} > } > } > @@ -2427,7 +2426,7 @@ static void > dwc3_gadget_endpoint_transfer_not_ready(struct dwc3_ep *dep, const struct > dwc3_event_depevt *event) > { > dwc3_gadget_endpoint_frame_from_event(dep, event); > - __dwc3_gadget_start_isoc(dep); > + (void) __dwc3_gadget_start_isoc(dep); No need for a cast here. > } > > static void dwc3_endpoint_interrupt(struct dwc3 *dwc, -- Regards, Laurent Pinchart

[PATCH v2 2/8] usb: gadget: uvc: configfs: Add section header comments

2018-08-01 Thread Laurent Pinchart
The UVC configfs implementation is large and difficult to navigate. Add a bit more air to the code to make it easier to read. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- drivers/usb/gadget/function/uvc_configfs.c | 120 ++--- 1 file changed, 91

[PATCH v2 8/8] usb: gadget: uvc: configfs: Prevent format changes after linking header

2018-08-01 Thread Laurent Pinchart
6,8 @@ static void uvcg_streaming_header_drop_link(struct config_item *src, break; } + --target_fmt->linked; + out: mutex_unlock(>lock); mutex_unlock(su_mutex); -- Regards, Laurent Pinchart -- To unsubscribe from this list: se

[PATCH v2 0/8] usb: gadget: uvc: Improve configfs support

2018-08-01 Thread Laurent Pinchart
allocated configfs groups - Squash attribute documentation and attribute creation patches Joel Pepper (2): usb: gadget: uvc: configfs: Add bFrameIndex attributes usb: gadget: uvc: configfs: Prevent format changes after linking header Laurent Pinchart (6): usb: gadget: uvc: configfs

[PATCH v2 5/8] usb: gadget: uvc: configfs: Add interface number attributes

2018-08-01 Thread Laurent Pinchart
read-only configfs attributes in /control/bInterfaceNumber and /streaming/bInterfaceNumber respectively. Signed-off-by: Laurent Pinchart --- Changes since v1: - Document the new attribute --- Documentation/ABI/testing/configfs-usb-gadget-uvc | 8 +++ drivers/usb/gadget/function/f_uvc.c

[PATCH v2 4/8] usb: gadget: uvc: configfs: Allocate groups dynamically

2018-08-01 Thread Laurent Pinchart
the config_item_type structure with group name and children, and implement helper functions to create children automatically for most groups. Signed-off-by: Laurent Pinchart --- Changes since v1: - Free groups by implementing .release() handler and removing children explicitly. --- drivers/usb/gadget

[PATCH v2 6/8] usb: gadget: uvc: configfs: Add bFormatIndex attributes

2018-08-01 Thread Laurent Pinchart
in a separate structure. In order to expose the value through the configfs attribute, store it in the config item private data as well. This results in a small code simplification. Signed-off-by: Laurent Pinchart --- Changes since v1: - Squash patch "usb: gadget: uvc: configfs: Doc

[PATCH v2 1/8] usb: gadget: uvc: configfs: Don't wrap groups unnecessarily

2018-08-01 Thread Laurent Pinchart
can still be wrapped individually in the future if other data fields need to be added. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- drivers/usb/gadget/function/uvc_configfs.c | 302 +++-- 1 file changed, 117 insertions(+), 185 deletions(-) diff --git

[PATCH v2 3/8] usb: gadget: uvc: configfs: Drop leaked references to config items

2018-08-01 Thread Laurent Pinchart
Some of the .allow_link() and .drop_link() operations implementations call config_group_find_item() and then leak the reference to the returned item. Fix this by dropping those references where needed. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 4 1

[PATCH v2 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-08-01 Thread Laurent Pinchart
uvcg_frame *frm; + + if (ci->ci_type != _frame_type) + continue; + + frm = to_uvcg_frame(ci); + frm->frame.b_frame_index = i++; + } +} + /* ----- * streaming/uncompressed/ *

Re: [PATCH 4/8] usb: gadget: uvc: configfs: Add interface number attributes

2018-08-01 Thread Laurent Pinchart
Hi Kieran, On Wednesday, 1 August 2018 13:07:20 EEST Kieran Bingham wrote: > On 01/08/18 01:29, Laurent Pinchart wrote: > > The video control and video streaming interface numbers are needed in > > the UVC gadget userspace stack to reply to UVC requests. They are > > hard

Re: [PATCH 3/8] usb: gadget: uvc: configfs: Allocate groups dynamically

2018-08-01 Thread Laurent Pinchart
Hi Kieran, On Wednesday, 1 August 2018 12:58:40 EEST Kieran Bingham wrote: > On 01/08/18 01:29, Laurent Pinchart wrote: > > The UVC configfs implementation creates all groups as global static > > variables. This prevents creationg of multiple UVC function instances, > >

[PATCH 8/8] usb: gadget: uvc: configfs: Prevent format changes after linking header

2018-07-31 Thread Laurent Pinchart
9,8 @@ static void uvcg_streaming_header_drop_link(struct config_item *src, break; } + --target_fmt->linked; + out: mutex_unlock(>lock); mutex_unlock(su_mutex); -- Regards, Laurent Pinchart -- To unsubscribe from this list: se

[PATCH 4/8] usb: gadget: uvc: configfs: Add interface number attributes

2018-07-31 Thread Laurent Pinchart
read-only configfs attributes in /control/bInterfaceNumber and /streaming/bInterfaceNumber respectively. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/f_uvc.c| 2 + drivers/usb/gadget/function/u_uvc.h| 3 ++ drivers/usb/gadget/function/uvc_configfs.c | 62

[PATCH 7/8] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-31 Thread Laurent Pinchart
uct uvcg_frame *frm; + + if (ci->ci_type != _frame_type) + continue; + + frm = to_uvcg_frame(ci); + frm->frame.b_frame_index = i++; + } +} + /* --------- * streaming/uncompressed/

[PATCH 2/8] usb: gadget: uvc: configfs: Add section header comments

2018-07-31 Thread Laurent Pinchart
The UVC configfs implementation is large and difficult to navigate. Add a bit more air to the code to make it easier to read. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 120 ++--- 1 file changed, 91 insertions(+), 29 deletions

[PATCH 0/8] usb: gadget: uvc: Improve configfs support

2018-07-31 Thread Laurent Pinchart
, and is a candidate for v4.20. Please let me know if I should base the patches on a different branch. Joel Pepper (2): usb: gadget: uvc: configfs: Add bFrameIndex attributes usb: gadget: uvc: configfs: Prevent format changes after linking header Laurent Pinchart (6): usb: gadget: uvc: configfs: Don't wrap

[PATCH 1/8] usb: gadget: uvc: configfs: Don't wrap groups unnecessarily

2018-07-31 Thread Laurent Pinchart
can still be wrapped individually in the future if other data fields need to be added. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 302 +++-- 1 file changed, 117 insertions(+), 185 deletions(-) diff --git a/drivers/usb/gadget/function

[PATCH 3/8] usb: gadget: uvc: configfs: Allocate groups dynamically

2018-07-31 Thread Laurent Pinchart
the config_item_type structure with group name and children, and implement helper functions to create children automatically for most groups. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/f_uvc.c| 8 +- drivers/usb/gadget/function/uvc_configfs.c | 480

[PATCH 5/8] usb: gadget: uvc: configfs: Add bFormatIndex attributes

2018-07-31 Thread Laurent Pinchart
in a separate structure. In order to expose the value through the configfs attribute, store it in the config item private data as well. This results in a small code simplification. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 14 -- 1 file changed

[PATCH 6/8] usb: gadget: uvc: configfs: Document the bFormatIndex attribute

2018-07-31 Thread Laurent Pinchart
Document for the bFormatIndex attribute of the format descriptors is missing. Add it. Signed-off-by: Laurent Pinchart --- Documentation/ABI/testing/configfs-usb-gadget-uvc | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/ABI/testing/configfs-usb-gadget-uvc b

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-07-31 Thread Laurent Pinchart
Hi Felipe, On Thursday, 26 July 2018 13:49:07 EEST Felipe Balbi wrote: > Laurent Pinchart writes: > > From: Joel Pepper > > > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > > - Automatically assign ascending bFrameIndex to each frame in a

Re: MUSB issue

2018-07-02 Thread Laurent Pinchart
rspace as I can only send the data to userspace in the DATA stage request completion handler, and have to then return before receiving a response from userspace. After clarifying the API (and possibly extending it...), let's move to the MUSB driver and see how to fix it. -- Regards,

[PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-12 Thread Laurent Pinchart
frm = to_uvcg_frame(ci); + frm->frame.b_frame_index = i++; + } +} + /* --------- * streaming/uncompressed/ */ -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-12 Thread Laurent Pinchart
Hi Joel, On Sunday, 10 June 2018 14:06:28 EEST Joel Pepper wrote: > @Laurent, I accidentally hit "Reply" instead of "Reply All", please > disregard the previous copy of this email > > Hi Laurent and Paul, > > On 08.06.2018 21:16, Laurent Pinchart wrote: &g

[PATCH] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-08 Thread Laurent Pinchart
l's code] Signed-off-by: Laurent Pinchart --- Documentation/ABI/testing/configfs-usb-gadget-uvc | 8 drivers/usb/gadget/function/uvc_configfs.c| 10 -- 2 files changed, 16 insertions(+), 2 deletions(-) This is the mix of Paul's and Joel's patches. I've also simplified t

Re: [PATCH 2/2] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-08 Thread Laurent Pinchart
Hi Joel and Paul, On Friday, 8 June 2018 22:12:56 EEST Laurent Pinchart wrote: > From: Paul Elder > > The UVC frame descriptions are numbered using the descriptor's > bFrameIndex field. The index is used in UVC requests, and is thus > needed to handle requests in userspace. Make

[PATCH 1/2] usb: gadget: uvc: configfs: add UVCG_FRAME_ATTR_RO

2018-06-08 Thread Laurent Pinchart
O(uvcg_frame_, cname, aname); + #define UVCG_FRAME_ATTR(cname, aname, to_cpu_endian, to_little_endian, bits) \ static ssize_t uvcg_frame_##cname##_show(struct config_item *item, char *page)\ { \ -- Regards, Laurent Pinchart

[PATCH 2/2] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-08 Thread Laurent Pinchart
m->frame.b_frame_interval_type); + frm->frame.b_frame_index = n + 1; + } } break; } -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org

Re: [RESEND][PATCH v6 2/2] usb/gadget/uvc-configfs Fix host unable to negotiate framesizes other than first

2018-06-08 Thread Laurent Pinchart
frm->frame.b_frame_index = i; > + i++; You could write this frm->frame.b_frame_index = i++; > + And no need for a blank line here either. > + } > + Same here. > +} > + > /* streaming/uncompressed/ */ > struct uvcg_uncompressed { > struct uvcg_format fmt; Can't you set b_frame_index from __uvcg_fill_strm(), in a similar way as the b_format_index is set ? I've received a competing implementation from Paul in parallel to your patch that does so, I'll post it as a reply to this e-mail to discuss which approach is best. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RESEND][PATCH v6 1/2] usb/gadget/uvc-configfs Fix linked flag in a format not being set when format is linked into streaming header

2018-06-08 Thread Laurent Pinchart
der Apart from that, Reviewed-by: Laurent Pinchart > --- > drivers/usb/gadget/function/uvc_configfs.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/gadget/function/uvc_configfs.c > b/drivers/usb/gadget/function/uvc_configfs.c index c9b8cc4a..7a98f9f 100644 &g

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-05-24 Thread Laurent Pinchart
Hello again, On Thursday, 24 May 2018 22:59:18 EEST Laurent Pinchart wrote: > On Friday, 20 April 2018 13:57:23 EEST Felipe Balbi wrote: > > Bin Liu <b-...@ti.com> writes: > >>> Felipe Balbi <felipe.ba...@linux.intel.com> writes: > >>>>>> B

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-05-24 Thread Laurent Pinchart
; > > gadget side: > > # modprobe g_webcam (streaming_maxpacket=3072 for super-speed) > > # uvc-gadget > > > > host side: > > $ yavta -c -f YUYV -t 1/30 -s 640x360 -n4 /dev/video1, or > > $ luvcview -d /dev/video1 -f yuv > > okay, fou

Re: [PATCH v2] usb: gadget: uvc: Expose configuration name through video node

2018-05-24 Thread Laurent Pinchart
link a particular configuration to > its respective video node. > > Provide a means for identifying the correct video node by exposing the > name of the function configuration through sysfs. > > Signed-off-by: Kieran Bingham <kieran.bing...@ideasonboard.com> Reviewed-by: Laurent P

Re: [PATCH] usb: gadget: f_uvc: Expose configuration name through video node

2018-05-24 Thread Laurent Pinchart
er_device(>vdev); > + return ret; > + } > + > + return 0; > } > > #define UVC_COPY_DESCRIPTOR(mem, dst, desc) \ > @@ -875,6 +896,7 @@ static void uvc_unbind(struct usb_configuration *c, > struct usb_function *f) > > INFO(cdev, "%s\n

[PATCH] usb: gadget: uvc: configfs: Move function to avoid forward declaration

2018-05-23 Thread Laurent Pinchart
The to_f_uvc_opts() function is forward-declared without needing to, as its definition can simply be moved up in the file. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- drivers/usb/gadget/function/uvc_configfs.c | 12 +--- 1 file changed, 5 inse

Re: [PATCH] usb: gadget: uvc: Utilise instance name in video name

2018-05-22 Thread Laurent Pinchart
u should omit the ":" in that case. I also wonder whether the vdev.name field will always be long enough. If we can't guarantee that, would it make sense to instead expose the config item name through a custom sysfs property for the video device ? > video_set_drvdata

[PATCH 3/3] usb: gadget: uvc: Move trace parameter to function module

2018-05-21 Thread Laurent Pinchart
The trace module parameter controls output of debugging messages in the UVC function driver. Move it from the webcam module to the UVC function module where it belongs. This allows ConfigFS-based UVC gadgets to control tracing. Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.

[PATCH 2/3] usb: gadget: uvc: Minimize #include in headers

2018-05-21 Thread Laurent Pinchart
. Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- drivers/usb/gadget/function/f_uvc.c | 5 +++-- drivers/usb/gadget/function/f_uvc.h | 6 +- drivers/usb/gadget/function/u_uvc.h | 1 + drivers/usb/gadget/function/uvc.h | 14 ++ drive

[PATCH 1/3] usb: gadget: uvc: Move userspace API definition to public header

2018-05-21 Thread Laurent Pinchart
/include/uapi/linux/usb/g_uvc.h new file mode 100644 index ..3c9ee3020cbb --- /dev/null +++ b/include/uapi/linux/usb/g_uvc.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * g_uvc.h -- USB Video Class Gadget driver API + * + * Copyright (C) 2009-2010 Laurent Pin

[PATCH 0/3] usb: gadget: uvc: Expose UAPI & miscellaneous cleanups

2018-05-21 Thread Laurent Pinchart
/function/uvc_video.h | 2 ++ drivers/usb/gadget/legacy/webcam.c | 4 --- include/uapi/linux/usb/g_uvc.h | 39 10 files changed, 69 insertions(+), 63 deletions(-) create mode 100644 include/uapi/linux/usb/g_uvc.h -- Regards, Laurent Pinchart -- To unsubscribe

Re: Some questions about the UVC gadget

2018-05-21 Thread Laurent Pinchart
the H.264 extension unit (XU) defined in the UVC 1.1 specification. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 0/3] usb: gadget: uvc: fix racing between uvc_function_set_alt and streamon/off

2018-05-21 Thread Laurent Pinchart
n/uvc_v4l2.c | 21 +++-- > 3 files changed, 28 insertions(+), 9 deletions(-) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 3/3] usb: gadget: uvc: disable stream when disconnected

2018-05-21 Thread Laurent Pinchart
EAMON, VIDIOC_STREAMOFF, uvc_function_set_alt and uvc_function_disable). > memset(_event, 0, sizeof(v4l2_event)); > v4l2_event.type = UVC_EVENT_DISCONNECT; > v4l2_event_queue(>vdev, _event); -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the

Re: [PATCH v2 1/3] usb: gadget: uvc: synchronize streamon/off with uvc_function_set_alt

2018-05-21 Thread Laurent Pinchart
ou will need a lock to protect this. I recommend trying to draw sequence diagrams to see how the different events can race each other. > if (type != video->queue.queue.type) > return -EINVAL; > > - return uvcg_video_enable(video, 0); > + ret = uvcg_video_enable(video, 0); > + if (ret < 0) > + return ret; > + > + uvc->state = UVC_STATE_CONNECTED; > + > + return 0; > + > } > > static int -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 2/3] usb: gadget: uvc: remove delay usb status phase

2018-05-21 Thread Laurent Pinchart
; v4l2_buf_type type) > > uvc->state = UVC_STATE_STREAMING; > > - /* > - * Complete the alternate setting selection setup phase now that > - * userspace is ready to provide video frames. > - */ > - uvc_function_setup_continue(uvc); > - >

Re: Pandaboard OMAP4 MUSB short packet hang on UVC gadget

2018-05-18 Thread Laurent Pinchart
will successfully transfer (only) the first frame again. > > > > Any other hints and tips appreciated! > > Does the usecase ever worked on Pandaboard with older kernels? If so, > you can try to bisect the commit which causes the regression. Not that I recall. The use

Re: [PATCH 2/4] usb: gadget: composite: add function to increment delayed_status

2018-04-21 Thread Laurent Pinchart
Hi Alan, On Friday, 20 April 2018 17:09:57 EEST Alan Stern wrote: > On Thu, 19 Apr 2018, Laurent Pinchart wrote: > > According to include/linux/usb/composite.h, the delayed_status field > > should be protected by cdev->lock, which you should use here. > > > > I've r

Re: [PATCH 2/4] usb: gadget: composite: add function to increment delayed_status

2018-04-19 Thread Laurent Pinchart
; @@ -524,6 +524,8 @@ extern int composite_setup(struct usb_gadget *gadget, > extern void composite_suspend(struct usb_gadget *gadget); > extern void composite_resume(struct usb_gadget *gadget); > > +extern void usb_composite_setup_delay(struct usb_composite_dev *c); > + > /* >

Re: [PATCH 0/5] usb: gadget: uvc: fix racing between uvc_function_set_alt and streamon/off

2018-04-19 Thread Laurent Pinchart
sconnected > > drivers/usb/gadget/composite.c | 6 ++ > drivers/usb/gadget/function/f_uvc.c| 24 +--- > drivers/usb/gadget/function/uvc.h | 2 ++ > drivers/usb/gadget/function/uvc_v4l2.c | 21 +++-- > include/linux/usb/compo

Re: [PATCH] usb/gadget/uvc-configs Fix host unable to negotiate framesizes other than first

2018-03-21 Thread Laurent Pinchart
or wasting your time, I > will have v4 along shortly If the result is that you become more familiar with kernel development and keep contributing I'll consider this as time well invested, not wasted. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line &quo

Re: [PATCH] usb/gadget/uvc-configs Fix host unable to negotiate framesizes other than first

2018-03-21 Thread Laurent Pinchart
le16_to_cpu, cpu_to_le16, 16); > UVCG_FRAME_ATTR(w_height, wHeight, le16_to_cpu, cpu_to_le16, 16); > UVCG_FRAME_ATTR(dw_min_bit_rate, dwMinBitRate, le32_to_cpu, cpu_to_le32, > 32); @@ -1137,6 +1139,7 @@ UVC_ATTR(uvcg_frame_, dw_frame_interval, > dwFrameInterval); > > static struct

Re: [PATCHv2] usb/gadget/uvc-configs Fix host unable to negotiate framesizes other than first

2018-03-21 Thread Laurent Pinchart
Hi Joel, On Tuesday, 20 March 2018 12:30:00 EET Joel Pepper wrote: > On 20.03.2018 10:02, Laurent Pinchart wrote: > > Hi Joel, > > > > (CC'ing Paul Elder who is working on the UVC gadget driver) > > > > Thank you for the patch. > > > > On Monday,

Re: [PATCHv2] usb/gadget/uvc-configs Fix host unable to negotiate framesizes other than first

2018-03-20 Thread Laurent Pinchart
RAME_ATTR(w_width, wWidth, le16_to_cpu, cpu_to_le16, 16); > UVCG_FRAME_ATTR(w_height, wHeight, le16_to_cpu, cpu_to_le16, 16); > UVCG_FRAME_ATTR(dw_min_bit_rate, dwMinBitRate, le32_to_cpu, cpu_to_le32, > 32); > @@ -1137,6 +1139,7 @@ UVC_ATTR(uvcg_frame_, dw_frame_interval, > dwFrameInterva

Re: Some questions about the UVC gadget

2018-02-22 Thread Laurent Pinchart
port. Paul has recently started working on the UVC gadget driver to revive it along with the userspace helper application. Further down on his to-do list he told me he would like to implement UVC 1.5 support on the host side, but that won't be for the near future (no pressure Paul :-)). -- Regards, Laur

Re: [PATCH 21/24] USB: gadget: legacy: Remove redundant license text

2017-11-06 Thread Laurent Pinchart
r non-license-description text was removed. > > Cc: Felipe Balbi <ba...@kernel.org> > Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> > Cc: Johan Hovold <jo...@kernel.org> > Cc: Ruslan Bilovol <ruslan.bilo...@gmail.com> > Cc: Peter Chen <peter.c..

Re: [PATCH 23/24] USB: gadget: function: Remove redundant license text

2017-11-06 Thread Laurent Pinchart
r non-license-description text was removed. > > Cc: Felipe Balbi <ba...@kernel.org> > Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> > Cc: Oliver Neukum <oneu...@suse.com> > Cc: Johan Hovold <jo...@kernel.org> > Cc: Michal Nazarewicz <min...@mi

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-19 Thread Laurent Pinchart
think that's a good idea. > > But I'm about to slurp up this whole series into my tree, how about making > that an incremental patch? I'm fine with that. Bhumika, would you like to submit an incremental patch, or should I do it ? -- Regards, Laurent Pinchart -- To unsubscr

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-18 Thread Laurent Pinchart
s_grp_type = { > .ct_owner = THIS_MODULE, > }; > > @@ -2104,7 +2104,7 @@ static void uvcg_streaming_class_drop_link(struct > config_item *src, struct config_group group; > } uvcg_streaming_grp; > > -static struct config_item_type uvcg_streaming_grp_type = { > +static con

Re: [RFC PATCH 1/4] dt-bindings: add bindings for USB physical connector

2017-10-18 Thread Laurent Pinchart
Hi Andrzej, On Wednesday, 18 October 2017 18:11:25 EEST Laurent Pinchart wrote: > On Thursday, 28 September 2017 16:07:27 EEST Andrzej Hajda wrote: > > These bindings allows to describe most known standard USB connectors > > and it should be possible to extend it if necessary. >

Re: [RFC PATCH 1/4] dt-bindings: add bindings for USB physical connector

2017-10-18 Thread Laurent Pinchart
quot;; > + size = "micro"; > + max-mode = "hs"; > + > + port { > + #address-cells = <1>; > + #size-cells = <0>; > + > + musb_con_usb_in: endpoint@0 { > + reg = <0>; > + remote-endpoint = <_usb_out>; > + }; > + > + musb_con_mhl_in: endpoint@1 { > + reg = <1>; > + remote-endpoint = <_out>; > + }; > + }; > +}; -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 4/9] USB: gadget: remove unneeded MODULE_VERSION() usage

2017-07-19 Thread Laurent Pinchart
pointless. > > Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> > Cc: Felipe Balbi <ba...@kernel.org> > Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> > --- > drivers/usb/gadget/legacy/webcam.c | 1 - Reviewed-by: Laurent Pinchart <la

Re: Chipidea USB controller hangs in peripheral mode under high memory bus pressure

2017-05-15 Thread Laurent Pinchart
ho contacted Laurent regarding this issue. We have some > >>> further observations: > >>> > >>> Am 04.05.2017 um 08:45 schrieb Peter Chen: > >>>> On Wed, May 03, 2017 at 01:32:28PM +0300, Laurent Pinchart wrote: > >>>>>> There

Re: Chipidea USB controller hangs in peripheral mode under high memory bus pressure

2017-05-03 Thread Laurent Pinchart
Hi Peter, On Wednesday 03 May 2017 11:10:55 Peter Chen wrote: > On Tue, May 02, 2017 at 03:07:03PM +0300, Laurent Pinchart wrote: > > Hello, > > > > I ran into an issue with a Xilinx Zynq XC7Z010 system. The system acts as > > a USB peripheral, using the UVC g

Re: Chipidea USB controller hangs in peripheral mode under high memory bus pressure

2017-05-03 Thread Laurent Pinchart
Hi Peter, Thank you for your quick reply. On Wednesday 03 May 2017 11:10:55 Peter Chen wrote: > On Tue, May 02, 2017 at 03:07:03PM +0300, Laurent Pinchart wrote: > > Hello, > > > > I ran into an issue with a Xilinx Zynq XC7Z010 system. The system acts as > > a US

Re: Chipidea USB controller hangs in peripheral mode under high memory bus pressure

2017-05-02 Thread Laurent Pinchart
On Tuesday 02 May 2017 15:07:03 Laurent Pinchart wrote: > Hello, > > I ran into an issue with a Xilinx Zynq XC7Z010 system. The system acts as a > USB peripheral, using the UVC gadget driver. > > When transferring high bandwidth data over USB in isochronous mode, complet

Chipidea USB controller hangs in peripheral mode under high memory bus pressure

2017-05-02 Thread Laurent Pinchart
pressure. Has anyone run into this problem before ? Is this a known issue ? I don't mind getting my hands dirty debugging, but as I'm not familiar with the chipidea USB controller pointers to what I should check in priority would be appreciated. -- Regards, Laurent Pinchart -- To unsubscribe from

Re: [PATCH] usb: gadget: uvc: Missing files for configfs interface

2017-03-31 Thread Laurent Pinchart
Hi Felipe and Petr, On Tuesday 28 Mar 2017 16:48:46 Felipe Balbi wrote: > Petr Cvek <petr.c...@tul.cz> writes: > > Dne 7.3.2017 v 06:58 Laurent Pinchart napsal(a): > >> On Tuesday 07 Mar 2017 00:57:20 Petr Cvek wrote: > >>> Commit 76e0da34c7ce ("usb-gad

  1   2   3   4   5   6   >