mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
dma-buf: rk_heaps: cma heap enable 'cache_sgt_mapping'
Enable the 'cache_sgt_mapping' for rk_cma_heap_buf_ops, to cache the first mapping made for each attachment. This avoids create mappings for attachments multiple times. By the way, cache the sgt can support debugfs to get the buffer information from scatterlists. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Change-Id: Id822e3088af9eab5d88d0172c31191d2fc9d4151
This commit is contained in:
@@ -416,6 +416,7 @@ static void rk_cma_heap_dma_buf_release(struct dma_buf *dmabuf)
|
||||
}
|
||||
|
||||
static const struct dma_buf_ops rk_cma_heap_buf_ops = {
|
||||
.cache_sgt_mapping = true,
|
||||
.attach = rk_cma_heap_attach,
|
||||
.detach = rk_cma_heap_detach,
|
||||
.map_dma_buf = rk_cma_heap_map_dma_buf,
|
||||
|
||||
Reference in New Issue
Block a user