aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-fimc/fimc-core.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-06-10 15:36:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-06 17:37:18 -0300
commite578588eb01d9493513ca1527f464715cfd3f47f (patch)
tree8073e81fb2d3463117c9c2db1defec6990bfcbd3 /drivers/media/video/s5p-fimc/fimc-core.h
parent[media] s5p-fimc: Add the media device driver (diff)
downloadlinux-dev-e578588eb01d9493513ca1527f464715cfd3f47f.tar.xz
linux-dev-e578588eb01d9493513ca1527f464715cfd3f47f.zip
[media] s5p-fimc: Conversion to use struct v4l2_fh
This is a prerequisite for the patch converting the driver to use the control framework. As the capture driver does not use per file handle contexts, two separate ioctl handlers are created for it (vidioc_try_fmt_mplane, and vidioc_g_fmt_mplane) so there is no handlers shared between the memory-to-memory and capture video node. 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 'drivers/media/video/s5p-fimc/fimc-core.h')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
index 5a6234951e2e..22009fe6082d 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.h
+++ b/drivers/media/video/s5p-fimc/fimc-core.h
@@ -460,6 +460,7 @@ struct fimc_dev {
* @state: flags to keep track of user configuration
* @fimc_dev: the FIMC device this context applies to
* @m2m_ctx: memory-to-memory device context
+ * @fh: v4l2 file handle
*/
struct fimc_ctx {
spinlock_t slock;
@@ -479,8 +480,11 @@ struct fimc_ctx {
u32 state;
struct fimc_dev *fimc_dev;
struct v4l2_m2m_ctx *m2m_ctx;
+ struct v4l2_fh fh;
};
+#define fh_to_ctx(__fh) container_of(__fh, struct fimc_ctx, fh)
+
static inline bool fimc_capture_active(struct fimc_dev *fimc)
{
unsigned long flags;
@@ -632,18 +636,16 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc,
/* fimc-core.c */
int fimc_vidioc_enum_fmt_mplane(struct file *file, void *priv,
struct v4l2_fmtdesc *f);
-int fimc_vidioc_g_fmt_mplane(struct file *file, void *priv,
- struct v4l2_format *f);
-int fimc_vidioc_try_fmt_mplane(struct file *file, void *priv,
- struct v4l2_format *f);
int fimc_vidioc_queryctrl(struct file *file, void *priv,
struct v4l2_queryctrl *qc);
int fimc_vidioc_g_ctrl(struct file *file, void *priv,
struct v4l2_control *ctrl);
+int fimc_try_fmt_mplane(struct fimc_ctx *ctx, struct v4l2_format *f);
int fimc_try_crop(struct fimc_ctx *ctx, struct v4l2_crop *cr);
int check_ctrl_val(struct fimc_ctx *ctx, struct v4l2_control *ctrl);
int fimc_s_ctrl(struct fimc_ctx *ctx, struct v4l2_control *ctrl);
+int fimc_fill_format(struct fimc_frame *frame, struct v4l2_format *f);
struct fimc_fmt *find_format(struct v4l2_format *f, unsigned int mask);
struct fimc_fmt *find_mbus_format(struct v4l2_mbus_framefmt *f,