Lines Matching full:isp
5 * FIMC-IS ISP video input and video output DMA interface driver
35 #include "fimc-isp-video.h"
42 struct fimc_isp *isp = vb2_get_drv_priv(vq); in isp_video_capture_queue_setup() local
43 const struct v4l2_pix_format_mplane *vid_fmt = &isp->video_capture.pixfmt; in isp_video_capture_queue_setup()
44 const struct fimc_fmt *fmt = isp->video_capture.format; in isp_video_capture_queue_setup()
73 return &__get_curr_is_config(is)->isp.dma2_output; in __get_isp_dma2()
79 struct fimc_isp *isp = vb2_get_drv_priv(q); in isp_video_capture_start_streaming() local
80 struct fimc_is *is = fimc_isp_to_is(isp); in isp_video_capture_start_streaming()
82 struct fimc_is_video *video = &isp->video_capture; in isp_video_capture_start_streaming()
85 if (!test_bit(ST_ISP_VID_CAP_BUF_PREP, &isp->state) || in isp_video_capture_start_streaming()
86 test_bit(ST_ISP_VID_CAP_STREAMING, &isp->state)) in isp_video_capture_start_streaming()
115 set_bit(ST_ISP_VID_CAP_STREAMING, &isp->state); in isp_video_capture_start_streaming()
121 struct fimc_isp *isp = vb2_get_drv_priv(q); in isp_video_capture_stop_streaming() local
122 struct fimc_is *is = fimc_isp_to_is(isp); in isp_video_capture_stop_streaming()
126 ret = fimc_pipeline_call(&isp->video_capture.ve, set_stream, 0); in isp_video_capture_stop_streaming()
145 clear_bit(ST_ISP_VID_CAP_BUF_PREP, &isp->state); in isp_video_capture_stop_streaming()
146 clear_bit(ST_ISP_VID_CAP_STREAMING, &isp->state); in isp_video_capture_stop_streaming()
148 isp->video_capture.buf_count = 0; in isp_video_capture_stop_streaming()
153 struct fimc_isp *isp = vb2_get_drv_priv(vb->vb2_queue); in isp_video_capture_buffer_prepare() local
154 struct fimc_is_video *video = &isp->video_capture; in isp_video_capture_buffer_prepare()
173 if (test_bit(ST_ISP_VID_CAP_BUF_PREP, &isp->state)) { in isp_video_capture_buffer_prepare()
189 struct fimc_isp *isp = vb2_get_drv_priv(vb->vb2_queue); in isp_video_capture_buffer_queue() local
190 struct fimc_is_video *video = &isp->video_capture; in isp_video_capture_buffer_queue()
191 struct fimc_is *is = fimc_isp_to_is(isp); in isp_video_capture_buffer_queue()
196 if (test_bit(ST_ISP_VID_CAP_BUF_PREP, &isp->state)) { in isp_video_capture_buffer_queue()
223 set_bit(ST_ISP_VID_CAP_BUF_PREP, &isp->state); in isp_video_capture_buffer_queue()
226 if (!test_bit(ST_ISP_VID_CAP_STREAMING, &isp->state)) in isp_video_capture_buffer_queue()
231 * FIMC-IS ISP input and output DMA interface interrupt handler.
236 struct fimc_is_video *video = &is->isp.video_capture; in fimc_isp_video_irq_handler()
241 if (!test_bit(ST_ISP_VID_CAP_STREAMING, &is->isp.state)) in fimc_isp_video_irq_handler()
264 struct fimc_isp *isp = video_drvdata(file); in isp_video_open() local
265 struct exynos_video_entity *ve = &isp->video_capture.ve; in isp_video_open()
269 if (mutex_lock_interruptible(&isp->video_lock)) in isp_video_open()
276 ret = pm_runtime_resume_and_get(&isp->pdev->dev); in isp_video_open()
296 mutex_unlock(&isp->video_lock); in isp_video_open()
302 struct fimc_isp *isp = video_drvdata(file); in isp_video_release() local
303 struct fimc_is_video *ivc = &isp->video_capture; in isp_video_release()
308 mutex_lock(&isp->video_lock); in isp_video_release()
327 pm_runtime_put(&isp->pdev->dev); in isp_video_release()
328 mutex_unlock(&isp->video_lock); in isp_video_release()
348 struct fimc_isp *isp = video_drvdata(file); in isp_video_querycap() local
350 __fimc_vidioc_querycap(&isp->pdev->dev, cap); in isp_video_querycap()
374 struct fimc_isp *isp = video_drvdata(file); in isp_video_g_fmt_mplane() local
376 f->fmt.pix_mp = isp->video_capture.pixfmt; in isp_video_g_fmt_mplane()
380 static void __isp_video_try_fmt(struct fimc_isp *isp, in __isp_video_try_fmt() argument
408 struct fimc_isp *isp = video_drvdata(file); in isp_video_try_fmt_mplane() local
410 __isp_video_try_fmt(isp, &f->fmt.pix_mp, NULL); in isp_video_try_fmt_mplane()
417 struct fimc_isp *isp = video_drvdata(file); in isp_video_s_fmt_mplane() local
418 struct fimc_is *is = fimc_isp_to_is(isp); in isp_video_s_fmt_mplane()
423 __isp_video_try_fmt(isp, pixm, &ifmt); in isp_video_s_fmt_mplane()
437 isp->video_capture.format = ifmt; in isp_video_s_fmt_mplane()
438 isp->video_capture.pixfmt = *pixm; in isp_video_s_fmt_mplane()
447 static int isp_video_pipeline_validate(struct fimc_isp *isp) in isp_video_pipeline_validate() argument
449 struct v4l2_subdev *sd = &isp->subdev; in isp_video_pipeline_validate()
493 struct fimc_isp *isp = video_drvdata(file); in isp_video_streamon() local
494 struct exynos_video_entity *ve = &isp->video_capture.ve; in isp_video_streamon()
501 ret = isp_video_pipeline_validate(isp); in isp_video_streamon()
509 isp->video_capture.streaming = 1; in isp_video_streamon()
519 struct fimc_isp *isp = video_drvdata(file); in isp_video_streamoff() local
520 struct fimc_is_video *video = &isp->video_capture; in isp_video_streamoff()
535 struct fimc_isp *isp = video_drvdata(file); in isp_video_reqbufs() local
548 isp->video_capture.reqbufs_count = rb->count; in isp_video_reqbufs()
568 int fimc_isp_video_device_register(struct fimc_isp *isp, in fimc_isp_video_device_register() argument
572 struct vb2_queue *q = &isp->video_capture.vb_queue; in fimc_isp_video_device_register()
578 iv = &isp->video_capture; in fimc_isp_video_device_register()
582 mutex_init(&isp->video_lock); in fimc_isp_video_device_register()
598 q->drv_priv = isp; in fimc_isp_video_device_register()
600 q->lock = &isp->video_lock; in fimc_isp_video_device_register()
601 q->dev = &isp->pdev->dev; in fimc_isp_video_device_register()
609 strscpy(vdev->name, "fimc-is-isp.capture", sizeof(vdev->name)); in fimc_isp_video_device_register()
616 vdev->lock = &isp->video_lock; in fimc_isp_video_device_register()
624 video_set_drvdata(vdev, isp); in fimc_isp_video_device_register()
638 void fimc_isp_video_device_unregister(struct fimc_isp *isp, in fimc_isp_video_device_unregister() argument
644 ve = &isp->video_capture.ve; in fimc_isp_video_device_unregister()
648 mutex_lock(&isp->video_lock); in fimc_isp_video_device_unregister()
656 mutex_unlock(&isp->video_lock); in fimc_isp_video_device_unregister()