1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __UAPI_CAM_ICP_H__ 20 #define __UAPI_CAM_ICP_H__ 21 #include <media/cam_defs.h> 22 #include <media/cam_cpas.h> 23 #define CAM_ICP_DEV_TYPE_A5 1 24 #define CAM_ICP_DEV_TYPE_IPE 2 25 #define CAM_ICP_DEV_TYPE_BPS 3 26 #define CAM_ICP_DEV_TYPE_IPE_CDM 4 27 #define CAM_ICP_DEV_TYPE_BPS_CDM 5 28 #define CAM_ICP_DEV_TYPE_MAX 5 29 #define CAM_ICP_RES_TYPE_BPS 1 30 #define CAM_ICP_RES_TYPE_IPE_RT 2 31 #define CAM_ICP_RES_TYPE_IPE 3 32 #define CAM_ICP_RES_TYPE_IPE_SEMI_RT 4 33 #define CAM_ICP_RES_TYPE_BPS_RT 5 34 #define CAM_ICP_RES_TYPE_BPS_SEMI_RT 6 35 #define CAM_ICP_RES_TYPE_MAX 7 36 #define CAM_ICP_OPCODE_IPE_UPDATE 0 37 #define CAM_ICP_OPCODE_BPS_UPDATE 1 38 #define CAM_ICP_OPCODE_IPE_SETTINGS 2 39 #define CAM_ICP_OPCODE_BPS_SETTINGS 3 40 #define CAM_ICP_IPE_INPUT_IMAGE_FULL 0x0 41 #define CAM_ICP_IPE_INPUT_IMAGE_DS4 0x1 42 #define CAM_ICP_IPE_INPUT_IMAGE_DS16 0x2 43 #define CAM_ICP_IPE_INPUT_IMAGE_DS64 0x3 44 #define CAM_ICP_IPE_INPUT_IMAGE_FULL_REF 0x4 45 #define CAM_ICP_IPE_INPUT_IMAGE_DS4_REF 0x5 46 #define CAM_ICP_IPE_INPUT_IMAGE_DS16_REF 0x6 47 #define CAM_ICP_IPE_INPUT_IMAGE_DS64_REF 0x7 48 #define CAM_ICP_IPE_OUTPUT_IMAGE_DISPLAY 0x8 49 #define CAM_ICP_IPE_OUTPUT_IMAGE_VIDEO 0x9 50 #define CAM_ICP_IPE_OUTPUT_IMAGE_FULL_REF 0xA 51 #define CAM_ICP_IPE_OUTPUT_IMAGE_DS4_REF 0xB 52 #define CAM_ICP_IPE_OUTPUT_IMAGE_DS16_REF 0xC 53 #define CAM_ICP_IPE_OUTPUT_IMAGE_DS64_REF 0xD 54 #define CAM_ICP_IPE_IMAGE_MAX 0xE 55 #define CAM_ICP_BPS_INPUT_IMAGE 0x0 56 #define CAM_ICP_BPS_OUTPUT_IMAGE_FULL 0x1 57 #define CAM_ICP_BPS_OUTPUT_IMAGE_DS4 0x2 58 #define CAM_ICP_BPS_OUTPUT_IMAGE_DS16 0x3 59 #define CAM_ICP_BPS_OUTPUT_IMAGE_DS64 0x4 60 #define CAM_ICP_BPS_OUTPUT_IMAGE_STATS_BG 0x5 61 #define CAM_ICP_BPS_OUTPUT_IMAGE_STATS_BHIST 0x6 62 #define CAM_ICP_BPS_OUTPUT_IMAGE_REG1 0x7 63 #define CAM_ICP_BPS_OUTPUT_IMAGE_REG2 0x8 64 #define CAM_ICP_BPS_IO_IMAGES_MAX 0x9 65 #define CAM_ICP_CMD_META_GENERIC_BLOB 0x1 66 #define CAM_ICP_CMD_GENERIC_BLOB_CLK 0x1 67 #define CAM_ICP_CMD_GENERIC_BLOB_CFG_IO 0x2 68 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_MAP 0x3 69 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_UNMAP 0x4 70 #define CAM_ICP_CMD_GENERIC_BLOB_CLK_V2 0x5 71 struct cam_icp_clk_bw_request_v2 { 72 uint64_t budget_ns; 73 uint32_t frame_cycles; 74 uint32_t rt_flag; 75 uint32_t reserved; 76 uint32_t num_paths; 77 struct cam_axi_per_path_bw_vote axi_path[1]; 78 }; 79 struct cam_icp_clk_bw_request { 80 uint64_t budget_ns; 81 uint32_t frame_cycles; 82 uint32_t rt_flag; 83 uint64_t uncompressed_bw; 84 uint64_t compressed_bw; 85 }; 86 struct cam_icp_dev_ver { 87 uint32_t dev_type; 88 uint32_t reserved; 89 struct cam_hw_version hw_ver; 90 }; 91 struct cam_icp_ver { 92 uint32_t major; 93 uint32_t minor; 94 uint32_t revision; 95 uint32_t reserved; 96 }; 97 struct cam_icp_query_cap_cmd { 98 struct cam_iommu_handle dev_iommu_handle; 99 struct cam_iommu_handle cdm_iommu_handle; 100 struct cam_icp_ver fw_version; 101 struct cam_icp_ver api_version; 102 uint32_t num_ipe; 103 uint32_t num_bps; 104 struct cam_icp_dev_ver dev_ver[CAM_ICP_DEV_TYPE_MAX]; 105 }; 106 struct cam_icp_res_info { 107 uint32_t format; 108 uint32_t width; 109 uint32_t height; 110 uint32_t fps; 111 }; 112 struct cam_icp_acquire_dev_info { 113 uint32_t scratch_mem_size; 114 uint32_t dev_type; 115 uint32_t io_config_cmd_size; 116 int32_t io_config_cmd_handle; 117 uint32_t secure_mode; 118 int32_t chain_info; 119 struct cam_icp_res_info in_res; 120 uint32_t num_out_res; 121 struct cam_icp_res_info out_res[1]; 122 } __attribute__((__packed__)); 123 #endif 124