6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
#ifndef _VPBE_H
#define _VPBE_H
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-device.h>
#include <media/davinci/vpbe_osd.h>
#include <media/davinci/vpbe_venc.h>
#include <media/davinci/vpbe_types.h>
struct osd_config_info {
char module_name[32];
};
struct vpbe_output {
struct v4l2_output output;
char *subdev_name;
char *default_mode;
unsigned int num_modes;
struct vpbe_enc_mode_info *modes;
enum v4l2_mbus_pixelcode if_params;
};
struct encoder_config_info {
char module_name[32];
unsigned int is_i2c:1;
struct i2c_board_info board_info;
};
struct amp_config_info {
char module_name[32];
unsigned int is_i2c:1;
struct i2c_board_info board_info;
};
struct vpbe_config {
char module_name[32];
int i2c_adapter_id;
struct osd_config_info osd;
struct encoder_config_info venc;
int num_ext_encoders;
struct encoder_config_info *ext_encoders;
struct amp_config_info *amp;
int num_outputs;
struct vpbe_output *outputs;
};
struct vpbe_device;
struct vpbe_device_ops {
int (*g_cropcap)(struct vpbe_device *vpbe_dev,
struct v4l2_cropcap *cropcap);
int (*enum_outputs)(struct vpbe_device *vpbe_dev,
struct v4l2_output *output);
int (*set_output)(struct vpbe_device *vpbe_dev,
int index);
unsigned int (*get_output)(struct vpbe_device *vpbe_dev);
int (*s_dv_timings)(struct vpbe_device *vpbe_dev,
struct v4l2_dv_timings *dv_timings);
int (*g_dv_timings)(struct vpbe_device *vpbe_dev,
struct v4l2_dv_timings *dv_timings);
int (*enum_dv_timings)(struct vpbe_device *vpbe_dev,
struct v4l2_enum_dv_timings *timings_info);
int (*s_std)(struct vpbe_device *vpbe_dev, v4l2_std_id std_id);
int (*g_std)(struct vpbe_device *vpbe_dev, v4l2_std_id *std_id);
int (*initialize)(struct device *dev, struct vpbe_device *vpbe_dev);
void (*deinitialize)(struct device *dev, struct vpbe_device *vpbe_dev);
int (*get_mode_info)(struct vpbe_device *vpbe_dev,
struct vpbe_enc_mode_info*);
int (*set_mode)(struct vpbe_device *vpbe_dev,
struct vpbe_enc_mode_info*);
int (*suspend)(struct vpbe_device *vpbe_dev);
int (*resume)(struct vpbe_device *vpbe_dev);
};
struct vpbe_device {
struct v4l2_device v4l2_dev;
struct vpbe_config *cfg;
struct device *pdev;
struct v4l2_subdev **encoders;
int current_sd_index;
struct v4l2_subdev *amp;
struct mutex lock;
int initialized;
struct clk *dac_clk;
struct osd_state *osd_device;
struct venc_platform_data *venc_device;
int current_out_index;
struct vpbe_enc_mode_info current_timings;
struct v4l2_subdev *venc;
struct vpbe_device_ops ops;
};
#endif
|