msm: camera: common: Optimize the name of some functions

Optimize the names of some functions and add declaration
for them in head file.

CRs-Fixed: 3164829
Change-Id: Ia10ab83e0b6164a82fdd21b351477294bf4bbe4b
Signed-off-by: mingpan <quic_mingpan@quicinc.com>
This commit is contained in:
mingpan
2022-04-01 16:35:31 +08:00
committed by Camera Software Integration
parent 14c3d963a5
commit 00c0a92dea
2 changed files with 20 additions and 4 deletions

View File

@@ -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)
{

View File

@@ -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