|
@@ -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();
|