• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_LINUX_MSM_JPEG_H
20 #define __UAPI_LINUX_MSM_JPEG_H
21 #include <linux/types.h>
22 #include <linux/ioctl.h>
23 #define OUTPUT_H2V1 0
24 #define OUTPUT_H2V2 1
25 #define OUTPUT_BYTE 6
26 #define MSM_JPEG_IOCTL_MAGIC 'g'
27 #define MSM_JPEG_IOCTL_GET_HW_VERSION _IOW(MSM_JPEG_IOCTL_MAGIC, 1, struct msm_jpeg_hw_cmd)
28 #define MSM_JPEG_IOCTL_RESET _IOW(MSM_JPEG_IOCTL_MAGIC, 2, struct msm_jpeg_ctrl_cmd)
29 #define MSM_JPEG_IOCTL_STOP _IOW(MSM_JPEG_IOCTL_MAGIC, 3, struct msm_jpeg_hw_cmds)
30 #define MSM_JPEG_IOCTL_START _IOW(MSM_JPEG_IOCTL_MAGIC, 4, struct msm_jpeg_hw_cmds)
31 #define MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE _IOW(MSM_JPEG_IOCTL_MAGIC, 5, struct msm_jpeg_buf)
32 #define MSM_JPEG_IOCTL_INPUT_GET _IOW(MSM_JPEG_IOCTL_MAGIC, 6, struct msm_jpeg_buf)
33 #define MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK _IOW(MSM_JPEG_IOCTL_MAGIC, 7, int)
34 #define MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE _IOW(MSM_JPEG_IOCTL_MAGIC, 8, struct msm_jpeg_buf)
35 #define MSM_JPEG_IOCTL_OUTPUT_GET _IOW(MSM_JPEG_IOCTL_MAGIC, 9, struct msm_jpeg_buf)
36 #define MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK _IOW(MSM_JPEG_IOCTL_MAGIC, 10, int)
37 #define MSM_JPEG_IOCTL_EVT_GET _IOW(MSM_JPEG_IOCTL_MAGIC, 11, struct msm_jpeg_ctrl_cmd)
38 #define MSM_JPEG_IOCTL_EVT_GET_UNBLOCK _IOW(MSM_JPEG_IOCTL_MAGIC, 12, int)
39 #define MSM_JPEG_IOCTL_HW_CMD _IOW(MSM_JPEG_IOCTL_MAGIC, 13, struct msm_jpeg_hw_cmd)
40 #define MSM_JPEG_IOCTL_HW_CMDS _IOW(MSM_JPEG_IOCTL_MAGIC, 14, struct msm_jpeg_hw_cmds)
41 #define MSM_JPEG_IOCTL_TEST_DUMP_REGION _IOW(MSM_JPEG_IOCTL_MAGIC, 15, unsigned long)
42 #define MSM_JPEG_IOCTL_SET_CLK_RATE _IOW(MSM_JPEG_IOCTL_MAGIC, 16, unsigned int)
43 #define MSM_JPEG_MODE_REALTIME_ENCODE 0
44 #define MSM_JPEG_MODE_OFFLINE_ENCODE 1
45 #define MSM_JPEG_MODE_REALTIME_ROTATION 2
46 #define MSM_JPEG_MODE_OFFLINE_ROTATION 3
47 struct msm_jpeg_ctrl_cmd {
48   uint32_t type;
49   uint32_t len;
50   void * value;
51 };
52 #define MSM_JPEG_EVT_RESET 0
53 #define MSM_JPEG_EVT_SESSION_DONE 1
54 #define MSM_JPEG_EVT_ERR 2
55 struct msm_jpeg_buf {
56   uint32_t type;
57   int fd;
58   void * vaddr;
59   uint32_t y_off;
60   uint32_t y_len;
61   uint32_t framedone_len;
62   uint32_t cbcr_off;
63   uint32_t cbcr_len;
64   uint32_t num_of_mcu_rows;
65   uint32_t offset;
66   uint32_t pln2_off;
67   uint32_t pln2_len;
68 };
69 #define MSM_JPEG_HW_CMD_TYPE_READ 0
70 #define MSM_JPEG_HW_CMD_TYPE_WRITE 1
71 #define MSM_JPEG_HW_CMD_TYPE_WRITE_OR 2
72 #define MSM_JPEG_HW_CMD_TYPE_UWAIT 3
73 #define MSM_JPEG_HW_CMD_TYPE_MWAIT 4
74 #define MSM_JPEG_HW_CMD_TYPE_MDELAY 5
75 #define MSM_JPEG_HW_CMD_TYPE_UDELAY 6
76 struct msm_jpeg_hw_cmd {
77   uint32_t type : 4;
78   uint32_t n : 12;
79   uint32_t offset : 16;
80   uint32_t mask;
81   union {
82     uint32_t data;
83     uint32_t * pdata;
84   };
85 };
86 struct msm_jpeg_hw_cmds {
87   uint32_t m;
88   struct msm_jpeg_hw_cmd hw_cmd[1];
89 };
90 #endif
91 
92