[PATCH v16 5/7] spi: pxa2xx: disable DMA for Apple MacBook8,1
Mark Brown
broonie at debian.org
Wed Jul 29 13:21:41 PDT 2026
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...).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260729/9bd85de5/attachment.sig>
More information about the linux-arm-kernel
mailing list