aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is/fimc-isp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/exynos4-is/fimc-isp.h')
-rw-r--r--drivers/media/platform/exynos4-is/fimc-isp.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-isp.h b/drivers/media/platform/exynos4-is/fimc-isp.h
index 03bf95ab017b..4dc55a18d978 100644
--- a/drivers/media/platform/exynos4-is/fimc-isp.h
+++ b/drivers/media/platform/exynos4-is/fimc-isp.h
@@ -35,17 +35,18 @@ extern int fimc_isp_debug;
35#define FIMC_ISP_SINK_WIDTH_MIN (16 + 8) 35#define FIMC_ISP_SINK_WIDTH_MIN (16 + 8)
36#define FIMC_ISP_SINK_HEIGHT_MIN (12 + 8) 36#define FIMC_ISP_SINK_HEIGHT_MIN (12 + 8)
37#define FIMC_ISP_SOURCE_WIDTH_MIN 8 37#define FIMC_ISP_SOURCE_WIDTH_MIN 8
38#define FIMC_ISP_SOURC_HEIGHT_MIN 8 38#define FIMC_ISP_SOURCE_HEIGHT_MIN 8
39#define FIMC_ISP_CAC_MARGIN_WIDTH 16 39#define FIMC_ISP_CAC_MARGIN_WIDTH 16
40#define FIMC_ISP_CAC_MARGIN_HEIGHT 12 40#define FIMC_ISP_CAC_MARGIN_HEIGHT 12
41 41
42#define FIMC_ISP_SINK_WIDTH_MAX (4000 - 16) 42#define FIMC_ISP_SINK_WIDTH_MAX (4000 - 16)
43#define FIMC_ISP_SINK_HEIGHT_MAX (4000 + 12) 43#define FIMC_ISP_SINK_HEIGHT_MAX (4000 + 12)
44#define FIMC_ISP_SOURCE_WIDTH_MAX 4000 44#define FIMC_ISP_SOURCE_WIDTH_MAX 4000
45#define FIMC_ISP_SOURC_HEIGHT_MAX 4000 45#define FIMC_ISP_SOURCE_HEIGHT_MAX 4000
46 46
47#define FIMC_ISP_NUM_FORMATS 3 47#define FIMC_ISP_NUM_FORMATS 3
48#define FIMC_ISP_REQ_BUFS_MIN 2 48#define FIMC_ISP_REQ_BUFS_MIN 2
49#define FIMC_ISP_REQ_BUFS_MAX 32
49 50
50#define FIMC_ISP_SD_PAD_SINK 0 51#define FIMC_ISP_SD_PAD_SINK 0
51#define FIMC_ISP_SD_PAD_SRC_FIFO 1 52#define FIMC_ISP_SD_PAD_SRC_FIFO 1
@@ -100,6 +101,16 @@ struct fimc_isp_ctrls {
100 struct v4l2_ctrl *colorfx; 101 struct v4l2_ctrl *colorfx;
101}; 102};
102 103
104struct isp_video_buf {
105 struct vb2_buffer vb;
106 dma_addr_t dma_addr[FIMC_ISP_MAX_PLANES];
107 unsigned int index;
108};
109
110#define to_isp_video_buf(_b) container_of(_b, struct isp_video_buf, vb)
111
112#define FIMC_ISP_MAX_BUFS 4
113
103/** 114/**
104 * struct fimc_is_video - fimc-is video device structure 115 * struct fimc_is_video - fimc-is video device structure
105 * @vdev: video_device structure 116 * @vdev: video_device structure
@@ -114,18 +125,26 @@ struct fimc_isp_ctrls {
114 * @format: current pixel format 125 * @format: current pixel format
115 */ 126 */
116struct fimc_is_video { 127struct fimc_is_video {
117 struct video_device vdev; 128 struct exynos_video_entity ve;
118 enum v4l2_buf_type type; 129 enum v4l2_buf_type type;
119 struct media_pad pad; 130 struct media_pad pad;
120 struct list_head pending_buf_q; 131 struct list_head pending_buf_q;
121 struct list_head active_buf_q; 132 struct list_head active_buf_q;
122 struct vb2_queue vb_queue; 133 struct vb2_queue vb_queue;
123 unsigned int frame_count;
124 unsigned int reqbufs_count; 134 unsigned int reqbufs_count;
135 unsigned int buf_count;
136 unsigned int buf_mask;
137 unsigned int frame_count;
125 int streaming; 138 int streaming;
139 struct isp_video_buf *buffers[FIMC_ISP_MAX_BUFS];
126 const struct fimc_fmt *format; 140 const struct fimc_fmt *format;
141 struct v4l2_pix_format_mplane pixfmt;
127}; 142};
128 143
144/* struct fimc_isp:state bit definitions */
145#define ST_ISP_VID_CAP_BUF_PREP 0
146#define ST_ISP_VID_CAP_STREAMING 1
147
129/** 148/**
130 * struct fimc_isp - FIMC-IS ISP data structure 149 * struct fimc_isp - FIMC-IS ISP data structure
131 * @pdev: pointer to FIMC-IS platform device 150 * @pdev: pointer to FIMC-IS platform device