1 #ifndef __MSM_ROTATOR_H__ 2 #define __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 #define MSM_ROTATOR_IOCTL_BUFFER_SYNC \ 16 _IOW(MSM_ROTATOR_IOCTL_MAGIC, 4, struct msm_rotator_buf_sync) 17 18 #define ROTATOR_VERSION_01 0xA5B4C301 19 20 enum rotator_clk_type { 21 ROTATOR_CORE_CLK, 22 ROTATOR_PCLK, 23 ROTATOR_IMEM_CLK 24 }; 25 26 struct msm_rotator_buf_sync { 27 uint32_t session_id; 28 uint32_t flags; 29 int acq_fen_fd; 30 int rel_fen_fd; 31 }; 32 33 struct msm_rotator_img_info { 34 unsigned int session_id; 35 struct msmfb_img src; 36 struct msmfb_img dst; 37 struct mdp_rect src_rect; 38 unsigned int dst_x; 39 unsigned int dst_y; 40 unsigned char rotations; 41 int enable; 42 unsigned int downscale_ratio; 43 unsigned int secure; 44 }; 45 46 struct msm_rotator_data_info { 47 int session_id; 48 struct msmfb_data src; 49 struct msmfb_data dst; 50 unsigned int version_key; 51 struct msmfb_data src_chroma; 52 struct msmfb_data dst_chroma; 53 uint32_t wait_for_finish; 54 }; 55 56 struct msm_rot_clocks { 57 const char *clk_name; 58 enum rotator_clk_type clk_type; 59 unsigned int clk_rate; 60 }; 61 62 struct msm_rotator_platform_data { 63 unsigned int number_of_clocks; 64 unsigned int hardware_version_number; 65 struct msm_rot_clocks *rotator_clks; 66 #ifdef CONFIG_MSM_BUS_SCALING 67 struct msm_bus_scale_pdata *bus_scale_table; 68 #endif 69 char rot_iommu_split_domain; 70 }; 71 #endif 72 73