Loading include/uapi/media/cam_defs.h +151 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,10 @@ #define CAM_FLUSH_REQ (CAM_COMMON_OPCODE_BASE + 0x8) #define CAM_COMMON_OPCODE_MAX (CAM_COMMON_OPCODE_BASE + 0x9) #define CAM_COMMON_OPCODE_BASE_v2 0x150 #define CAM_ACQUIRE_HW (CAM_COMMON_OPCODE_BASE_v2 + 0x1) #define CAM_RELEASE_HW (CAM_COMMON_OPCODE_BASE_v2 + 0x2) #define CAM_EXT_OPCODE_BASE 0x200 #define CAM_CONFIG_DEV_EXTERNAL (CAM_EXT_OPCODE_BASE + 0x1) Loading @@ -43,6 +47,9 @@ #define CAM_CMD_BUF_GENERIC 0x9 #define CAM_CMD_BUF_LEGACY 0xA /* UBWC API Version */ #define CAM_UBWC_CFG_VERSION_1 1 /** * enum flush_type_t - Identifies the various flush types * Loading Loading @@ -235,6 +242,34 @@ struct cam_plane_cfg { uint32_t v_init; }; /** * struct cam_ubwc_plane_cfg_v1 - UBWC Plane configuration info * * @port_type: Port Type * @meta_stride: UBWC metadata stride * @meta_size: UBWC metadata plane size * @meta_offset: UBWC metadata offset * @packer_config: UBWC packer config * @mode_config_0: UBWC mode config 0 * @mode_config_1: UBWC 3 mode config 1 * @tile_config: UBWC tile config * @h_init: UBWC horizontal initial coordinate in pixels * @v_init: UBWC vertical initial coordinate in lines * */ struct cam_ubwc_plane_cfg_v1 { uint32_t port_type; uint32_t meta_stride; uint32_t meta_size; uint32_t meta_offset; uint32_t packer_config; uint32_t mode_config_0; uint32_t mode_config_1; uint32_t tile_config; uint32_t h_init; uint32_t v_init; }; /** * struct cam_cmd_buf_desc - Command buffer descriptor * Loading Loading @@ -452,6 +487,73 @@ struct cam_acquire_dev_cmd { uint64_t resource_hdl; }; /* * In old version, while acquiring device the num_resources in * struct cam_acquire_dev_cmd will be a valid value. During ACQUIRE_DEV * KMD driver will return dev_handle as well as associate HW to handle. * If num_resources is set to the constant below, we are using * the new version and we do not acquire HW in ACQUIRE_DEV IOCTL. * ACQUIRE_DEV will only return handle and we should receive * ACQUIRE_HW IOCTL after ACQUIRE_DEV and that is when the HW * is associated with the dev_handle. * * (Data type): uint32_t */ #define CAM_API_COMPAT_CONSTANT 0xFEFEFEFE #define CAM_ACQUIRE_HW_STRUCT_VERSION_1 1 /** * struct cam_acquire_hw_cmd_v1 - Control payload for acquire HW IOCTL (Ver 1) * * @struct_version: = CAM_ACQUIRE_HW_STRUCT_VERSION_1 for this struct * This value should be the first 32-bits in any structure * related to this IOCTL. So that if the struct needs to * change, we can first read the starting 32-bits, get the * version number and then typecast the data to struct * accordingly. * @reserved: Reserved field for 64-bit alignment * @session_handle: Session handle for the acquire command * @dev_handle: Device handle to be returned * @handle_type: Tells you how to interpret the variable resource_hdl- * 1 = user pointer, 2 = mem handle * @data_size: Total size of data contained in memory pointed * to by resource_hdl * @resource_hdl: Resource handle that refers to the actual * resource data. */ struct cam_acquire_hw_cmd_v1 { uint32_t struct_version; uint32_t reserved; int32_t session_handle; int32_t dev_handle; uint32_t handle_type; uint32_t data_size; uint64_t resource_hdl; }; #define CAM_RELEASE_HW_STRUCT_VERSION_1 1 /** * struct cam_release_hw_cmd_v1 - Control payload for release HW IOCTL (Ver 1) * * @struct_version: = CAM_RELEASE_HW_STRUCT_VERSION_1 for this struct * This value should be the first 32-bits in any structure * related to this IOCTL. So that if the struct needs to * change, we can first read the starting 32-bits, get the * version number and then typecast the data to struct * accordingly. * @reserved: Reserved field for 64-bit alignment * @session_handle: Session handle for the release * @dev_handle: Device handle for the release */ struct cam_release_hw_cmd_v1 { uint32_t struct_version; uint32_t reserved; int32_t session_handle; int32_t dev_handle; }; /** * struct cam_flush_dev_cmd - Control payload for flush devices * Loading @@ -474,4 +576,53 @@ struct cam_flush_dev_cmd { int64_t req_id; }; /** * struct cam_ubwc_config - UBWC Configuration Payload * * @api_version: UBWC config api version * @num_ports: Number of ports to be configured * @ubwc_plane_config: Array of UBWC configurations per port * Size [CAM_PACKET_MAX_PLANES - 1] per port * as UBWC is supported on Y & C planes * and therefore a max size of 2 planes * */ struct cam_ubwc_config { uint32_t api_version; uint32_t num_ports; struct cam_ubwc_plane_cfg_v1 ubwc_plane_cfg[1][CAM_PACKET_MAX_PLANES - 1]; }; /** * struct cam_cmd_mem_region_info - * Cmd buffer region info * * @mem_handle : Memory handle of the region * @offset : Offset if any * @size : Size of the region * @flags : Flags if any */ struct cam_cmd_mem_region_info { int32_t mem_handle; uint32_t offset; uint32_t size; uint32_t flags; }; /** * struct cam_cmd_mem_regions - * List of multiple memory descriptors of * of different regions * * @version : Version number * @num_regions : Number of regions * @map_info_array : Array of all the regions */ struct cam_cmd_mem_regions { uint32_t version; uint32_t num_regions; struct cam_cmd_mem_region_info map_info_array[1]; }; #endif /* __UAPI_CAM_DEFS_H__ */ include/uapi/media/cam_icp.h +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ /* packet opcode types */ #define CAM_ICP_OPCODE_IPE_UPDATE 0 #define CAM_ICP_OPCODE_BPS_UPDATE 1 #define CAM_ICP_OPCODE_IPE_SETTINGS 2 #define CAM_ICP_OPCODE_BPS_SETTINGS 3 /* IPE input port resource type */ #define CAM_ICP_IPE_INPUT_IMAGE_FULL 0x0 Loading Loading @@ -62,6 +64,8 @@ /* Generic blob types */ #define CAM_ICP_CMD_GENERIC_BLOB_CLK 0x1 #define CAM_ICP_CMD_GENERIC_BLOB_CFG_IO 0x2 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_MAP 0x3 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_UNMAP 0x4 /** * struct cam_icp_clk_bw_request Loading include/uapi/media/cam_isp.h +48 −3 Original line number Diff line number Diff line Loading @@ -87,6 +87,8 @@ #define CAM_ISP_GENERIC_BLOB_TYPE_HFR_CONFIG 0 #define CAM_ISP_GENERIC_BLOB_TYPE_CLOCK_CONFIG 1 #define CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG 2 #define CAM_ISP_GENERIC_BLOB_TYPE_UBWC_CONFIG 3 #define CAM_ISP_GENERIC_BLOB_TYPE_CSID_CLOCK_CONFIG 4 /* Query devices */ /** Loading Loading @@ -341,6 +343,15 @@ struct cam_isp_clock_config { uint64_t rdi_hz[1]; } __attribute__((packed)); /** * struct cam_isp_csid_clock_config - CSID clock configuration * * @csid_clock CSID clock */ struct cam_isp_csid_clock_config { uint64_t csid_clock; } __attribute__((packed)); /** * struct cam_isp_bw_vote - Bandwidth vote information * Loading Loading @@ -375,4 +386,38 @@ struct cam_isp_bw_config { struct cam_isp_bw_vote rdi_vote[1]; } __attribute__((packed)); /* Acquire Device/HW v2 */ /** * struct cam_isp_acquire_hw_info - ISP acquire HW params * * @common_info_version : Version of common info struct used * @common_info_size : Size of common info struct used * @common_info_offset : Offset of common info from start of data * @num_inputs : Number of inputs * @input_info_version : Version of input info struct used * @input_info_size : Size of input info struct used * @input_info_offset : Offset of input info from start of data * @data : Start of data region */ struct cam_isp_acquire_hw_info { uint16_t common_info_version; uint16_t common_info_size; uint32_t common_info_offset; uint32_t num_inputs; uint32_t input_info_version; uint32_t input_info_size; uint32_t input_info_offset; uint64_t data; }; #define CAM_ISP_ACQUIRE_COMMON_VER0 0x1000 #define CAM_ISP_ACQUIRE_COMMON_SIZE_VER0 0x0 #define CAM_ISP_ACQUIRE_INPUT_VER0 0x2000 #define CAM_ISP_ACQUIRE_OUT_VER0 0x3000 #endif /* __UAPI_CAM_ISP_H__ */ include/uapi/media/cam_isp_ife.h +6 −3 Original line number Diff line number Diff line Loading @@ -23,8 +23,11 @@ #define CAM_ISP_IFE_OUT_RES_STATS_RS (CAM_ISP_IFE_OUT_RES_BASE + 16) #define CAM_ISP_IFE_OUT_RES_STATS_CS (CAM_ISP_IFE_OUT_RES_BASE + 17) #define CAM_ISP_IFE_OUT_RES_STATS_IHIST (CAM_ISP_IFE_OUT_RES_BASE + 18) #define CAM_ISP_IFE_OUT_RES_MAX (CAM_ISP_IFE_OUT_RES_BASE + 19) #define CAM_ISP_IFE_OUT_RES_FULL_DISP (CAM_ISP_IFE_OUT_RES_BASE + 19) #define CAM_ISP_IFE_OUT_RES_DS4_DISP (CAM_ISP_IFE_OUT_RES_BASE + 20) #define CAM_ISP_IFE_OUT_RES_DS16_DISP (CAM_ISP_IFE_OUT_RES_BASE + 21) #define CAM_ISP_IFE_OUT_RES_2PD (CAM_ISP_IFE_OUT_RES_BASE + 22) #define CAM_ISP_IFE_OUT_RES_MAX (CAM_ISP_IFE_OUT_RES_BASE + 23) /*IFE input port resource type (global unique) */ #define CAM_ISP_IFE_IN_RES_BASE 0x4000 Loading Loading
include/uapi/media/cam_defs.h +151 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,10 @@ #define CAM_FLUSH_REQ (CAM_COMMON_OPCODE_BASE + 0x8) #define CAM_COMMON_OPCODE_MAX (CAM_COMMON_OPCODE_BASE + 0x9) #define CAM_COMMON_OPCODE_BASE_v2 0x150 #define CAM_ACQUIRE_HW (CAM_COMMON_OPCODE_BASE_v2 + 0x1) #define CAM_RELEASE_HW (CAM_COMMON_OPCODE_BASE_v2 + 0x2) #define CAM_EXT_OPCODE_BASE 0x200 #define CAM_CONFIG_DEV_EXTERNAL (CAM_EXT_OPCODE_BASE + 0x1) Loading @@ -43,6 +47,9 @@ #define CAM_CMD_BUF_GENERIC 0x9 #define CAM_CMD_BUF_LEGACY 0xA /* UBWC API Version */ #define CAM_UBWC_CFG_VERSION_1 1 /** * enum flush_type_t - Identifies the various flush types * Loading Loading @@ -235,6 +242,34 @@ struct cam_plane_cfg { uint32_t v_init; }; /** * struct cam_ubwc_plane_cfg_v1 - UBWC Plane configuration info * * @port_type: Port Type * @meta_stride: UBWC metadata stride * @meta_size: UBWC metadata plane size * @meta_offset: UBWC metadata offset * @packer_config: UBWC packer config * @mode_config_0: UBWC mode config 0 * @mode_config_1: UBWC 3 mode config 1 * @tile_config: UBWC tile config * @h_init: UBWC horizontal initial coordinate in pixels * @v_init: UBWC vertical initial coordinate in lines * */ struct cam_ubwc_plane_cfg_v1 { uint32_t port_type; uint32_t meta_stride; uint32_t meta_size; uint32_t meta_offset; uint32_t packer_config; uint32_t mode_config_0; uint32_t mode_config_1; uint32_t tile_config; uint32_t h_init; uint32_t v_init; }; /** * struct cam_cmd_buf_desc - Command buffer descriptor * Loading Loading @@ -452,6 +487,73 @@ struct cam_acquire_dev_cmd { uint64_t resource_hdl; }; /* * In old version, while acquiring device the num_resources in * struct cam_acquire_dev_cmd will be a valid value. During ACQUIRE_DEV * KMD driver will return dev_handle as well as associate HW to handle. * If num_resources is set to the constant below, we are using * the new version and we do not acquire HW in ACQUIRE_DEV IOCTL. * ACQUIRE_DEV will only return handle and we should receive * ACQUIRE_HW IOCTL after ACQUIRE_DEV and that is when the HW * is associated with the dev_handle. * * (Data type): uint32_t */ #define CAM_API_COMPAT_CONSTANT 0xFEFEFEFE #define CAM_ACQUIRE_HW_STRUCT_VERSION_1 1 /** * struct cam_acquire_hw_cmd_v1 - Control payload for acquire HW IOCTL (Ver 1) * * @struct_version: = CAM_ACQUIRE_HW_STRUCT_VERSION_1 for this struct * This value should be the first 32-bits in any structure * related to this IOCTL. So that if the struct needs to * change, we can first read the starting 32-bits, get the * version number and then typecast the data to struct * accordingly. * @reserved: Reserved field for 64-bit alignment * @session_handle: Session handle for the acquire command * @dev_handle: Device handle to be returned * @handle_type: Tells you how to interpret the variable resource_hdl- * 1 = user pointer, 2 = mem handle * @data_size: Total size of data contained in memory pointed * to by resource_hdl * @resource_hdl: Resource handle that refers to the actual * resource data. */ struct cam_acquire_hw_cmd_v1 { uint32_t struct_version; uint32_t reserved; int32_t session_handle; int32_t dev_handle; uint32_t handle_type; uint32_t data_size; uint64_t resource_hdl; }; #define CAM_RELEASE_HW_STRUCT_VERSION_1 1 /** * struct cam_release_hw_cmd_v1 - Control payload for release HW IOCTL (Ver 1) * * @struct_version: = CAM_RELEASE_HW_STRUCT_VERSION_1 for this struct * This value should be the first 32-bits in any structure * related to this IOCTL. So that if the struct needs to * change, we can first read the starting 32-bits, get the * version number and then typecast the data to struct * accordingly. * @reserved: Reserved field for 64-bit alignment * @session_handle: Session handle for the release * @dev_handle: Device handle for the release */ struct cam_release_hw_cmd_v1 { uint32_t struct_version; uint32_t reserved; int32_t session_handle; int32_t dev_handle; }; /** * struct cam_flush_dev_cmd - Control payload for flush devices * Loading @@ -474,4 +576,53 @@ struct cam_flush_dev_cmd { int64_t req_id; }; /** * struct cam_ubwc_config - UBWC Configuration Payload * * @api_version: UBWC config api version * @num_ports: Number of ports to be configured * @ubwc_plane_config: Array of UBWC configurations per port * Size [CAM_PACKET_MAX_PLANES - 1] per port * as UBWC is supported on Y & C planes * and therefore a max size of 2 planes * */ struct cam_ubwc_config { uint32_t api_version; uint32_t num_ports; struct cam_ubwc_plane_cfg_v1 ubwc_plane_cfg[1][CAM_PACKET_MAX_PLANES - 1]; }; /** * struct cam_cmd_mem_region_info - * Cmd buffer region info * * @mem_handle : Memory handle of the region * @offset : Offset if any * @size : Size of the region * @flags : Flags if any */ struct cam_cmd_mem_region_info { int32_t mem_handle; uint32_t offset; uint32_t size; uint32_t flags; }; /** * struct cam_cmd_mem_regions - * List of multiple memory descriptors of * of different regions * * @version : Version number * @num_regions : Number of regions * @map_info_array : Array of all the regions */ struct cam_cmd_mem_regions { uint32_t version; uint32_t num_regions; struct cam_cmd_mem_region_info map_info_array[1]; }; #endif /* __UAPI_CAM_DEFS_H__ */
include/uapi/media/cam_icp.h +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ /* packet opcode types */ #define CAM_ICP_OPCODE_IPE_UPDATE 0 #define CAM_ICP_OPCODE_BPS_UPDATE 1 #define CAM_ICP_OPCODE_IPE_SETTINGS 2 #define CAM_ICP_OPCODE_BPS_SETTINGS 3 /* IPE input port resource type */ #define CAM_ICP_IPE_INPUT_IMAGE_FULL 0x0 Loading Loading @@ -62,6 +64,8 @@ /* Generic blob types */ #define CAM_ICP_CMD_GENERIC_BLOB_CLK 0x1 #define CAM_ICP_CMD_GENERIC_BLOB_CFG_IO 0x2 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_MAP 0x3 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_UNMAP 0x4 /** * struct cam_icp_clk_bw_request Loading
include/uapi/media/cam_isp.h +48 −3 Original line number Diff line number Diff line Loading @@ -87,6 +87,8 @@ #define CAM_ISP_GENERIC_BLOB_TYPE_HFR_CONFIG 0 #define CAM_ISP_GENERIC_BLOB_TYPE_CLOCK_CONFIG 1 #define CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG 2 #define CAM_ISP_GENERIC_BLOB_TYPE_UBWC_CONFIG 3 #define CAM_ISP_GENERIC_BLOB_TYPE_CSID_CLOCK_CONFIG 4 /* Query devices */ /** Loading Loading @@ -341,6 +343,15 @@ struct cam_isp_clock_config { uint64_t rdi_hz[1]; } __attribute__((packed)); /** * struct cam_isp_csid_clock_config - CSID clock configuration * * @csid_clock CSID clock */ struct cam_isp_csid_clock_config { uint64_t csid_clock; } __attribute__((packed)); /** * struct cam_isp_bw_vote - Bandwidth vote information * Loading Loading @@ -375,4 +386,38 @@ struct cam_isp_bw_config { struct cam_isp_bw_vote rdi_vote[1]; } __attribute__((packed)); /* Acquire Device/HW v2 */ /** * struct cam_isp_acquire_hw_info - ISP acquire HW params * * @common_info_version : Version of common info struct used * @common_info_size : Size of common info struct used * @common_info_offset : Offset of common info from start of data * @num_inputs : Number of inputs * @input_info_version : Version of input info struct used * @input_info_size : Size of input info struct used * @input_info_offset : Offset of input info from start of data * @data : Start of data region */ struct cam_isp_acquire_hw_info { uint16_t common_info_version; uint16_t common_info_size; uint32_t common_info_offset; uint32_t num_inputs; uint32_t input_info_version; uint32_t input_info_size; uint32_t input_info_offset; uint64_t data; }; #define CAM_ISP_ACQUIRE_COMMON_VER0 0x1000 #define CAM_ISP_ACQUIRE_COMMON_SIZE_VER0 0x0 #define CAM_ISP_ACQUIRE_INPUT_VER0 0x2000 #define CAM_ISP_ACQUIRE_OUT_VER0 0x3000 #endif /* __UAPI_CAM_ISP_H__ */
include/uapi/media/cam_isp_ife.h +6 −3 Original line number Diff line number Diff line Loading @@ -23,8 +23,11 @@ #define CAM_ISP_IFE_OUT_RES_STATS_RS (CAM_ISP_IFE_OUT_RES_BASE + 16) #define CAM_ISP_IFE_OUT_RES_STATS_CS (CAM_ISP_IFE_OUT_RES_BASE + 17) #define CAM_ISP_IFE_OUT_RES_STATS_IHIST (CAM_ISP_IFE_OUT_RES_BASE + 18) #define CAM_ISP_IFE_OUT_RES_MAX (CAM_ISP_IFE_OUT_RES_BASE + 19) #define CAM_ISP_IFE_OUT_RES_FULL_DISP (CAM_ISP_IFE_OUT_RES_BASE + 19) #define CAM_ISP_IFE_OUT_RES_DS4_DISP (CAM_ISP_IFE_OUT_RES_BASE + 20) #define CAM_ISP_IFE_OUT_RES_DS16_DISP (CAM_ISP_IFE_OUT_RES_BASE + 21) #define CAM_ISP_IFE_OUT_RES_2PD (CAM_ISP_IFE_OUT_RES_BASE + 22) #define CAM_ISP_IFE_OUT_RES_MAX (CAM_ISP_IFE_OUT_RES_BASE + 23) /*IFE input port resource type (global unique) */ #define CAM_ISP_IFE_IN_RES_BASE 0x4000 Loading