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_MDSS_ROTATOR_H_
20 #define _UAPI_MDSS_ROTATOR_H_
21 #include <linux/msm_mdp_ext.h>
22 #define MDSS_ROTATOR_IOCTL_MAGIC 'w'
23 #define MDSS_ROTATION_OPEN _IOWR(MDSS_ROTATOR_IOCTL_MAGIC, 1, struct mdp_rotation_config *)
24 #define MDSS_ROTATION_CONFIG _IOWR(MDSS_ROTATOR_IOCTL_MAGIC, 2, struct mdp_rotation_config *)
25 #define MDSS_ROTATION_REQUEST _IOWR(MDSS_ROTATOR_IOCTL_MAGIC, 3, struct mdp_rotation_request *)
26 #define MDSS_ROTATION_CLOSE _IOW(MDSS_ROTATOR_IOCTL_MAGIC, 4, unsigned int)
27 #define MDP_ROTATION_NOP 0x01
28 #define MDP_ROTATION_FLIP_LR 0x02
29 #define MDP_ROTATION_FLIP_UD 0x04
30 #define MDP_ROTATION_90 0x08
31 #define MDP_ROTATION_180 (MDP_ROTATION_FLIP_LR | MDP_ROTATION_FLIP_UD)
32 #define MDP_ROTATION_270 (MDP_ROTATION_90 | MDP_ROTATION_180)
33 #define MDP_ROTATION_DEINTERLACE 0x10
34 #define MDP_ROTATION_BWC_EN 0x40
35 #define MDP_ROTATION_SECURE 0x80
36 #define MDSS_ROTATION_REQUEST_VALIDATE 0x01
37 #define MDP_ROTATION_REQUEST_VERSION_1_0 0x00010000
38 #define MDSS_ROTATION_HW_ANY 0xFFFFFFFF
39 struct mdp_rotation_buf_info {
40   uint32_t width;
41   uint32_t height;
42   uint32_t format;
43   struct mult_factor comp_ratio;
44 };
45 struct mdp_rotation_config {
46   uint32_t version;
47   uint32_t session_id;
48   struct mdp_rotation_buf_info input;
49   struct mdp_rotation_buf_info output;
50   uint32_t frame_rate;
51   uint32_t flags;
52   uint32_t reserved[6];
53 };
54 struct mdp_rotation_item {
55   uint32_t flags;
56   struct mdp_rect src_rect;
57   struct mdp_rect dst_rect;
58   struct mdp_layer_buffer input;
59   struct mdp_layer_buffer output;
60   uint32_t pipe_idx;
61   uint32_t wb_idx;
62   uint32_t session_id;
63   uint32_t reserved[6];
64 };
65 struct mdp_rotation_request {
66   uint32_t version;
67   uint32_t flags;
68   uint32_t count;
69   struct mdp_rotation_item __user * list;
70   uint32_t reserved[6];
71 };
72 #endif
73 
74