From: Roger Quadros <rogerq@ti.com>
To: <balbi@kernel.org>
Cc: <nsekhar@ti.com>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: gadget: Fix ISO transfer performance
Date: Wed, 17 May 2017 10:44:17 +0300 [thread overview]
Message-ID: <0b5968b0-0451-b892-4798-4df33e2aac33@ti.com> (raw)
In-Reply-To: <1492779488-15127-1-git-send-email-rogerq@ti.com>
Hi Felipe,
On 21/04/17 15:58, Roger Quadros wrote:
> Commit 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()")
> caused a small change in the way ISO transfer is handled in the case
> when XferInProgress event happens on Isoc EP with an active transfer.
> This caused a performance degradation of 50%. e.g. using g_webcam on DUT
> and luvcview on host the video frame rate dropped from 16fps to 8fps
> @high-speed.
>
> Make the ISO transfer handling equivalent to that prior to that commit
> to get back the original ISO performance numbers.
>
> Fixes: 08a36b543803 ("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()")
> Signed-off-by: Roger Quadros <rogerq@ti.com>
Any comments?
> ---
> drivers/usb/dwc3/gadget.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 0d75158..8f71ccc 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -1245,14 +1245,24 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
> __dwc3_gadget_start_isoc(dwc, dep, cur_uf);
> dep->flags &= ~DWC3_EP_PENDING_REQUEST;
> }
> + return 0;
> }
> - return 0;
> +
> + if ((dep->flags & DWC3_EP_BUSY) &&
> + !(dep->flags & DWC3_EP_MISSED_ISOC)) {
> + WARN_ON_ONCE(!dep->resource_index);
> + ret = __dwc3_gadget_kick_transfer(dep,
> + dep->resource_index);
> + }
> +
> + goto out;
> }
>
> if (!dwc3_calc_trbs_left(dep))
> return 0;
>
> ret = __dwc3_gadget_kick_transfer(dep, 0);
> +out:
> if (ret == -EBUSY)
> ret = 0;
>
>
--
cheers,
-roger
next prev parent reply other threads:[~2017-05-17 7:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 12:58 [PATCH] usb: dwc3: gadget: Fix ISO transfer performance Roger Quadros
2017-05-17 7:44 ` Roger Quadros [this message]
2017-05-17 7:48 ` Felipe Balbi
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=0b5968b0-0451-b892-4798-4df33e2aac33@ti.com \
--to=rogerq@ti.com \
--cc=balbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nsekhar@ti.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).