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 "cam_defs.h" 22 #define CAM_ICP_DEV_TYPE_A5 1 23 #define CAM_ICP_DEV_TYPE_IPE 2 24 #define CAM_ICP_DEV_TYPE_BPS 3 25 #define CAM_ICP_DEV_TYPE_IPE_CDM 4 26 #define CAM_ICP_DEV_TYPE_BPS_CDM 5 27 #define CAM_ICP_DEV_TYPE_MAX 5 28 #define CAM_ICP_RES_TYPE_BPS 1 29 #define CAM_ICP_RES_TYPE_IPE_RT 2 30 #define CAM_ICP_RES_TYPE_IPE 3 31 #define CAM_ICP_RES_TYPE_MAX 4 32 #define CAM_ICP_OPCODE_IPE_UPDATE 0 33 #define CAM_ICP_OPCODE_BPS_UPDATE 1 34 #define CAM_ICP_OPCODE_IPE_SETTINGS 2 35 #define CAM_ICP_OPCODE_BPS_SETTINGS 3 36 #define CAM_ICP_IPE_INPUT_IMAGE_FULL 0x0 37 #define CAM_ICP_IPE_INPUT_IMAGE_DS4 0x1 38 #define CAM_ICP_IPE_INPUT_IMAGE_DS16 0x2 39 #define CAM_ICP_IPE_INPUT_IMAGE_DS64 0x3 40 #define CAM_ICP_IPE_INPUT_IMAGE_FULL_REF 0x4 41 #define CAM_ICP_IPE_INPUT_IMAGE_DS4_REF 0x5 42 #define CAM_ICP_IPE_INPUT_IMAGE_DS16_REF 0x6 43 #define CAM_ICP_IPE_INPUT_IMAGE_DS64_REF 0x7 44 #define CAM_ICP_IPE_OUTPUT_IMAGE_DISPLAY 0x8 45 #define CAM_ICP_IPE_OUTPUT_IMAGE_VIDEO 0x9 46 #define CAM_ICP_IPE_OUTPUT_IMAGE_FULL_REF 0xA 47 #define CAM_ICP_IPE_OUTPUT_IMAGE_DS4_REF 0xB 48 #define CAM_ICP_IPE_OUTPUT_IMAGE_DS16_REF 0xC 49 #define CAM_ICP_IPE_OUTPUT_IMAGE_DS64_REF 0xD 50 #define CAM_ICP_IPE_IMAGE_MAX 0xE 51 #define CAM_ICP_BPS_INPUT_IMAGE 0x0 52 #define CAM_ICP_BPS_OUTPUT_IMAGE_FULL 0x1 53 #define CAM_ICP_BPS_OUTPUT_IMAGE_DS4 0x2 54 #define CAM_ICP_BPS_OUTPUT_IMAGE_DS16 0x3 55 #define CAM_ICP_BPS_OUTPUT_IMAGE_DS64 0x4 56 #define CAM_ICP_BPS_OUTPUT_IMAGE_STATS_BG 0x5 57 #define CAM_ICP_BPS_OUTPUT_IMAGE_STATS_BHIST 0x6 58 #define CAM_ICP_BPS_OUTPUT_IMAGE_REG1 0x7 59 #define CAM_ICP_BPS_OUTPUT_IMAGE_REG2 0x8 60 #define CAM_ICP_BPS_IO_IMAGES_MAX 0x9 61 #define CAM_ICP_CMD_META_GENERIC_BLOB 0x1 62 #define CAM_ICP_CMD_GENERIC_BLOB_CLK 0x1 63 #define CAM_ICP_CMD_GENERIC_BLOB_CFG_IO 0x2 64 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_MAP 0x3 65 #define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_UNMAP 0x4 66 struct cam_icp_clk_bw_request { 67 uint64_t budget_ns; 68 uint32_t frame_cycles; 69 uint32_t rt_flag; 70 uint64_t uncompressed_bw; 71 uint64_t compressed_bw; 72 }; 73 struct cam_icp_dev_ver { 74 uint32_t dev_type; 75 uint32_t reserved; 76 struct cam_hw_version hw_ver; 77 }; 78 struct cam_icp_ver { 79 uint32_t major; 80 uint32_t minor; 81 uint32_t revision; 82 uint32_t reserved; 83 }; 84 struct cam_icp_query_cap_cmd { 85 struct cam_iommu_handle dev_iommu_handle; 86 struct cam_iommu_handle cdm_iommu_handle; 87 struct cam_icp_ver fw_version; 88 struct cam_icp_ver api_version; 89 uint32_t num_ipe; 90 uint32_t num_bps; 91 struct cam_icp_dev_ver dev_ver[CAM_ICP_DEV_TYPE_MAX]; 92 }; 93 struct cam_icp_res_info { 94 uint32_t format; 95 uint32_t width; 96 uint32_t height; 97 uint32_t fps; 98 }; 99 struct cam_icp_acquire_dev_info { 100 uint32_t scratch_mem_size; 101 uint32_t dev_type; 102 uint32_t io_config_cmd_size; 103 int32_t io_config_cmd_handle; 104 uint32_t secure_mode; 105 int32_t chain_info; 106 struct cam_icp_res_info in_res; 107 uint32_t num_out_res; 108 struct cam_icp_res_info out_res[1]; 109 } __attribute__((__packed__)); 110 #endif 111