Lines Matching full:isp

25 #include "fimc-isp-video.h"
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()
138 /* ISP OTF input image format */ in fimc_isp_subdev_get_fmt()
139 *mf = isp->sink_fmt; in fimc_isp_subdev_get_fmt()
141 /* ISP OTF output image format */ 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, in __isp_subdev_try_format()
179 format = &isp->sink_fmt; in __isp_subdev_try_format()
198 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_set_fmt() local
199 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_isp_subdev_set_fmt()
206 mutex_lock(&isp->subdev_lock); in fimc_isp_subdev_set_fmt()
207 __isp_subdev_try_format(isp, sd_state, fmt); in fimc_isp_subdev_set_fmt()
221 __isp_subdev_try_format(isp, sd_state, in fimc_isp_subdev_set_fmt()
233 isp->sink_fmt = *mf; in fimc_isp_subdev_set_fmt()
236 __isp_subdev_try_format(isp, sd_state, in fimc_isp_subdev_set_fmt()
239 isp->src_fmt = format.format; in fimc_isp_subdev_set_fmt()
240 __is_set_frame_size(is, &isp->src_fmt); in fimc_isp_subdev_set_fmt()
242 isp->src_fmt = *mf; in fimc_isp_subdev_set_fmt()
249 mutex_unlock(&isp->subdev_lock); in fimc_isp_subdev_set_fmt()
255 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_s_stream() local
256 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_isp_subdev_s_stream()
304 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_s_power() local
305 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_isp_subdev_s_power()
396 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_registered() local
400 isp->video_capture.ve.pipe = v4l2_get_subdev_hostdata(sd); in fimc_isp_subdev_registered()
402 ret = fimc_isp_video_device_register(isp, sd->v4l2_dev, in fimc_isp_subdev_registered()
405 isp->video_capture.ve.pipe = NULL; in fimc_isp_subdev_registered()
412 struct fimc_isp *isp = v4l2_get_subdevdata(sd); in fimc_isp_subdev_unregistered() local
414 fimc_isp_video_device_unregister(isp, in fimc_isp_subdev_unregistered()
478 struct isp_param *isp = &is->is_p_region->parameter.isp; in __ctrl_set_aewb_lock() local
482 isp->aa.cmd = cmd; in __ctrl_set_aewb_lock()
483 isp->aa.target = ISP_AA_TARGET_AE; in __ctrl_set_aewb_lock()
493 isp->aa.cmd = cmd; in __ctrl_set_aewb_lock()
494 isp->aa.target = ISP_AA_TARGET_AE; in __ctrl_set_aewb_lock()
515 idx = is->isp.ctrls.iso->val; in __ctrl_set_iso()
595 struct fimc_isp *isp = ctrl_to_fimc_isp(ctrl); in fimc_is_s_ctrl() local
596 struct fimc_is *is = fimc_isp_to_is(isp); in fimc_is_s_ctrl()
662 v4l2_err(&isp->subdev, "Failed to set control: %s (%d)\n", in fimc_is_s_ctrl()
677 static void __isp_subdev_set_default_format(struct fimc_isp *isp) in __isp_subdev_set_default_format() argument
679 struct fimc_is *is = fimc_isp_to_is(isp); in __isp_subdev_set_default_format()
681 isp->sink_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH + in __isp_subdev_set_default_format()
683 isp->sink_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT + in __isp_subdev_set_default_format()
685 isp->sink_fmt.code = MEDIA_BUS_FMT_SGRBG10_1X10; in __isp_subdev_set_default_format()
687 isp->src_fmt.width = DEFAULT_PREVIEW_STILL_WIDTH; in __isp_subdev_set_default_format()
688 isp->src_fmt.height = DEFAULT_PREVIEW_STILL_HEIGHT; in __isp_subdev_set_default_format()
689 isp->src_fmt.code = MEDIA_BUS_FMT_SGRBG10_1X10; in __isp_subdev_set_default_format()
690 __is_set_frame_size(is, &isp->src_fmt); in __isp_subdev_set_default_format()
693 int fimc_isp_subdev_create(struct fimc_isp *isp) in fimc_isp_subdev_create() argument
696 struct v4l2_ctrl_handler *handler = &isp->ctrls.handler; in fimc_isp_subdev_create()
697 struct v4l2_subdev *sd = &isp->subdev; in fimc_isp_subdev_create()
698 struct fimc_isp_ctrls *ctrls = &isp->ctrls; in fimc_isp_subdev_create()
701 mutex_init(&isp->subdev_lock); in fimc_isp_subdev_create()
708 snprintf(sd->name, sizeof(sd->name), "FIMC-IS-ISP"); in fimc_isp_subdev_create()
711 isp->subdev_pads[FIMC_ISP_SD_PAD_SINK].flags = MEDIA_PAD_FL_SINK; in fimc_isp_subdev_create()
712 isp->subdev_pads[FIMC_ISP_SD_PAD_SRC_FIFO].flags = MEDIA_PAD_FL_SOURCE; in fimc_isp_subdev_create()
713 isp->subdev_pads[FIMC_ISP_SD_PAD_SRC_DMA].flags = MEDIA_PAD_FL_SOURCE; in fimc_isp_subdev_create()
715 isp->subdev_pads); in fimc_isp_subdev_create()
774 v4l2_set_subdevdata(sd, isp); in fimc_isp_subdev_create()
776 __isp_subdev_set_default_format(isp); in fimc_isp_subdev_create()
781 void fimc_isp_subdev_destroy(struct fimc_isp *isp) in fimc_isp_subdev_destroy() argument
783 struct v4l2_subdev *sd = &isp->subdev; in fimc_isp_subdev_destroy()
787 v4l2_ctrl_handler_free(&isp->ctrls.handler); in fimc_isp_subdev_destroy()