[Intel-gfx] [PATCH v5 5/5] drm/tinydrm: Switch from CMA to shmem buffers

Noralf Trønnes noralf at tronnes.org
Sun Oct 28 20:46:43 UTC 2018


Den 28.10.2018 21.21, skrev David Lechner:
> On 10/26/2018 05:38 PM, Noralf Trønnes wrote:
>> Den 17.10.2018 15.04, skrev Noralf Trønnes:
>>> This move makes tinydrm useful for more drivers. tinydrm doesn't need
>>> continuous memory, but at the time it was convenient to use the CMA
>>> library. The spi core can do dma on is_vmalloc() addresses making this
>>> possible.
>>>
>>> Cc: David Lechner <david at lechnology.com>
>>> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
>>> Acked-by: David Lechner <david at lechnology.com>
>>> Tested-by: David Lechner <david at lechnology.com>
>>> ---
>> David,
>> FYI This series is scratched.
>> See the shmem helper patch thread for details.
>>
> Yes, I saw that. Thank you.
>
> I don't suppose there is a way to configure the DMA controller to do
> the byte swapping?
>

Not that I know of.
"Proper" SPI hw can do 16-bit transfers and for them there's no problem.
The DMA capable SPI block on the Pi can only do 8-bit, hence the swapping.

But that wasn't the problem, the byteswapping actually papered over the
problem. I'm no -mm expert so I don't know why the problem onyl showed
up when using the virtual address of the buffer used by fbcon and not on
mmap'ed fbdev as Daniel suggested would happen.
Either way shmem not being coherent is a problem on the Pi, even though
I expected the DMA streaming API called by the spi core to flush "things".

The solution I'm aiming for is to make it easy for tinydrm drivers to 
use the
buffer type they want, instead of having one type they all have to use.

Noralf.


More information about the Intel-gfx mailing list