Re: [PATCH] staging: ion: Rework ion_map_dma_buf() to minimize re-mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 13, 2018 at 11:01 PM, Liam Mark <lmark@xxxxxxxxxxxxxx> wrote:
> On Fri, 12 Oct 2018, Laura Abbott wrote:
>> I thought there might have been some Qualcomm
>> stuff that did that (Liam? Todd?)
>
> Yes we have a form of "lazy mapping", which clients can opt into using,
> which results in iommu page table mapping not being unmaped on dma-unamp.
> Instead they are unmapped when the buffer is destroyed.
>
> It is important to note that in our "lazy mapping" implementation cache
> maintenance is still applied on dma-map and dma-unmap.
> If you need a full description of this feature I can provide it.
>
>>
>> I suspect most of the cost of the dma_map/dma_unmap is from the
>> cache flushing and not the actual mapping operations. If this
>> is the case, another option might be to figure out how to
>> incorporate dma_attrs so drivers can use DMA_ATTR_SKIP_CPU_SYNC
>> to decide when they actually want to sync.
>
> We have support for this locally on our 4.14 branch.
>
> We have added a dma_map_attrs field to the dma_buf_attachment struct,
> clients can then specify dma-attributes here such as
> DMA_ATTR_SKIP_CPU_SYNC before dma-mapping the buffer, then we ensure that
> these dma attributes are passed to dma_map_sg_attrs when ion_map_dma_buf
> is called (same for ion_unmap_dma_buf).

Do you happen to have a pointer to the tree if its public?

thanks
-john
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux