From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-media@vger.kernel.org, hdegoede@redhat.com,
Thinh.Nguyen@synopsys.com, Tao Q Tao <tao.q.tao@intel.com>,
Amardeep Rai <amardeep.rai@intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH 3/3] media: uvcvideo: eUSB2 double isochronous bandwidth support
Date: Mon, 16 Jun 2025 16:22:22 +0300 [thread overview]
Message-ID: <20250616132222.GB10542@pendragon.ideasonboard.com> (raw)
In-Reply-To: <7ab7cd9e-3100-4996-9357-5350e4c46824@linux.intel.com>
On Mon, Jun 16, 2025 at 04:05:54PM +0300, Mathias Nyman wrote:
> On 16.6.2025 12.43, Laurent Pinchart wrote:
> > On Mon, Jun 16, 2025 at 12:37:30PM +0300, Mathias Nyman wrote:
> >> From: Tao Q Tao <tao.q.tao@intel.com>
> >>
> >> Add eUSB2 support to check total number of bytes, isochronous endpoint
> >> will transfer every service interval(SI).
> >>
> >> Co-developed-by: Amardeep Rai <amardeep.rai@intel.com>
> >> Signed-off-by: Amardeep Rai <amardeep.rai@intel.com>
> >> Signed-off-by: Tao Q Tao <tao.q.tao@intel.com>
> >> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> >> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >> ---
> >> drivers/media/usb/uvc/uvc_video.c | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> >> index e3567aeb0007..a888f84208c6 100644
> >> --- a/drivers/media/usb/uvc/uvc_video.c
> >> +++ b/drivers/media/usb/uvc/uvc_video.c
> >> @@ -1906,6 +1906,11 @@ u16 uvc_endpoint_max_bpi(struct usb_device *dev, struct usb_host_endpoint *ep)
> >> case USB_SPEED_SUPER:
> >> case USB_SPEED_SUPER_PLUS:
> >> return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval);
> >> + case USB_SPEED_HIGH:
> >> + psize = usb_endpoint_maxp(&ep->desc);
> >> + if (psize == 0 && le16_to_cpu(dev->descriptor.bcdUSB) == 0x220)
> >> + return le32_to_cpu(ep->eusb2_isoc_ep_comp.dwBytesPerInterval);
> >> + fallthrough;
> >
> > Instead of adding yet another case here, and eventually in a bunch of
> > other drivers, could we centralize retrieval of the maximum bpi value in
> > a helper function provided by the USB core ?
>
> Sounds reasonable to me.
> I'm not sure if any other drivers will need it as this feature seems to be made
> specifically for integrated webcams, but things evolve.
Even if eUSB2 doesn't get used by other devices, I think centralizing
the whole max bpi calculation will be useful to handle the different
USB_SPEED_*.
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2025-06-16 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 9:37 [PATCH 0/3] USB: Enable eUSB2 double isochronous bandwidth Mathias Nyman
2025-06-16 9:37 ` [PATCH 1/3] xhci: Add host support for eUSB2 double isochronous bandwidth devices Mathias Nyman
2025-06-16 9:37 ` [PATCH 2/3] USB: core: support eUSB2 double bandwidth large isoc URB frames Mathias Nyman
2025-06-16 14:07 ` Alan Stern
2025-06-16 15:36 ` Mathias Nyman
2025-06-16 9:37 ` [PATCH 3/3] media: uvcvideo: eUSB2 double isochronous bandwidth support Mathias Nyman
2025-06-16 9:43 ` Laurent Pinchart
2025-06-16 13:05 ` Mathias Nyman
2025-06-16 13:22 ` Laurent Pinchart [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=20250616132222.GB10542@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=amardeep.rai@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tao.q.tao@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).