1
2
3
4
5
6
7
8
9
10 #ifndef OMAP4_ISS_RESIZER_H
11 #define OMAP4_ISS_RESIZER_H
12
13 #include "iss_video.h"
14
15 enum resizer_input_entity {
16 RESIZER_INPUT_NONE,
17 RESIZER_INPUT_IPIPE,
18 RESIZER_INPUT_IPIPEIF
19 };
20
21 #define RESIZER_OUTPUT_MEMORY BIT(0)
22
23
24 #define RESIZER_PAD_SINK 0
25 #define RESIZER_PAD_SOURCE_MEM 1
26 #define RESIZER_PADS_NUM 2
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 struct iss_resizer_device {
43 struct v4l2_subdev subdev;
44 struct media_pad pads[RESIZER_PADS_NUM];
45 struct v4l2_mbus_framefmt formats[RESIZER_PADS_NUM];
46
47 enum resizer_input_entity input;
48 unsigned int output;
49 struct iss_video video_out;
50 unsigned int error;
51
52 enum iss_pipeline_stream_state state;
53 wait_queue_head_t wait;
54 atomic_t stopping;
55 };
56
57 struct iss_device;
58
59 int omap4iss_resizer_init(struct iss_device *iss);
60 int omap4iss_resizer_create_links(struct iss_device *iss);
61 void omap4iss_resizer_cleanup(struct iss_device *iss);
62 int omap4iss_resizer_register_entities(struct iss_resizer_device *resizer,
63 struct v4l2_device *vdev);
64 void omap4iss_resizer_unregister_entities(struct iss_resizer_device *resizer);
65
66 int omap4iss_resizer_busy(struct iss_resizer_device *resizer);
67 void omap4iss_resizer_isr(struct iss_resizer_device *resizer, u32 events);
68 void omap4iss_resizer_restore_context(struct iss_device *iss);
69 void omap4iss_resizer_max_rate(struct iss_resizer_device *resizer,
70 unsigned int *max_rate);
71
72 #endif