public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Ikjoon Jang <ikjn@chromium.org>,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	Eddie Hung <eddie.hung@mediatek.com>
Subject: Re: [PATCH v2 1/2] usb: xhci-mtk: relax TT periodic bandwidth allocation
Date: Thu, 18 Aug 2022 19:48:15 +0200	[thread overview]
Message-ID: <Yv57X37JcYCBhabS@kroah.com> (raw)
In-Reply-To: <20220805060328.6189-1-chunfeng.yun@mediatek.com>

On Fri, Aug 05, 2022 at 02:03:27PM +0800, Chunfeng Yun wrote:
> Currently uses the worst case byte budgets on FS/LS bus bandwidth,
> for example, for an isochronos IN endpoint with 192 bytes budget, it
> will consume the whole 5 uframes(188 * 5) while the actual FS bus
> budget should be just 192 bytes. It cause that many usb audio headsets
> with 3 interfaces (audio input, audio output, and HID) cannot be
> configured.
> To improve it, changes to use "approximate" best case budget for FS/LS
> bandwidth management. For the same endpoint from the above example,
> the approximate best case budget is now reduced to (188 * 2) bytes.
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> v2: change commit message
> ---
>  drivers/usb/host/xhci-mtk-sch.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-mtk-sch.c
>  b/drivers/usb/host/xhci-mtk-sch.c
> index 06a6b19acaae..a17bc584ee99 100644
> --- a/drivers/usb/host/xhci-mtk-sch.c
> +++ b/drivers/usb/host/xhci-mtk-sch.c
> @@ -425,7 +425,6 @@ static int check_fs_bus_bw(struct mu3h_sch_ep_info
>  *sch_ep, int offset)
>  
>  static int check_sch_tt(struct mu3h_sch_ep_info *sch_ep, u32 offset)
>  {
> -	u32 extra_cs_count;
>  	u32 start_ss, last_ss;
>  	u32 start_cs, last_cs;
>  
> @@ -461,18 +460,12 @@ static int check_sch_tt(struct mu3h_sch_ep_info
>  *sch_ep, u32 offset)
>  		if (last_cs > 7)
>  			return -ESCH_CS_OVERFLOW;
>  
> -		if (sch_ep->ep_type == ISOC_IN_EP)
> -			extra_cs_count = (last_cs == 7) ? 1 : 2;
> -		else /*  ep_type : INTR IN / INTR OUT */
> -			extra_cs_count = 1;
> -
> -		cs_count += extra_cs_count;
>  		if (cs_count > 7)
>  			cs_count = 7; /* HW limit */
>  
>  		sch_ep->cs_count = cs_count;
> -		/* one for ss, the other for idle */
> -		sch_ep->num_budget_microframes = cs_count + 2;
> +		/* ss, idle are ignored */
> +		sch_ep->num_budget_microframes = cs_count;
>  
>  		/*
>  		 * if interval=1, maxp >752, num_budge_micoframe is larger
> -- 
> 2.18.0
> 

This doesn't apply to my tree without fuzz, and when I force it, I get a
build error.  Can you please rebase against 6.0-rc1 and resend?

thanks,

greg k-h

      parent reply	other threads:[~2022-08-18 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  6:03 [PATCH v2 1/2] usb: xhci-mtk: relax TT periodic bandwidth allocation Chunfeng Yun
2022-08-05  6:03 ` [PATCH v2 2/2] usb: xhci-mtk: fix bandwidth release issue Chunfeng Yun
2022-08-18 17:48 ` Greg Kroah-Hartman [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=Yv57X37JcYCBhabS@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=eddie.hung@mediatek.com \
    --cc=ikjn@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=matthias.bgg@gmail.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