Den 02.12.2022 12.50, skrev Thomas Zimmermann: > >>> >>> You use drm_gem_fb_vmap() in the other places but here you access the >>> object directly (and in the next hunk), but again not so important since >>> it goes away in a later patch. >> >> I'll update this patch to use drm_gem_fb_vmap() consistently. > > And after looking at the impact and churn, I rather go with the existing > code that initializes from the GEM DMA object. > > Noralf, is there a reason why most of MIPI DBI uses DMA helpers? In > terms of flexibility and resource consumption, wouldn't SHMEM helpers be > a better fit? > The SHMEM helper didn't exist at the time. The SPI subsystem doesn't have an interface for scatter/gather transfers and DMA is needed in order to run at full speed. SPI does convert an is_vmalloc_addr() buffer to an sg list of pages in spi_map_buf() so it solves the missing interface that way. I have never tried to pass a shmem buffer to spi_sync() so I don't know if it works, but I guess that it will work. Bare in mind that theses buffers are at most 400k in size so I'm not sure there's much to gain in term of resources at least. Noralf.