linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jack Pham <jackp@codeaurora.org>
To: Ferry Toth <fntoth@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	John Stultz <john.stultz@linaro.org>,
	Amit Pundir <amit.pundir@linaro.org>, Ray Chi <raychi@google.com>,
	Ferry Toth <ftoth@exalondelft.nl>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Li Jun <jun.li@nxp.com>, Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, Wesley Cheng <wcheng@codeaurora.org>
Subject: Re: [RFT][PATCH] usb: dwc3: Decouple USB 2.0 L1 & L2 events
Date: Fri, 20 Aug 2021 05:17:31 -0700	[thread overview]
Message-ID: <20210820121731.GC30805@jackp-linux.qualcomm.com> (raw)
In-Reply-To: <de4c1fd9-7d2d-1038-8b8f-856e9dfd88cd@gmail.com>

On Wed, Aug 18, 2021 at 09:48:18PM +0200, Ferry Toth wrote:
> Op 18-08-2021 om 11:33 schreef Andy Shevchenko:
> > On Tue, Aug 17, 2021 at 06:28:59PM -0700, Jack Pham wrote:
> > > On Thu, Aug 12, 2021 at 01:26:35AM -0700, Jack Pham wrote:
> > > > On DWC_usb3 revisions 3.00a and newer (including DWC_usb31 and
> > > > DWC_usb32) the GUCTL1 register gained the DEV_DECOUPLE_L1L2_EVT
> > > > field (bit 31) which when enabled allows the controller in device
> > > > mode to treat USB 2.0 L1 LPM & L2 events separately.
> > > > 
> > > > After commit d1d90dd27254 ("usb: dwc3: gadget: Enable suspend
> > > > events") the controller will now receive events (and therefore
> > > > interrupts) for every state change when entering/exiting either
> > > > L1 or L2 states.  Since L1 is handled entirely by the hardware
> > > > and requires no software intervention, there is no need to even
> > > > enable these events and unnecessarily notify the gadget driver.
> > > > Enable the aforementioned bit to help reduce the overall interrupt
> > > > count for these L1 events that don't need to be handled while
> > > > retaining the events for full L2 suspend/wakeup.
> > > 
> > > Hi folks in To:
> > > 
> > > I'd like to request if any of you could help test this patch on your
> > > boards to help make sure it doesn't cause any regressions since I know
> > > some of the recent dwc3 patches from Qualcomm have been found to break
> > > other devices :(. So I'm hoping to avoid that even for a patch as
> > > small as this.
> > > 
> > > Hoping this could be tried out on boards/SoCs such as db845c, hikey960,
> > > Exynos, the Intel "lakes", etc.  Ideally this needs validation with a
> > > high-speed connection to a USB 3.x host, which increases the chances
> > > that USB 2.0 Link Power Management is supported.
> 
> Merrifield: We currently have
> PROPERTY_ENTRY_BOOL("snps,usb2-gadget-lpm-disable")
> 
> Should I retest with this reverted?

Maybe best to leave it, since it looks like you had added this quirk
for other L1 LPM incompatibility issues you faced on this platform.

> > > The overall goal of this patch is to eliminate events generated for
> > > L1 entry/exit, so we should see a slight reduction in interrupt counts
> > > when checking `grep dwc3 /proc/interrupts` for comparable traffic.
> 
> I didn't compare interrupts
> 
> > Unfortunately I'm quite busy lately with more important stuff and I dunno if I
> > will be able to test this in reasonable time. So, if Ferry volunteers, then we
> > can cover Intel Merrifield platform as well.
> > 
> 
> Performance unchanged, no regressions found.
> Tested-by: Ferry Toth <fntoth@gmail.com> # for Merrifield

At least it is a no-op for you. Thanks for verifying!

Jack
-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  parent reply	other threads:[~2021-08-20 12:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  8:26 [PATCH] usb: dwc3: Decouple USB 2.0 L1 & L2 events Jack Pham
2021-08-18  1:28 ` [RFT][PATCH] " Jack Pham
2021-08-18  2:07   ` John Stultz
2021-08-18  7:52   ` Jun Li
2021-08-18  9:09   ` Amit Pundir
2021-08-18  9:33   ` Andy Shevchenko
2021-08-18 19:48     ` Ferry Toth
2021-08-19 12:26       ` Andy Shevchenko
2021-08-20 12:17       ` Jack Pham [this message]
2021-08-19  2:01   ` Thinh Nguyen
2021-08-18  5:08 ` [PATCH] " 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=20210820121731.GC30805@jackp-linux.qualcomm.com \
    --to=jackp@codeaurora.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=amit.pundir@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=balbi@kernel.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=fntoth@gmail.com \
    --cc=ftoth@exalondelft.nl \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=jun.li@nxp.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=raychi@google.com \
    --cc=wcheng@codeaurora.org \
    /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).