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

This reverts commit e8f7a297a7.

Change-Id: I3b9ab8391312ebcf7496def522cb742e2d7c4036
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This commit is contained in:
Jianqun Xu
2022-04-15 13:36:37 +08:00
committed by Tao Huang
parent f9114c28a3
commit 569ea4ebd4

View File

@@ -9,7 +9,7 @@
*
*/
#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>
@@ -245,8 +245,10 @@ 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);
if (!IS_ENABLED(CONFIG_DMABUF_CACHE))
/* Increase the reference for used outside the buffer pool */
kref_get(&buffer->ref);
mutex_lock(&dma->list_mutex);
dma->buffer_count++;