msm: camera: memmgr: Add presil memory API implementation
Add code for dmabuf, fd conversion and copying all buffers using presil framework APIs. CRs-Fixed: 2932495 Change-Id: Icfb6dc1a3326ea8214a71fd39871a8583a6e902c Signed-off-by: Suraj Dongre <sdongre@codeaurora.org> Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

父節點
9b31a3dc93
當前提交
37de6613a8
@@ -26,25 +26,33 @@ enum cam_smmu_mapping_client {
|
||||
CAM_SMMU_MAPPING_KERNEL,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CAM_PRESIL
|
||||
struct cam_presil_dmabuf_params {
|
||||
int32_t fd_for_umd_daemon;
|
||||
uint32_t refcount;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct cam_mem_buf_queue
|
||||
*
|
||||
* @dma_buf: pointer to the allocated dma_buf in the table
|
||||
* @q_lock: mutex lock for buffer
|
||||
* @hdls: list of mapped handles
|
||||
* @num_hdl: number of handles
|
||||
* @fd: file descriptor of buffer
|
||||
* @i_ino: inode number of this dmabuf. Uniquely identifies a buffer
|
||||
* @buf_handle: unique handle for buffer
|
||||
* @align: alignment for allocation
|
||||
* @len: size of buffer
|
||||
* @flags: attributes of buffer
|
||||
* @vaddr: IOVA of buffer
|
||||
* @kmdvaddr: Kernel virtual address
|
||||
* @active: state of the buffer
|
||||
* @is_imported: Flag indicating if buffer is imported from an FD in user space
|
||||
* @is_internal: Flag indicating kernel allocated buffer
|
||||
* @timestamp: Timestamp at which this entry in tbl was made
|
||||
* @dma_buf: pointer to the allocated dma_buf in the table
|
||||
* @q_lock: mutex lock for buffer
|
||||
* @hdls: list of mapped handles
|
||||
* @num_hdl: number of handles
|
||||
* @fd: file descriptor of buffer
|
||||
* @i_ino: inode number of this dmabuf. Uniquely identifies a buffer
|
||||
* @buf_handle: unique handle for buffer
|
||||
* @align: alignment for allocation
|
||||
* @len: size of buffer
|
||||
* @flags: attributes of buffer
|
||||
* @vaddr: IOVA of buffer
|
||||
* @kmdvaddr: Kernel virtual address
|
||||
* @active: state of the buffer
|
||||
* @is_imported: Flag indicating if buffer is imported from an FD in user space
|
||||
* @is_internal: Flag indicating kernel allocated buffer
|
||||
* @timestamp: Timestamp at which this entry in tbl was made
|
||||
* @presil_params: Parameters specific to presil environment
|
||||
*/
|
||||
struct cam_mem_buf_queue {
|
||||
struct dma_buf *dma_buf;
|
||||
@@ -63,6 +71,10 @@ struct cam_mem_buf_queue {
|
||||
bool is_imported;
|
||||
bool is_internal;
|
||||
struct timespec64 timestamp;
|
||||
|
||||
#ifdef CONFIG_CAM_PRESIL
|
||||
struct cam_presil_dmabuf_params presil_params;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user