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