Lines Matching refs:isp
125 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_get_fmt() local
135 mutex_lock(&isp->subdev_lock); in fimc_isp_subdev_get_fmt()
139 *mf = isp->sink_fmt; in fimc_isp_subdev_get_fmt()
142 *mf = isp->src_fmt; in fimc_isp_subdev_get_fmt()
150 mutex_unlock(&isp->subdev_lock); in fimc_isp_subdev_get_fmt()
158 static void __isp_subdev_try_format(struct fimc_isp *isp, in __isp_subdev_try_format() argument
175 format = v4l2_subdev_get_try_format(&isp->subdev, cfg, in __isp_subdev_try_format()
178 format = &isp->sink_fmt; in __isp_subdev_try_format()
197 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_set_fmt() local
198 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_isp_subdev_set_fmt()
205 mutex_lock(&isp->subdev_lock); in fimc_isp_subdev_set_fmt()
206 __isp_subdev_try_format(isp, cfg, fmt); in fimc_isp_subdev_set_fmt()
220 __isp_subdev_try_format(isp, cfg, &format); in fimc_isp_subdev_set_fmt()
230 isp->sink_fmt = *mf; in fimc_isp_subdev_set_fmt()
233 __isp_subdev_try_format(isp, cfg, &format); in fimc_isp_subdev_set_fmt()
235 isp->src_fmt = format.format; in fimc_isp_subdev_set_fmt()
236 __is_set_frame_size(is, &isp->src_fmt); in fimc_isp_subdev_set_fmt()
238 isp->src_fmt = *mf; in fimc_isp_subdev_set_fmt()
245 mutex_unlock(&isp->subdev_lock); in fimc_isp_subdev_set_fmt()
251 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_s_stream() local
252 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_isp_subdev_s_stream()
300 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_s_power() local
301 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_isp_subdev_s_power()
389 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_registered() local
393 isp->video_capture.ve.pipe = v4l2_get_subdev_hostdata(sd); in fimc_isp_subdev_registered()
395 ret = fimc_isp_video_device_register(isp, sd->v4l2_dev, in fimc_isp_subdev_registered()
398 isp->video_capture.ve.pipe = NULL; in fimc_isp_subdev_registered()
405 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_unregistered() local
407 fimc_isp_video_device_unregister(isp, in fimc_isp_subdev_unregistered()
471 struct isp_param *isp = &is->is_p_region->parameter.isp; in __ctrl_set_aewb_lock() local
475 isp->aa.cmd = cmd; in __ctrl_set_aewb_lock()
476 isp->aa.target = ISP_AA_TARGET_AE; in __ctrl_set_aewb_lock()
486 isp->aa.cmd = cmd; in __ctrl_set_aewb_lock()
487 isp->aa.target = ISP_AA_TARGET_AE; in __ctrl_set_aewb_lock()
508 idx = is->isp.ctrls.iso->val; in __ctrl_set_iso()
588 struct fimc_isp *isp = ctrl_to_fimc_isp(ctrl); in fimc_is_s_ctrl() local
589 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_is_s_ctrl()
655 v4l2_err(&isp->subdev, "Failed to set control: %s (%d)\n", in fimc_is_s_ctrl()
670 static void __isp_subdev_set_default_format(struct fimc_isp *isp) in __isp_subdev_set_default_format() argument
672 struct fimc_is *is = fimc_isp_to_is(isp); in __isp_subdev_set_default_format()
674 isp->sink_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH + in __isp_subdev_set_default_format()
676 isp->sink_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT + in __isp_subdev_set_default_format()
678 isp->sink_fmt.code = MEDIA_BUS_FMT_SGRBG10_1X10; in __isp_subdev_set_default_format()
680 isp->src_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH; in __isp_subdev_set_default_format()
681 isp->src_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT; in __isp_subdev_set_default_format()
682 isp->src_fmt.code = MEDIA_BUS_FMT_SGRBG10_1X10; in __isp_subdev_set_default_format()
683 __is_set_frame_size(is, &isp->src_fmt); in __isp_subdev_set_default_format()
686 int fimc_isp_subdev_create(struct fimc_isp *isp) in fimc_isp_subdev_create() argument
689 struct v4l2_ctrl_handler *handler = &isp->ctrls.handler; in fimc_isp_subdev_create()
690 struct v4l2_subdev *sd = &isp->subdev; in fimc_isp_subdev_create()
691 struct fimc_isp_ctrls *ctrls = &isp->ctrls; in fimc_isp_subdev_create()
694 mutex_init(&isp->subdev_lock); in fimc_isp_subdev_create()
704 isp->subdev_pads[FIMC_ISP_SD_PAD_SINK].flags = MEDIA_PAD_FL_SINK; in fimc_isp_subdev_create()
705 isp->subdev_pads[FIMC_ISP_SD_PAD_SRC_FIFO].flags = MEDIA_PAD_FL_SOURCE; in fimc_isp_subdev_create()
706 isp->subdev_pads[FIMC_ISP_SD_PAD_SRC_DMA].flags = MEDIA_PAD_FL_SOURCE; in fimc_isp_subdev_create()
708 isp->subdev_pads); in fimc_isp_subdev_create()
767 v4l2_set_subdevdata(sd, isp); in fimc_isp_subdev_create()
769 __isp_subdev_set_default_format(isp); in fimc_isp_subdev_create()
774 void fimc_isp_subdev_destroy(struct fimc_isp *isp) in fimc_isp_subdev_destroy() argument
776 struct v4l2_subdev *sd = &isp->subdev; in fimc_isp_subdev_destroy()
780 v4l2_ctrl_handler_free(&isp->ctrls.handler); in fimc_isp_subdev_destroy()