Re: [PATCH v16 5/7] spi: pxa2xx: disable DMA for Apple MacBook8,1
From: Mark Brown
Date: Wed Jul 29 2026 - 16:24:48 EST
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...).
Attachment:
signature.asc
Description: PGP signature