This source file includes following definitions.
- vdev_to_exynos_video_entity
1
2
3
4
5
6
7
8
9 #ifndef S5P_FIMC_H_
10 #define S5P_FIMC_H_
11
12 #include <media/media-entity.h>
13 #include <media/v4l2-dev.h>
14 #include <media/v4l2-mediabus.h>
15
16
17
18
19 enum fimc_input {
20 FIMC_INPUT_PARALLEL_0 = 1,
21 FIMC_INPUT_PARALLEL_1,
22 FIMC_INPUT_MIPI_CSI2_0 = 3,
23 FIMC_INPUT_MIPI_CSI2_1,
24 FIMC_INPUT_WRITEBACK_A = 5,
25 FIMC_INPUT_WRITEBACK_B,
26 FIMC_INPUT_WRITEBACK_ISP = 5,
27 };
28
29
30
31
32 enum fimc_bus_type {
33
34 FIMC_BUS_TYPE_ITU_601 = 1,
35
36 FIMC_BUS_TYPE_ITU_656,
37
38 FIMC_BUS_TYPE_MIPI_CSI2,
39
40 FIMC_BUS_TYPE_LCD_WRITEBACK_A,
41
42 FIMC_BUS_TYPE_LCD_WRITEBACK_B,
43
44 FIMC_BUS_TYPE_ISP_WRITEBACK = FIMC_BUS_TYPE_LCD_WRITEBACK_B,
45 };
46
47 #define fimc_input_is_parallel(x) ((x) == 1 || (x) == 2)
48 #define fimc_input_is_mipi_csi(x) ((x) == 3 || (x) == 4)
49
50
51
52
53 #define GRP_ID_SENSOR (1 << 8)
54 #define GRP_ID_FIMC_IS_SENSOR (1 << 9)
55 #define GRP_ID_WRITEBACK (1 << 10)
56 #define GRP_ID_CSIS (1 << 11)
57 #define GRP_ID_FIMC (1 << 12)
58 #define GRP_ID_FLITE (1 << 13)
59 #define GRP_ID_FIMC_IS (1 << 14)
60
61
62
63
64
65
66
67
68
69
70 struct fimc_source_info {
71 enum fimc_bus_type fimc_bus_type;
72 enum fimc_bus_type sensor_bus_type;
73 u16 flags;
74 u16 mux_id;
75 };
76
77
78
79
80
81
82
83 #define S5P_FIMC_TX_END_NOTIFY _IO('e', 0)
84
85 #define FIMC_MAX_PLANES 3
86
87
88
89
90
91
92
93
94
95
96
97
98
99 struct fimc_fmt {
100 u32 mbus_code;
101 u32 fourcc;
102 u32 color;
103 u16 memplanes;
104 u16 colplanes;
105 u8 colorspace;
106 u8 depth[FIMC_MAX_PLANES];
107 u16 mdataplanes;
108 u16 flags;
109 #define FMT_FLAGS_CAM (1 << 0)
110 #define FMT_FLAGS_M2M_IN (1 << 1)
111 #define FMT_FLAGS_M2M_OUT (1 << 2)
112 #define FMT_FLAGS_M2M (1 << 1 | 1 << 2)
113 #define FMT_HAS_ALPHA (1 << 3)
114 #define FMT_FLAGS_COMPRESSED (1 << 4)
115 #define FMT_FLAGS_WRITEBACK (1 << 5)
116 #define FMT_FLAGS_RAW_BAYER (1 << 6)
117 #define FMT_FLAGS_YUV (1 << 7)
118 };
119
120 struct exynos_media_pipeline;
121
122
123
124
125
126 struct exynos_media_pipeline_ops {
127 int (*prepare)(struct exynos_media_pipeline *p,
128 struct media_entity *me);
129 int (*unprepare)(struct exynos_media_pipeline *p);
130 int (*open)(struct exynos_media_pipeline *p, struct media_entity *me,
131 bool resume);
132 int (*close)(struct exynos_media_pipeline *p);
133 int (*set_stream)(struct exynos_media_pipeline *p, bool state);
134 };
135
136 struct exynos_video_entity {
137 struct video_device vdev;
138 struct exynos_media_pipeline *pipe;
139 };
140
141 struct exynos_media_pipeline {
142 struct media_pipeline mp;
143 const struct exynos_media_pipeline_ops *ops;
144 };
145
146 static inline struct exynos_video_entity *vdev_to_exynos_video_entity(
147 struct video_device *vdev)
148 {
149 return container_of(vdev, struct exynos_video_entity, vdev);
150 }
151
152 #define fimc_pipeline_call(ent, op, args...) \
153 ((!(ent) || !(ent)->pipe) ? -ENOENT : \
154 (((ent)->pipe->ops && (ent)->pipe->ops->op) ? \
155 (ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) \
156
157 #endif