aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/s5p_fimc.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-05-31 10:37:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-12 20:57:59 -0400
commit403dfbec45419c1838e0ea3be16625986ec17cfd (patch)
tree5098d4c6538bcb6e8044761efb18e81598080e9f /include/media/s5p_fimc.h
parent4bd728a16ee8212e3e468dabb737fe9ef5cea83d (diff)
[media] exynos4-is: Use common exynos_media_pipeline data structure
This enumeration is now private to exynos4-is and the exynos5 camera subsystem driver may have the subdevs handling designed differently. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/s5p_fimc.h')
-rw-r--r--include/media/s5p_fimc.h53
1 files changed, 26 insertions, 27 deletions
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index f5313b402eb7..0afadb663bbd 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -141,41 +141,40 @@ struct fimc_fmt {
141#define FMT_FLAGS_YUV (1 << 7) 141#define FMT_FLAGS_YUV (1 << 7)
142}; 142};
143 143
144enum fimc_subdev_index { 144struct exynos_media_pipeline;
145 IDX_SENSOR,
146 IDX_CSIS,
147 IDX_FLITE,
148 IDX_IS_ISP,
149 IDX_FIMC,
150 IDX_MAX,
151};
152
153struct media_pipeline;
154struct v4l2_subdev;
155 145
156struct fimc_pipeline { 146/*
157 struct v4l2_subdev *subdevs[IDX_MAX]; 147 * Media pipeline operations to be called from within a video node, i.e. the
158 struct media_pipeline *m_pipeline; 148 * last entity within the pipeline. Implemented by related media device driver.
149 */
150struct exynos_media_pipeline_ops {
151 int (*prepare)(struct exynos_media_pipeline *p,
152 struct media_entity *me);
153 int (*unprepare)(struct exynos_media_pipeline *p);
154 int (*open)(struct exynos_media_pipeline *p, struct media_entity *me,
155 bool resume);
156 int (*close)(struct exynos_media_pipeline *p);
157 int (*set_stream)(struct exynos_media_pipeline *p, bool state);
159}; 158};
160 159
161struct exynos_video_entity { 160struct exynos_video_entity {
162 struct video_device vdev; 161 struct video_device vdev;
162 struct exynos_media_pipeline *pipe;
163}; 163};
164 164
165/* 165struct exynos_media_pipeline {
166 * Media pipeline operations to be called from within the fimc(-lite) 166 struct media_pipeline mp;
167 * video node when it is the last entity of the pipeline. Implemented 167 const struct exynos_media_pipeline_ops *ops;
168 * by corresponding media device driver.
169 */
170struct fimc_pipeline_ops {
171 int (*open)(struct fimc_pipeline *p, struct media_entity *me,
172 bool resume);
173 int (*close)(struct fimc_pipeline *p);
174 int (*set_stream)(struct fimc_pipeline *p, bool state);
175}; 168};
176 169
177#define fimc_pipeline_call(f, op, p, args...) \ 170static inline struct exynos_video_entity *vdev_to_exynos_video_entity(
178 (!(f) ? -ENODEV : (((f)->pipeline_ops && (f)->pipeline_ops->op) ? \ 171 struct video_device *vdev)
179 (f)->pipeline_ops->op((p), ##args) : -ENOIOCTLCMD)) 172{
173 return container_of(vdev, struct exynos_video_entity, vdev);
174}
175
176#define fimc_pipeline_call(ent, op, args...) \
177 (!(ent) ? -ENOENT : (((ent)->pipe->ops && (ent)->pipe->ops->op) ? \
178 (ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) \
180 179
181#endif /* S5P_FIMC_H_ */ 180#endif /* S5P_FIMC_H_ */