From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Mark Brown <broonie@debian.org>
Cc: Lukas Wunner <lukas@wunner.de>,
"Shih-Yuan Lee (FourDollars)" <fourdollars@debian.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v16 5/7] spi: pxa2xx: disable DMA for Apple MacBook8,1
Date: Thu, 10 Sep 2026 12:33:42 +0300 [thread overview]
Message-ID: <aqJ5dqLKht5ezDw1@ashevche-desk.local> (raw)
In-Reply-To: <c05bb236-5aa2-4050-a030-8caed6d47a40@sirena.org.uk>
On Wed, Jul 29, 2026 at 09:21:41PM +0100, Mark Brown wrote:
> On Wed, Jul 29, 2026 at 10:05:57PM +0200, Lukas Wunner wrote:
> > On Sun, Jul 26, 2026 at 06:14:35PM +0200, Lukas Wunner wrote:
>
> > > I'm not sure why Apple chose to keep the DMA controller in reset,
> > > but have you explored enabling it on boot?
>
> > Thinking about this some more and after taking a look at
> > drivers/input/keyboards/applespi.c, I realize messages exchanged via SPI
> > are always 256 bytes in size. That's not a whole lot, and of course
> > messages are only exchanged when a key is pressed or the trackpad is
> > used. So perhaps Apple determined that sending this in PIO mode is
> > ultimately more efficient than keeping a DMA engine powered on all the
> > time. The CPU load saved through offloading the SPI transfer is offset
> > by having to program the DMA engine for each transfer.
>
> > So perhaps usage of PIO mode was indeed an intentional choice by Apple
> > and need not be second-guessed. I'm not sure.
>
> DMA can also add extra latency with interrupt handling, it's possible
> someone decided to trade some CPU time for minimal latency (though you
> could probably arrange for shorter messages...).
Okay, so let's go with the disabled DMA approach, but this will need
a good commit message and a big comment in the code explaining all findings
and some kind of summary of this discussion(s).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-10 9:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 16:21 [PATCH v16 0/7] spi: pxa2xx: Fix PM and interrupt issues on Intel LPSS SPI Shih-Yuan Lee
2026-07-20 16:21 ` [PATCH v16 1/7] spi: pxa2xx: introduce clock enable and disable helper functions Shih-Yuan Lee
2026-07-20 19:22 ` Andy Shevchenko
2026-07-26 8:15 ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 2/7] spi: pxa2xx: introduce suspended flag for interrupt synchronization Shih-Yuan Lee
2026-07-20 17:18 ` Mark Brown
2026-07-26 10:35 ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 3/7] spi: pxa2xx: overhaul teardown and suspend sequence using pxa2xx_spi_off Shih-Yuan Lee
2026-07-20 19:53 ` Andy Shevchenko
2026-07-26 11:12 ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 4/7] spi: pxa2xx: lock out runtime autosuspend for Intel LPSS SPI in PIO mode Shih-Yuan Lee
2026-07-20 19:55 ` Andy Shevchenko
2026-07-26 11:18 ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 5/7] spi: pxa2xx: disable DMA for Apple MacBook8,1 Shih-Yuan Lee
2026-07-20 19:27 ` Andy Shevchenko
2026-07-21 14:49 ` Shih-Yuan Lee (FourDollars)
2026-07-21 20:31 ` Andy Shevchenko
2026-07-21 9:00 ` Lukas Wunner
2026-07-21 9:26 ` Shih-Yuan Lee (FourDollars)
2026-07-21 14:34 ` Shih-Yuan Lee (FourDollars)
2026-07-21 15:05 ` Mark Brown
2026-07-21 15:26 ` Shih-Yuan Lee (FourDollars)
2026-07-21 16:09 ` Shih-Yuan Lee (FourDollars)
2026-07-21 20:41 ` Andy Shevchenko
2026-07-26 15:41 ` Shih-Yuan Lee (FourDollars)
2026-07-26 16:14 ` Lukas Wunner
2026-07-29 20:05 ` Lukas Wunner
2026-07-29 20:21 ` Mark Brown
2026-09-10 9:33 ` Andy Shevchenko [this message]
2026-07-22 9:58 ` Lukas Wunner
2026-07-21 20:28 ` Andy Shevchenko
2026-07-20 16:21 ` [PATCH v16 6/7] spi: pxa2xx: restore LPSS private register state on S3 resume Shih-Yuan Lee
2026-07-20 19:59 ` Andy Shevchenko
2026-07-26 11:48 ` Shih-Yuan Lee (FourDollars)
2026-08-06 20:24 ` Andy Shevchenko
2026-07-20 16:21 ` [PATCH v16 7/7] spi: pxa2xx: rename local status variable to ret Shih-Yuan Lee
2026-07-20 19:56 ` Andy Shevchenko
2026-07-26 11:23 ` Shih-Yuan Lee (FourDollars)
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=aqJ5dqLKht5ezDw1@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=broonie@debian.org \
--cc=daniel@zonque.org \
--cc=fourdollars@debian.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=robert.jarzmik@free.fr \
/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