1 #ifndef __UAPI_CAM_JPEG_H__
2 #define __UAPI_CAM_JPEG_H__
3 
4 #include "cam_defs.h"
5 
6 #define CAM_JPEG_DEV_TYPE_ENC      0
7 #define CAM_JPEG_DEV_TYPE_DMA      1
8 #define CAM_JPEG_DEV_TYPE_MAX      2
9 
10 #define CAM_JPEG_NUM_DEV_PER_RES_MAX      1
11 
12 #define CAM_JPEG_RES_TYPE_ENC        0
13 #define CAM_JPEG_RES_TYPE_DMA        1
14 #define CAM_JPEG_RES_TYPE_MAX        2
15 
16 #define CAM_JPEG_OPCODE_ENC_UPDATE 0
17 #define CAM_JPEG_OPCODE_DMA_UPDATE 1
18 
19 #define CAM_JPEG_ENC_INPUT_IMAGE                 0x0
20 
21 #define CAM_JPEG_ENC_OUTPUT_IMAGE                0x1
22 
23 #define CAM_JPEG_ENC_IO_IMAGES_MAX               0x2
24 
25 #define CAM_JPEG_DMA_INPUT_IMAGE                 0x0
26 
27 #define CAM_JPEG_DMA_OUTPUT_IMAGE                0x1
28 
29 #define CAM_JPEG_DMA_IO_IMAGES_MAX               0x2
30 
31 #define CAM_JPEG_IMAGE_MAX                       0x2
32 
33 struct cam_jpeg_dev_ver {
34 	uint32_t size;
35 	uint32_t dev_type;
36 	struct cam_hw_version hw_ver;
37 };
38 
39 struct cam_jpeg_query_cap_cmd {
40 	struct cam_iommu_handle dev_iommu_handle;
41 	struct cam_iommu_handle cdm_iommu_handle;
42 	uint32_t num_enc;
43 	uint32_t num_dma;
44 	struct cam_jpeg_dev_ver dev_ver[CAM_JPEG_DEV_TYPE_MAX];
45 };
46 
47 struct cam_jpeg_res_info {
48 	uint32_t format;
49 	uint32_t width;
50 	uint32_t height;
51 	uint32_t fps;
52 };
53 
54 struct cam_jpeg_acquire_dev_info {
55 	uint32_t dev_type;
56 	uint32_t reserved;
57 	struct cam_jpeg_res_info in_res;
58 	struct cam_jpeg_res_info out_res;
59 };
60 
61 struct cam_jpeg_config_inout_param_info {
62 	int32_t clk_index;
63 	int32_t output_size;
64 };
65 
66 #endif /* __UAPI_CAM_JPEG_H__ */
67