msm: camera: mem_mgr: Add dma_buf_vunmap to cam_compat
dma_buf_vunmap function signature changed between kernel version 5.10 and 5.15. CRs-Fixed: 3088126 Change-Id: If6ef72aa7839e358bc6d7a384e628b760ecaf265 Signed-off-by: zhuo <quic_zhuo@quicinc.com>
This commit is contained in:
@@ -148,7 +148,7 @@ static int cam_mem_util_unmap_cpu_va(struct dma_buf *dmabuf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dma_buf_vunmap(dmabuf, (void *)vaddr);
|
cam_compat_util_put_dmabuf_va(dmabuf, (void *)vaddr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dma_buf_begin_cpu_access() and
|
* dma_buf_begin_cpu_access() and
|
||||||
|
@@ -354,6 +354,13 @@ int cam_compat_util_get_dmabuf_va(struct dma_buf *dmabuf, uintptr_t *vaddr)
|
|||||||
return error_code;
|
return error_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cam_compat_util_put_dmabuf_va(struct dma_buf *dmabuf, void *vaddr)
|
||||||
|
{
|
||||||
|
struct dma_buf_map mapping = DMA_BUF_MAP_INIT_VADDR(vaddr);
|
||||||
|
|
||||||
|
dma_buf_vunmap(dmabuf, &mapping);
|
||||||
|
}
|
||||||
|
|
||||||
int cam_get_ddr_type(void)
|
int cam_get_ddr_type(void)
|
||||||
{
|
{
|
||||||
/* We assume all chipsets running kernel version 5.15+
|
/* We assume all chipsets running kernel version 5.15+
|
||||||
@@ -395,6 +402,11 @@ int cam_compat_util_get_dmabuf_va(struct dma_buf *dmabuf, uintptr_t *vaddr)
|
|||||||
return error_code;
|
return error_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cam_compat_util_put_dmabuf_va(struct dma_buf *dmabuf, void *vaddr)
|
||||||
|
{
|
||||||
|
dma_buf_vunmap(dmabuf, vaddr);
|
||||||
|
}
|
||||||
|
|
||||||
int cam_get_ddr_type(void)
|
int cam_get_ddr_type(void)
|
||||||
{
|
{
|
||||||
return of_fdt_get_ddrtype();
|
return of_fdt_get_ddrtype();
|
||||||
|
@@ -49,6 +49,7 @@ void cam_check_iommu_faults(struct iommu_domain *domain,
|
|||||||
struct cam_smmu_pf_info *pf_info);
|
struct cam_smmu_pf_info *pf_info);
|
||||||
int cam_get_ddr_type(void);
|
int cam_get_ddr_type(void);
|
||||||
int cam_compat_util_get_dmabuf_va(struct dma_buf *dmabuf, uintptr_t *vaddr);
|
int cam_compat_util_get_dmabuf_va(struct dma_buf *dmabuf, uintptr_t *vaddr);
|
||||||
|
void cam_compat_util_put_dmabuf_va(struct dma_buf *dmabuf, void *vaddr);
|
||||||
void cam_smmu_util_iommu_custom(struct device *dev,
|
void cam_smmu_util_iommu_custom(struct device *dev,
|
||||||
dma_addr_t discard_start, size_t discard_length);
|
dma_addr_t discard_start, size_t discard_length);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user