1 #ifndef _UAPI__MSM_ROTATOR_H__ 2 #define _UAPI__MSM_ROTATOR_H__ 3 4 #include <linux/types.h> 5 #include <linux/msm_mdp.h> 6 7 #define MSM_ROTATOR_IOCTL_MAGIC 'R' 8 9 #define MSM_ROTATOR_IOCTL_START \ 10 _IOWR(MSM_ROTATOR_IOCTL_MAGIC, 1, struct msm_rotator_img_info) 11 #define MSM_ROTATOR_IOCTL_ROTATE \ 12 _IOW(MSM_ROTATOR_IOCTL_MAGIC, 2, struct msm_rotator_data_info) 13 #define MSM_ROTATOR_IOCTL_FINISH \ 14 _IOW(MSM_ROTATOR_IOCTL_MAGIC, 3, int) 15 16 #define ROTATOR_VERSION_01 0xA5B4C301 17 18 enum rotator_clk_type { 19 ROTATOR_CORE_CLK, 20 ROTATOR_PCLK, 21 ROTATOR_IMEM_CLK 22 }; 23 24 struct msm_rotator_img_info { 25 unsigned int session_id; 26 struct msmfb_img src; 27 struct msmfb_img dst; 28 struct mdp_rect src_rect; 29 unsigned int dst_x; 30 unsigned int dst_y; 31 unsigned char rotations; 32 int enable; 33 unsigned int downscale_ratio; 34 unsigned int secure; 35 }; 36 37 struct msm_rotator_data_info { 38 int session_id; 39 struct msmfb_data src; 40 struct msmfb_data dst; 41 unsigned int version_key; 42 struct msmfb_data src_chroma; 43 struct msmfb_data dst_chroma; 44 }; 45 46 struct msm_rot_clocks { 47 const char *clk_name; 48 enum rotator_clk_type clk_type; 49 unsigned int clk_rate; 50 }; 51 52 struct msm_rotator_platform_data { 53 unsigned int number_of_clocks; 54 unsigned int hardware_version_number; 55 struct msm_rot_clocks *rotator_clks; 56 #ifdef CONFIG_MSM_BUS_SCALING 57 struct msm_bus_scale_pdata *bus_scale_table; 58 #endif 59 char rot_iommu_split_domain; 60 }; 61 #endif 62 63