video: rockchip: mpp: use dma-buf-cache func

Note:
The commit depends on the following commit:
commit 36514da674 ("dma-buf: support to cache dma-buf-attachment")

  The attachment and sg_table will be store in dma-buf-cache.
  So use dma-buf-cache api instead of dma-buf api to reduce
  the actual operation of attach/map.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I8b46c8f6a6f69ebe9854858e198d1c312a808a2f
This commit is contained in:
Yandong Lin
2021-07-12 11:47:02 +08:00
committed by Tao Huang
parent 0ed46b824f
commit d47e486b19

View File

@@ -12,7 +12,7 @@
#include <asm/dma-iommu.h>
#endif
#include <linux/delay.h>
#include <linux/dma-buf.h>
#include <linux/dma-buf-cache.h>
#include <linux/dma-iommu.h>
#include <linux/iommu.h>
#include <linux/of.h>
@@ -233,8 +233,6 @@ struct mpp_dma_buffer *mpp_dma_import_fd(struct mpp_iommu_info *iommu_info,
buffer->dma = dma;
kref_init(&buffer->ref);
/* Increase the reference for used outside the buffer pool */
kref_get(&buffer->ref);
mutex_lock(&dma->list_mutex);
dma->buffer_count++;