blob: b8d7de60df8ac257389a280ac6fdc19751880dc4 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001#ifndef __MSM_ROTATOR_H__
Kobi Cohen Arazi18b04782011-07-26 12:11:34 -07002#define __MSM_ROTATOR_H__
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003
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
18enum rotator_clk_type {
19 ROTATOR_CORE_CLK,
20 ROTATOR_AXI_CLK,
21 ROTATOR_PCLK,
22 ROTATOR_IMEM_CLK
23};
24
25struct msm_rotator_img_info {
26 unsigned int session_id;
27 struct msmfb_img src;
28 struct msmfb_img dst;
29 struct mdp_rect src_rect;
30 unsigned int dst_x;
31 unsigned int dst_y;
32 unsigned char rotations;
33 int enable;
34};
35
36struct msm_rotator_data_info {
37 int session_id;
38 struct msmfb_data src;
39 struct msmfb_data dst;
40 unsigned int version_key;
41 struct msmfb_data src_chroma;
42 struct msmfb_data dst_chroma;
43};
44
45struct msm_rot_clocks {
46 const char *clk_name;
47 enum rotator_clk_type clk_type;
48 unsigned int clk_rate;
49};
50
51struct msm_rotator_platform_data {
52 unsigned int number_of_clocks;
53 unsigned int hardware_version_number;
54 struct msm_rot_clocks *rotator_clks;
55 const char *regulator_name;
56};
57#endif
58