diff --git a/drivers/cam_req_mgr/cam_mem_mgr.c b/drivers/cam_req_mgr/cam_mem_mgr.c index da010ed199..8a26428f47 100644 --- a/drivers/cam_req_mgr/cam_mem_mgr.c +++ b/drivers/cam_req_mgr/cam_mem_mgr.c @@ -1860,7 +1860,7 @@ struct dma_buf *cam_mem_mgr_get_dma_buf(int fd) return dmabuf; } -int cam_presil_put_dmabuf_from_fd(uint64_t input_dmabuf) +int cam_mem_mgr_put_dmabuf_from_fd(uint64_t input_dmabuf) { struct dma_buf *dmabuf = (struct dma_buf *)(uint64_t)input_dmabuf; int idx = 0; @@ -1889,9 +1889,8 @@ int cam_presil_put_dmabuf_from_fd(uint64_t input_dmabuf) return 0; } -EXPORT_SYMBOL(cam_presil_put_dmabuf_from_fd); -int cam_presil_get_fd_from_dmabuf(uint64_t input_dmabuf) +int cam_mem_mgr_get_fd_from_dmabuf(uint64_t input_dmabuf) { int fd_for_dmabuf = -1; struct dma_buf *dmabuf = (struct dma_buf *)(uint64_t)input_dmabuf; @@ -1942,7 +1941,6 @@ int cam_presil_get_fd_from_dmabuf(uint64_t input_dmabuf) return (int)fd_for_dmabuf; } -EXPORT_SYMBOL(cam_presil_get_fd_from_dmabuf); int cam_mem_mgr_send_buffer_to_presil(int32_t iommu_hdl, int32_t buf_handle) { diff --git a/drivers/cam_req_mgr/cam_mem_mgr.h b/drivers/cam_req_mgr/cam_mem_mgr.h index 60f59c71d8..51025b7fbc 100644 --- a/drivers/cam_req_mgr/cam_mem_mgr.h +++ b/drivers/cam_req_mgr/cam_mem_mgr.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef _CAM_MEM_MGR_H_ @@ -181,6 +182,23 @@ int cam_mem_mgr_init(void); */ void cam_mem_mgr_deinit(void); +#ifdef CONFIG_CAM_PRESIL +/** + * @brief: Put dma-buf for input dmabuf + * + * @return Status of operation. Negative in case of error. Zero otherwise. + */ +int cam_mem_mgr_put_dmabuf_from_fd(uint64_t input_dmabuf); + +/** + * @brief: Create a fd for dma-buf + * + * @return Status of operation. Negative in case of error. Zero or + * Positive otherwise. + */ +int cam_mem_mgr_get_fd_from_dmabuf(uint64_t input_dmabuf); +#endif /* ifdef CONFIG_CAM_PRESIL */ + /** * @brief: Copy buffer content to presil mem for all buffers of * iommu handle