blob: 98352b722a18e032820c89e2beae84472ee11ebe [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001#ifndef __MSM_ROTATOR_H__
2
3#include <linux/types.h>
4#include <linux/msm_mdp.h>
5
6#define MSM_ROTATOR_IOCTL_MAGIC 'R'
7
8#define MSM_ROTATOR_IOCTL_START \
9 _IOWR(MSM_ROTATOR_IOCTL_MAGIC, 1, struct msm_rotator_img_info)
10#define MSM_ROTATOR_IOCTL_ROTATE \
11 _IOW(MSM_ROTATOR_IOCTL_MAGIC, 2, struct msm_rotator_data_info)
12#define MSM_ROTATOR_IOCTL_FINISH \
13 _IOW(MSM_ROTATOR_IOCTL_MAGIC, 3, int)
14
15#define ROTATOR_VERSION_01 0xA5B4C301
16
17enum rotator_clk_type {
18 ROTATOR_CORE_CLK,
19 ROTATOR_AXI_CLK,
20 ROTATOR_PCLK,
21 ROTATOR_IMEM_CLK
22};
23
24struct 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};
34
35struct msm_rotator_data_info {
36 int session_id;
37 struct msmfb_data src;
38 struct msmfb_data dst;
39 unsigned int version_key;
40 struct msmfb_data src_chroma;
41 struct msmfb_data dst_chroma;
42};
43
44struct msm_rot_clocks {
45 const char *clk_name;
46 enum rotator_clk_type clk_type;
47 unsigned int clk_rate;
48};
49
50struct msm_rotator_platform_data {
51 unsigned int number_of_clocks;
52 unsigned int hardware_version_number;
53 struct msm_rot_clocks *rotator_clks;
54 const char *regulator_name;
55};
56#endif
57