[PATCH 3/3] drm/vmwgfx: Use coherent memory if there are dma mapping size restrictions

Thomas Hellström (VMware) thomas_os at shipmail.org
Thu Nov 14 12:42:19 UTC 2019


On 11/14/19 1:40 PM, Christoph Hellwig wrote:
> On Thu, Nov 14, 2019 at 11:56:45AM +0100, Thomas Hellström (VMware) wrote:
>> From: Thomas Hellstrom <thellstrom at vmware.com>
>>
>> We're gradually moving towards using DMA coherent memory in most
>> situations, although TTM interactions with the DMA layers is still a
>> work-in-progress. Meanwhile, use coherent memory when there are size
>> restrictions meaning that there is a chance that streaming dma mapping
>> of large buffer objects may fail.
> Unofrtunately that dma mapping size check really is completely
> broken.  For example the sparc32 iommus have mapping size limitations
> (which we just haven't wired up yet), but will never bounce buffer.
>
> Let me cook up a real API for you instead.  dma_addressing_limited()
> is fundamentally the right call for this, we just need to make it
> handle the corner cases you mentioned in reply to the last version of
> your patch.

Sounds great!

Thanks,

Thomas




More information about the dri-devel mailing list