msm: camera: memmgr: Set name for dma buffer to help profiling
For dma buffer profiling,we don't konw the owner of one dma buffer. So we add it's name to show it's owner. If you use v1 struct to alloc/map dma buffer it will use default buffer name "UNKNOWN". For v2 struct you can set dma buffer name at UMD side. CRs-Fixed: 3131442 Change-Id: I24ce6aa1d97cd9fc26d9bd8796ab2367607008f6 Signed-off-by: Fengjie Chen <quic_fengjiec@quicinc.com>
这个提交包含在:

提交者
Camera Software Integration

父节点
2e6c254487
当前提交
cf223fa7b3
@@ -69,6 +69,10 @@
|
||||
#define CAM_REQ_MGR_LINK_ACTIVATE 0
|
||||
#define CAM_REQ_MGR_LINK_DEACTIVATE 1
|
||||
|
||||
/* DMA buffer name length */
|
||||
#define CAM_DMA_BUF_NAME_LEN 128
|
||||
#define CAM_REQ_MGR_ALLOC_BUF_WITH_NAME 1
|
||||
|
||||
/**
|
||||
* Request Manager : flush_type
|
||||
* @CAM_REQ_MGR_FLUSH_TYPE_ALL: Req mgr will remove all the pending
|
||||
@@ -338,6 +342,8 @@ struct cam_req_mgr_link_properties {
|
||||
#define CAM_REQ_MGR_REQUEST_DUMP (CAM_COMMON_OPCODE_MAX + 15)
|
||||
#define CAM_REQ_MGR_SCHED_REQ_V2 (CAM_COMMON_OPCODE_MAX + 16)
|
||||
#define CAM_REQ_MGR_LINK_PROPERTIES (CAM_COMMON_OPCODE_MAX + 17)
|
||||
#define CAM_REQ_MGR_ALLOC_BUF_V2 (CAM_COMMON_OPCODE_MAX + 18)
|
||||
#define CAM_REQ_MGR_MAP_BUF_V2 (CAM_COMMON_OPCODE_MAX + 19)
|
||||
|
||||
/* end of cam_req_mgr opcodes */
|
||||
|
||||
@@ -450,6 +456,37 @@ struct cam_mem_mgr_alloc_cmd {
|
||||
struct cam_mem_alloc_out_params out;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_mem_mgr_alloc_cmd_v2
|
||||
* @version: Struct version
|
||||
* @num_hdl: number of handles
|
||||
* @mmu_hdls: array of mmu handles
|
||||
* @len: size of buffer to allocate
|
||||
* @align: alignment of the buffer
|
||||
* @vmids: reserved
|
||||
* @buf_name: DMA buffer name
|
||||
* @flags: flags of the buffer
|
||||
* @num_valid_params: Valid number of params being used
|
||||
* @valid_param_mask: Mask to indicate the field types in params
|
||||
* @params: Additional params
|
||||
* @out: out params
|
||||
*/
|
||||
/* CAM_REQ_MGR_ALLOC_BUF_V2 */
|
||||
struct cam_mem_mgr_alloc_cmd_v2 {
|
||||
__u32 version;
|
||||
__u32 num_hdl;
|
||||
__s32 mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
|
||||
__u64 len;
|
||||
__u64 align;
|
||||
__u64 vmids;
|
||||
char buf_name[CAM_DMA_BUF_NAME_LEN];
|
||||
__u32 flags;
|
||||
__u32 num_valid_params;
|
||||
__u32 valid_param_mask;
|
||||
__s32 params[5];
|
||||
struct cam_mem_alloc_out_params out;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_mem_mgr_map_cmd
|
||||
* @mmu_hdls: array of mmu handles
|
||||
@@ -470,6 +507,37 @@ struct cam_mem_mgr_map_cmd {
|
||||
struct cam_mem_map_out_params out;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_mem_mgr_map_cmd_v2
|
||||
* @version: Struct version
|
||||
* @fd: output buffer file descriptor
|
||||
* @mmu_hdls: array of mmu handles
|
||||
* @num_hdl: number of handles
|
||||
* @flags: flags of the buffer
|
||||
* @vmids: reserved
|
||||
* @buf_name: DMA buffer name
|
||||
* @num_valid_params: Valid number of params being used
|
||||
* @valid_param_mask: Mask to indicate the field types in params
|
||||
* @params: Additional params
|
||||
* @out: out params
|
||||
*/
|
||||
|
||||
/* CAM_REQ_MGR_MAP_BUF_V2 */
|
||||
struct cam_mem_mgr_map_cmd_v2 {
|
||||
__u32 version;
|
||||
__s32 fd;
|
||||
__s32 mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
|
||||
__u32 num_hdl;
|
||||
__u32 flags;
|
||||
__u64 vmids;
|
||||
char buf_name[CAM_DMA_BUF_NAME_LEN];
|
||||
__u32 num_valid_params;
|
||||
__u32 valid_param_mask;
|
||||
__s32 params[4];
|
||||
struct cam_mem_map_out_params out;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct cam_mem_mgr_map_cmd
|
||||
* @buf_handle: buffer handle
|
||||
|
在新工单中引用
屏蔽一个用户