msm: camera: cre: Add CRE driver changes
Add new camera driver Camera Reformat Engine (CRE). CRs-Fixed: 2893978 Change-Id: Ia39b222493393bf7bb72525c86f0060ca0dc77c2 Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
4aa9286fd7
commit
23762a67ed
@@ -13,7 +13,7 @@
|
||||
|
||||
/* CRE HW TYPE */
|
||||
#define CAM_CRE_HW_TYPE_CRE 0x1
|
||||
#define CAM_CRE_HW_TYPE_MAX 0x2
|
||||
#define CAM_CRE_HW_TYPE_MAX 0x1
|
||||
|
||||
/* packet opcode types */
|
||||
#define CAM_CRE_OPCODE_CONFIG 0x1
|
||||
@@ -26,50 +26,17 @@
|
||||
#define CAM_CRE_OUTPUT_IMAGE 0x1
|
||||
#define CAM_CRE_OUTPUT_IMAGES_MAX (CAM_CRE_OUTPUT_IMAGE + 1)
|
||||
|
||||
#define CAM_CRE_MAX_PLANES 0x2
|
||||
#define CRE_MAX_BATCH_SIZE 0x10
|
||||
|
||||
/* definitions needed for cre aquire device */
|
||||
#define CAM_CRE_DEV_TYPE_NRT 0x1
|
||||
#define CAM_CRE_DEV_TYPE_RT 0x2
|
||||
#define CAM_CRE_DEV_TYPE_MAX 0x3
|
||||
|
||||
#define CAM_CRE_CMD_META_GENERIC_BLOB 0x1
|
||||
/* Clock blob */
|
||||
#define CAM_CRE_CMD_GENERIC_BLOB_CLK 0x1
|
||||
|
||||
#define CAM_CRE_MAX_PLANES 0x2
|
||||
#define CRE_MAX_BATCH_SIZE 0x10
|
||||
#define CAM_CRE_MAX_IO_BUFS 0x3
|
||||
|
||||
#define CAM_CRE_ACQUIRE_FLAG_SECURE 0x1
|
||||
|
||||
/**
|
||||
* struct cam_cre_io_buf_info - CRE IO buffers meta
|
||||
*
|
||||
* @direction: Direction of a buffer of a port(Input/Output)
|
||||
* @res_id: Resource ID
|
||||
* @num_planes: Number of planes
|
||||
* @width: Height of a plane buffer
|
||||
* @height: Height of a plane buffer
|
||||
* @stride: Plane stride
|
||||
* @packer_format: Format
|
||||
* @alignment: Alignment
|
||||
* @reserved: Reserved field 0
|
||||
* @reserved_1: Reserved field 1
|
||||
* @reserved_2: Reserved field 2
|
||||
*
|
||||
*/
|
||||
struct cam_cre_io_buf_info {
|
||||
__u32 direction;
|
||||
__u32 res_id;
|
||||
__u32 num_planes;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
__u32 stride;
|
||||
__u32 fence;
|
||||
__u32 packer_format;
|
||||
__u32 alignment;
|
||||
__u32 reserved;
|
||||
__u32 reserved_1;
|
||||
__u32 reserved_2;
|
||||
};
|
||||
#define CAM_CRE_CMD_GENERIC_BLOB_CLK_V2 0x1
|
||||
|
||||
/**
|
||||
* struct cam_cre_hw_ver - Device information for particular hw type
|
||||
@@ -77,13 +44,9 @@ struct cam_cre_io_buf_info {
|
||||
* This is used to get device version info of CRE
|
||||
* from hardware and use this info in CAM_QUERY_CAP IOCTL
|
||||
*
|
||||
* @hw_type: Hardware type
|
||||
* @reserved: Reserved field
|
||||
* @hw_ver: Major, minor and incr values of a device version
|
||||
*/
|
||||
struct cam_cre_hw_ver {
|
||||
__u32 hw_type;
|
||||
__u32 reserved;
|
||||
struct cam_hw_version hw_ver;
|
||||
};
|
||||
|
||||
@@ -103,29 +66,29 @@ struct cam_cre_query_cap_cmd {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_cre_clk_bw_request
|
||||
* struct cam_cre_io_buf_info - CRE IO buffers meta
|
||||
*
|
||||
* @budget_ns: Time required to process frame
|
||||
* @frame_cycles: Frame cycles needed to process the frame
|
||||
* @rt_flag: Flag to indicate real time stream
|
||||
* @uncompressed_bw: Bandwidth required to process frame
|
||||
* @compressed_bw: Compressed bandwidth to process frame
|
||||
* @direction: Direction of a buffer of a port(Input/Output)
|
||||
* @res_id: Resource ID
|
||||
* @num_planes: Number of planes
|
||||
* @width: Height of a plane buffer
|
||||
* @height: Height of a plane buffer
|
||||
* @stride: Plane stride
|
||||
* @format: unpacker format for FE, packer format for WE
|
||||
* @alignment: Alignment
|
||||
* @reserved: Reserved field 0
|
||||
* @reserved_1: Reserved field 1
|
||||
* @reserved_2: Reserved field 2
|
||||
* @num_path: Number of AXI Paths
|
||||
*/
|
||||
struct cam_cre_clk_bw_request {
|
||||
__u64 budget_ns;
|
||||
__u32 frame_cycles;
|
||||
__u32 rt_flag;
|
||||
__u64 uncompressed_bw;
|
||||
__u64 compressed_bw;
|
||||
__u32 num_paths;
|
||||
__u32 reserved;
|
||||
__u32 reserved_1;
|
||||
__u32 reserved_2;
|
||||
struct cam_axi_per_path_bw_vote axi_path[1];
|
||||
struct cam_cre_io_buf_info {
|
||||
__u32 direction;
|
||||
__u32 res_id;
|
||||
__u32 num_planes;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
__u32 stride;
|
||||
__u32 fence;
|
||||
__u32 format;
|
||||
__u32 alignment;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -133,28 +96,41 @@ struct cam_cre_clk_bw_request {
|
||||
*
|
||||
* @dev_type: NRT/RT Acquire
|
||||
* @dev_name: Device name (CRE)
|
||||
* @acquire_flag: Tells if CRE will process the secure buff or not.
|
||||
* @secure_mode: Tells if CRE will process the secure buff or not.
|
||||
* @batch_size: Batch size
|
||||
* @num_in_res: Number of In resources
|
||||
* @num_out_res: Number of Out resources
|
||||
* @reserved: Reserved field 0
|
||||
* @reserved_1: Reserved field 1
|
||||
* @reserved_2: Reserved field 2
|
||||
* @in_res: In resource info
|
||||
* @in_res: Out resource info
|
||||
*/
|
||||
struct cam_cre_acquire_dev_info {
|
||||
__u32 dev_type;
|
||||
char dev_name[CAM_CRE_DEV_NAME_SIZE];
|
||||
__u32 acquire_flag;
|
||||
__u32 dev_type;
|
||||
__u32 secure_mode;
|
||||
__u32 batch_size;
|
||||
__u32 num_in_res;
|
||||
__u32 num_out_res;
|
||||
__u32 reserved;
|
||||
__u32 reserved_1;
|
||||
__u32 reserved_2;
|
||||
struct cam_cre_io_buf_info in_res[CAM_CRE_INPUT_IMAGES_MAX];
|
||||
struct cam_cre_io_buf_info out_res[CAM_CRE_OUTPUT_IMAGES_MAX];
|
||||
}__attribute__((__packed__));
|
||||
|
||||
/**
|
||||
* struct cre_clk_bw_request_v2
|
||||
*
|
||||
* @budget_ns: Time required to process frame
|
||||
* @frame_cycles: Frame cycles needed to process the frame
|
||||
* @rt_flag: Flag to indicate real time stream
|
||||
* @reserved: Reserved field 0
|
||||
* @num_path: Number of AXI Paths
|
||||
*/
|
||||
struct cre_clk_bw_request_v2 {
|
||||
__u64 budget_ns;
|
||||
__u32 frame_cycles;
|
||||
__u32 rt_flag;
|
||||
__u32 reserved;
|
||||
__u32 num_paths;
|
||||
struct cam_axi_per_path_bw_vote axi_path[1];
|
||||
};
|
||||
#endif /* __UAPI_CAM_CRE_H__ */
|
||||
|
Reference in New Issue
Block a user