aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-fimc/fimc-core.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-08-26 14:51:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-06 17:44:03 -0300
commit4db5e27ed9401a635b3c10994f2971c0441e3c90 (patch)
tree29098b7f030d50914b1c611ea160dabd2d195d5f /drivers/media/video/s5p-fimc/fimc-core.h
parent[media] s5p-fimc: Correct color format enumeration (diff)
downloadlinux-dev-4db5e27ed9401a635b3c10994f2971c0441e3c90.tar.xz
linux-dev-4db5e27ed9401a635b3c10994f2971c0441e3c90.zip
[media] s5p-fimc: Convert to use media pipeline operations
In the camera capture driver use fimc_pipeline_* calls provided by the media device driver part, in place where v4l2_subdev_call() were used. This way the capture driver don't need to differentiate between various H/W pipeline setups, i.e. if the MIPI-CSI receiver subdev is used or not. Remove the sync_capture_fmt() function instead of which fimc_pipeline_try_format() is introduced in the following patch adding the FIMC capture subdev. The TRY_FMT ioctl function is completed by a subsequent patch adding the capture subdev, so the try_fmt routines can be reused in the subdev and the video node ioctl handlers. 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.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
index f107485af7bf..2935068fda2d 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.h
+++ b/drivers/media/video/s5p-fimc/fimc-core.h
@@ -61,6 +61,7 @@ enum fimc_dev_flags {
ST_CAPT_PEND,
ST_CAPT_RUN,
ST_CAPT_STREAM,
+ ST_CAPT_ISP_STREAM,
ST_CAPT_SHUT,
ST_CAPT_BUSY,
ST_CAPT_APPLY_CFG,
@@ -95,6 +96,9 @@ enum fimc_color_fmt {
#define fimc_fmt_is_rgb(x) ((x) & 0x10)
+#define IS_M2M(__strt) ((__strt) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE || \
+ __strt == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
+
/* Cb/Cr chrominance components order for 2 plane Y/CbCr 4:2:2 formats. */
#define S5P_FIMC_LSB_CRCB S5P_CIOCTRL_ORDER422_2P_LSB_CRCB
@@ -293,7 +297,6 @@ struct fimc_m2m_device {
* struct fimc_vid_cap - camera capture device information
* @ctx: hardware context data
* @vfd: video device node for camera capture mode
- * @sd: pointer to camera sensor subdevice currently in use
* @vd_pad: fimc video capture node pad
* @fmt: Media Bus format configured at selected image sensor
* @pending_buf_q: the pending buffer queue head
@@ -312,7 +315,6 @@ struct fimc_vid_cap {
struct fimc_ctx *ctx;
struct vb2_alloc_ctx *alloc_ctx;
struct video_device *vfd;
- struct v4l2_subdev *sd;;
struct media_pad vd_pad;
struct v4l2_mbus_framefmt fmt;
struct list_head pending_buf_q;
@@ -647,13 +649,13 @@ 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_try_fmt_mplane(struct fimc_ctx *ctx, struct v4l2_format *f);
int fimc_try_crop(struct fimc_ctx *ctx, struct v4l2_crop *cr);
int fimc_ctrls_create(struct fimc_ctx *ctx);
void fimc_ctrls_delete(struct fimc_ctx *ctx);
void fimc_ctrls_activate(struct fimc_ctx *ctx, bool active);
int fimc_fill_format(struct fimc_frame *frame, struct v4l2_format *f);
-
+void fimc_adjust_mplane_format(struct fimc_fmt *fmt, u32 width, u32 height,
+ struct v4l2_pix_format_mplane *pix);
struct fimc_fmt *fimc_find_format(u32 *pixelformat, u32 *mbus_code,
unsigned int mask, int index);
@@ -664,6 +666,7 @@ int fimc_prepare_addr(struct fimc_ctx *ctx, struct vb2_buffer *vb,
struct fimc_frame *frame, struct fimc_addr *paddr);
void fimc_prepare_dma_offset(struct fimc_ctx *ctx, struct fimc_frame *f);
void fimc_set_yuv_order(struct fimc_ctx *ctx);
+void fimc_fill_frame(struct fimc_frame *frame, struct v4l2_format *f);
int fimc_register_m2m_device(struct fimc_dev *fimc,
struct v4l2_device *v4l2_dev);