video: rockchip: rga3: remove useless cache flushing interface

There is already dma_sync_sg_xx to replace arch_dma_prep_coherent/__dma_flush_area.

Update driver version to 1.2.14

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1dd9d6806c9e6d81391796cc3a27bbf5f6129865
This commit is contained in:
Yu Qiaowei
2022-06-02 14:17:55 +08:00
committed by Tao Huang
parent 545047abb0
commit 3a3f6e24ab
2 changed files with 1 additions and 18 deletions

View File

@@ -86,7 +86,7 @@
#define DRIVER_MAJOR_VERISON 1
#define DRIVER_MINOR_VERSION 2
#define DRIVER_REVISION_VERSION 13
#define DRIVER_REVISION_VERSION 14
#define DRIVER_VERSION (STR(DRIVER_MAJOR_VERISON) "." STR(DRIVER_MINOR_VERSION) \
"." STR(DRIVER_REVISION_VERSION))

View File

@@ -291,20 +291,6 @@ static inline struct iommu_domain *rga_iommu_get_dma_domain(struct device *dev)
return iommu_get_domain_for_dev(dev);
}
static inline void rga_dma_flush_cache_by_sgt(struct sg_table *sgt)
{
struct scatterlist *sg;
int i;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0))
for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
arch_dma_prep_coherent(sg_page(sg), sg->length);
#else
for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
__dma_flush_area(sg_page(sg), sg->length);
#endif
}
void rga_iommu_unmap_virt_addr(struct rga_dma_buffer *virt_dma_buf)
{
if (virt_dma_buf == NULL)
@@ -353,9 +339,6 @@ int rga_iommu_map_virt_addr(struct rga_memory_parm *memory_parm,
return -ENOMEM;
}
if (!(ioprot & IOMMU_CACHE))
rga_dma_flush_cache_by_sgt(sgt);
map_size = rga_iommu_map_sg(domain, iova, sgt->sgl, sgt->orig_nents, ioprot);
if (map_size < size) {
pr_err("iommu can not map sgt to iova");