summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/platform/exynos4-is/fimc-lite.c37
-rw-r--r--include/media/s5p_fimc.h9
2 files changed, 29 insertions, 17 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c
index 76a194119e7..7e41268749c 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -285,25 +285,28 @@ static irqreturn_t flite_irq_handler(int irq, void *priv)
if (atomic_read(&fimc->out_path) != FIMC_IO_DMA)
goto done;
- if ((intsrc & FLITE_REG_CISTATUS_IRQ_SRC_FRMSTART) &&
- test_bit(ST_FLITE_RUN, &fimc->state) &&
- !list_empty(&fimc->pending_buf_q)) {
- vbuf = fimc_lite_pending_queue_pop(fimc);
- flite_hw_set_dma_buffer(fimc, vbuf);
- fimc_lite_active_queue_add(fimc, vbuf);
+ if ((intsrc & FLITE_REG_CISTATUS_IRQ_SRC_FRMSTART)){
+ if (test_bit(ST_FLITE_RUN, &fimc->state) &&
+ !list_empty(&fimc->pending_buf_q)) {
+ vbuf = fimc_lite_pending_queue_pop(fimc);
+ flite_hw_set_dma_buffer(fimc, vbuf);
+ fimc_lite_active_queue_add(fimc, vbuf);
+ }
}
- if ((intsrc & FLITE_REG_CISTATUS_IRQ_SRC_FRMEND) &&
- test_bit(ST_FLITE_RUN, &fimc->state) &&
- !list_empty(&fimc->active_buf_q)) {
- vbuf = fimc_lite_active_queue_pop(fimc);
- ktime_get_ts(&ts);
- tv = &vbuf->vb.v4l2_buf.timestamp;
- tv->tv_sec = ts.tv_sec;
- tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
- vbuf->vb.v4l2_buf.sequence = fimc->frame_count++;
- flite_hw_mask_dma_buffer(fimc, vbuf->index);
- vb2_buffer_done(&vbuf->vb, VB2_BUF_STATE_DONE);
+ if ((intsrc & FLITE_REG_CISTATUS_IRQ_SRC_FRMEND)) {
+ if (test_bit(ST_FLITE_RUN, &fimc->state) &&
+ !list_empty(&fimc->active_buf_q)) {
+ vbuf = fimc_lite_active_queue_pop(fimc);
+ ktime_get_ts(&ts);
+ tv = &vbuf->vb.v4l2_buf.timestamp;
+ tv->tv_sec = ts.tv_sec;
+ tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
+ vbuf->vb.v4l2_buf.sequence = fimc->frame_count++;
+ flite_hw_mask_dma_buffer(fimc, vbuf->index);
+ vb2_buffer_done(&vbuf->vb, VB2_BUF_STATE_DONE);
+ }
+ v4l2_subdev_notify(&fimc->subdev, EXYNOS_FIMC_IS_FRAME_DONE, NULL);
}
if (test_bit(ST_FLITE_CONFIG, &fimc->state))
diff --git a/include/media/s5p_fimc.h b/include/media/s5p_fimc.h
index b975c285c8a..5fe54ed29b1 100644
--- a/include/media/s5p_fimc.h
+++ b/include/media/s5p_fimc.h
@@ -105,6 +105,15 @@ struct s5p_platform_fimc {
* at begining of the frame transmission.
*/
#define S5P_FIMC_TX_END_NOTIFY _IO('e', 0)
+/**
+ * v4l2_device notification id - provided for internal use only.
+ * Sensors subdevs might issue S5P_FIMC_FRAME_DONE notification
+ * whenever frame has been succesfully captured despite current
+ * capturing mode.
+ * Note: Invoramtive puspose only.
+ */
+#define EXYNOS_FIMC_IS_FRAME_DONE _IO('e', 1)
+
#define FIMC_MAX_PLANES 3