Lines Matching full:csi2
5 * TI OMAP3 ISP - CSI2 module
23 * csi2_if_enable - Enable CSI2 Receiver interface.
28 struct isp_csi2_device *csi2, u8 enable) in csi2_if_enable() argument
30 struct isp_csi2_ctrl_cfg *currctrl = &csi2->ctrl; in csi2_if_enable()
32 isp_reg_clr_set(isp, csi2->regs1, ISPCSI2_CTRL, ISPCSI2_CTRL_IF_EN, in csi2_if_enable()
39 * csi2_recv_config - CSI2 receiver module configuration.
44 struct isp_csi2_device *csi2, in csi2_recv_config() argument
49 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTRL); in csi2_recv_config()
74 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTRL); in csi2_recv_config()
89 /* To set the format on the CSI2 requires a mapping function that takes
95 * Output should be CSI2 frame format code
160 * csi2_ctx_map_format - Map CSI2 sink media bus format to CSI2 format ID
161 * @csi2: ISP CSI2 device
163 * Returns CSI2 physical format id
165 static u16 csi2_ctx_map_format(struct isp_csi2_device *csi2) in csi2_ctx_map_format() argument
167 const struct v4l2_mbus_framefmt *fmt = &csi2->formats[CSI2_PAD_SINK]; in csi2_ctx_map_format()
187 WARN(1, KERN_ERR "CSI2: pixel format %08x unsupported!\n", in csi2_ctx_map_format()
192 if (!(csi2->output & CSI2_OUTPUT_CCDC) && in csi2_ctx_map_format()
193 !(csi2->output & CSI2_OUTPUT_MEMORY)) { in csi2_ctx_map_format()
201 destidx = csi2->frame_skip ? 0 : !!(csi2->output & CSI2_OUTPUT_CCDC); in csi2_ctx_map_format()
202 is_3630 = csi2->isp->revision == ISP_REVISION_15_0; in csi2_ctx_map_format()
204 return __csi2_fmt_map[fmtidx][destidx][csi2->dpcm_decompress][is_3630]; in csi2_ctx_map_format()
209 * @csi2: Pointer to ISP CSI2a device.
217 static void csi2_set_outaddr(struct isp_csi2_device *csi2, u32 addr) in csi2_set_outaddr() argument
219 struct isp_device *isp = csi2->isp; in csi2_set_outaddr()
220 struct isp_csi2_ctx_cfg *ctx = &csi2->contexts[0]; in csi2_set_outaddr()
225 csi2->regs1, ISPCSI2_CTX_DAT_PING_ADDR(ctx->ctxnum)); in csi2_set_outaddr()
227 csi2->regs1, ISPCSI2_CTX_DAT_PONG_ADDR(ctx->ctxnum)); in csi2_set_outaddr()
232 * be enabled by CSI2.
242 * csi2_ctx_enable - Enable specified CSI2 context
248 struct isp_csi2_device *csi2, u8 ctxnum, u8 enable) in csi2_ctx_enable() argument
250 struct isp_csi2_ctx_cfg *ctx = &csi2->contexts[ctxnum]; in csi2_ctx_enable()
254 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL1(ctxnum)); in csi2_ctx_enable()
257 if (csi2->frame_skip) in csi2_ctx_enable()
258 skip = csi2->frame_skip; in csi2_ctx_enable()
259 else if (csi2->output & CSI2_OUTPUT_MEMORY) in csi2_ctx_enable()
270 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL1(ctxnum)); in csi2_ctx_enable()
275 * csi2_ctx_config - CSI2 context configuration.
280 struct isp_csi2_device *csi2, in csi2_ctx_config() argument
286 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL1(ctx->ctxnum)); in csi2_ctx_config()
303 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL1(ctx->ctxnum)); in csi2_ctx_config()
306 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL2(ctx->ctxnum)); in csi2_ctx_config()
326 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL2(ctx->ctxnum)); in csi2_ctx_config()
329 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_CTRL3(ctx->ctxnum)); in csi2_ctx_config()
333 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_CTX_CTRL3(ctx->ctxnum)); in csi2_ctx_config()
336 reg = isp_reg_readl(isp, csi2->regs1, in csi2_ctx_config()
340 isp_reg_writel(isp, reg, csi2->regs1, in csi2_ctx_config()
344 csi2->regs1, ISPCSI2_CTX_DAT_PING_ADDR(ctx->ctxnum)); in csi2_ctx_config()
347 csi2->regs1, ISPCSI2_CTX_DAT_PONG_ADDR(ctx->ctxnum)); in csi2_ctx_config()
351 * csi2_timing_config - CSI2 timing configuration.
355 struct isp_csi2_device *csi2, in csi2_timing_config() argument
360 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_TIMING); in csi2_timing_config()
381 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_TIMING); in csi2_timing_config()
385 * csi2_irq_ctx_set - Enables CSI2 Context IRQs.
386 * @enable: Enable/disable CSI2 Context interrupts
389 struct isp_csi2_device *csi2, int enable) in csi2_irq_ctx_set() argument
394 isp_reg_writel(isp, ISPCSI2_CTX_IRQSTATUS_FE_IRQ, csi2->regs1, in csi2_irq_ctx_set()
397 isp_reg_set(isp, csi2->regs1, ISPCSI2_CTX_IRQENABLE(i), in csi2_irq_ctx_set()
400 isp_reg_clr(isp, csi2->regs1, ISPCSI2_CTX_IRQENABLE(i), in csi2_irq_ctx_set()
406 * csi2_irq_complexio1_set - Enables CSI2 ComplexIO IRQs.
407 * @enable: Enable/disable CSI2 ComplexIO #1 interrupts
410 struct isp_csi2_device *csi2, int enable) in csi2_irq_complexio1_set() argument
440 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_PHY_IRQSTATUS); in csi2_irq_complexio1_set()
442 reg |= isp_reg_readl(isp, csi2->regs1, ISPCSI2_PHY_IRQENABLE); in csi2_irq_complexio1_set()
445 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_PHY_IRQENABLE); in csi2_irq_complexio1_set()
449 * csi2_irq_status_set - Enables CSI2 Status IRQs.
450 * @enable: Enable/disable CSI2 Status interrupts
453 struct isp_csi2_device *csi2, int enable) in csi2_irq_status_set() argument
464 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_IRQSTATUS); in csi2_irq_status_set()
466 reg |= isp_reg_readl(isp, csi2->regs1, ISPCSI2_IRQENABLE); in csi2_irq_status_set()
470 isp_reg_writel(isp, reg, csi2->regs1, ISPCSI2_IRQENABLE); in csi2_irq_status_set()
474 * omap3isp_csi2_reset - Resets the CSI2 module.
480 int omap3isp_csi2_reset(struct isp_csi2_device *csi2) in omap3isp_csi2_reset() argument
482 struct isp_device *isp = csi2->isp; in omap3isp_csi2_reset()
487 if (!csi2->available) in omap3isp_csi2_reset()
490 if (csi2->phy->entity) in omap3isp_csi2_reset()
493 isp_reg_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG, in omap3isp_csi2_reset()
497 reg = isp_reg_readl(isp, csi2->regs1, ISPCSI2_SYSSTATUS) & in omap3isp_csi2_reset()
507 dev_err(isp->dev, "CSI2: Soft reset try count exceeded!\n"); in omap3isp_csi2_reset()
512 isp_reg_set(isp, csi2->regs1, ISPCSI2_PHY_CFG, in omap3isp_csi2_reset()
517 reg = isp_reg_readl(isp, csi2->phy->phy_regs, ISPCSIPHY_REG1) in omap3isp_csi2_reset()
526 "CSI2: Reset for CSI2_96M_FCLK domain Failed!\n"); in omap3isp_csi2_reset()
531 isp_reg_clr_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG, in omap3isp_csi2_reset()
538 isp_reg_clr_set(isp, csi2->regs1, ISPCSI2_SYSCONFIG, in omap3isp_csi2_reset()
546 static int csi2_configure(struct isp_csi2_device *csi2) in csi2_configure() argument
548 struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); in csi2_configure()
550 struct isp_device *isp = csi2->isp; in csi2_configure()
551 struct isp_csi2_timing_cfg *timing = &csi2->timing[0]; in csi2_configure()
556 * CSI2 fields that can be updated while the context has in csi2_configure()
561 if (csi2->contexts[0].enabled || csi2->ctrl.if_enable) in csi2_configure()
564 pad = media_pad_remote_pad_first(&csi2->pads[CSI2_PAD_SINK]); in csi2_configure()
570 csi2->frame_skip = 0; in csi2_configure()
571 v4l2_subdev_call(sensor, sensor, g_skip_frames, &csi2->frame_skip); in csi2_configure()
573 csi2->ctrl.vp_out_ctrl = in csi2_configure()
578 csi2->ctrl.vp_out_ctrl); in csi2_configure()
579 csi2->ctrl.frame_mode = ISP_CSI2_FRAME_IMMEDIATE; in csi2_configure()
580 csi2->ctrl.ecc_enable = buscfg->bus.csi2.crc; in csi2_configure()
589 * The CSI2 receiver can't do any format conversion except DPCM in csi2_configure()
593 if (csi2->formats[CSI2_PAD_SINK].code != in csi2_configure()
594 csi2->formats[CSI2_PAD_SOURCE].code) in csi2_configure()
595 csi2->dpcm_decompress = true; in csi2_configure()
597 csi2->dpcm_decompress = false; in csi2_configure()
599 csi2->contexts[0].format_id = csi2_ctx_map_format(csi2); in csi2_configure()
601 if (csi2->video_out.bpl_padding == 0) in csi2_configure()
602 csi2->contexts[0].data_offset = 0; in csi2_configure()
604 csi2->contexts[0].data_offset = csi2->video_out.bpl_value; in csi2_configure()
608 * context 0. These signals are generated from CSI2 receiver to in csi2_configure()
610 * Without enabling the signals CSI2 receiver writes data to memory in csi2_configure()
613 csi2->contexts[0].eof_enabled = 1; in csi2_configure()
614 csi2->contexts[0].eol_enabled = 1; in csi2_configure()
616 csi2_irq_complexio1_set(isp, csi2, 1); in csi2_configure()
617 csi2_irq_ctx_set(isp, csi2, 1); in csi2_configure()
618 csi2_irq_status_set(isp, csi2, 1); in csi2_configure()
621 csi2_timing_config(isp, csi2, timing); in csi2_configure()
622 csi2_recv_config(isp, csi2, &csi2->ctrl); in csi2_configure()
623 csi2_ctx_config(isp, csi2, &csi2->contexts[0]); in csi2_configure()
629 * csi2_print_status - Prints CSI2 debug information.
632 dev_dbg(isp->dev, "###CSI2 " #name "=0x%08x\n", \
635 static void csi2_print_status(struct isp_csi2_device *csi2) in csi2_print_status() argument
637 struct isp_device *isp = csi2->isp; in csi2_print_status()
639 if (!csi2->available) in csi2_print_status()
642 dev_dbg(isp->dev, "-------------CSI2 Register dump-------------\n"); in csi2_print_status()
644 CSI2_PRINT_REGISTER(isp, csi2->regs1, SYSCONFIG); in csi2_print_status()
645 CSI2_PRINT_REGISTER(isp, csi2->regs1, SYSSTATUS); in csi2_print_status()
646 CSI2_PRINT_REGISTER(isp, csi2->regs1, IRQENABLE); in csi2_print_status()
647 CSI2_PRINT_REGISTER(isp, csi2->regs1, IRQSTATUS); in csi2_print_status()
648 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTRL); in csi2_print_status()
649 CSI2_PRINT_REGISTER(isp, csi2->regs1, DBG_H); in csi2_print_status()
650 CSI2_PRINT_REGISTER(isp, csi2->regs1, GNQ); in csi2_print_status()
651 CSI2_PRINT_REGISTER(isp, csi2->regs1, PHY_CFG); in csi2_print_status()
652 CSI2_PRINT_REGISTER(isp, csi2->regs1, PHY_IRQSTATUS); in csi2_print_status()
653 CSI2_PRINT_REGISTER(isp, csi2->regs1, SHORT_PACKET); in csi2_print_status()
654 CSI2_PRINT_REGISTER(isp, csi2->regs1, PHY_IRQENABLE); in csi2_print_status()
655 CSI2_PRINT_REGISTER(isp, csi2->regs1, DBG_P); in csi2_print_status()
656 CSI2_PRINT_REGISTER(isp, csi2->regs1, TIMING); in csi2_print_status()
657 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_CTRL1(0)); in csi2_print_status()
658 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_CTRL2(0)); in csi2_print_status()
659 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_DAT_OFST(0)); in csi2_print_status()
660 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_DAT_PING_ADDR(0)); in csi2_print_status()
661 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_DAT_PONG_ADDR(0)); in csi2_print_status()
662 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_IRQENABLE(0)); in csi2_print_status()
663 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_IRQSTATUS(0)); in csi2_print_status()
664 CSI2_PRINT_REGISTER(isp, csi2->regs1, CTX_CTRL3(0)); in csi2_print_status()
677 static void csi2_isr_buffer(struct isp_csi2_device *csi2) in csi2_isr_buffer() argument
679 struct isp_device *isp = csi2->isp; in csi2_isr_buffer()
682 csi2_ctx_enable(isp, csi2, 0, 0); in csi2_isr_buffer()
684 buffer = omap3isp_video_buffer_next(&csi2->video_out); in csi2_isr_buffer()
693 csi2_set_outaddr(csi2, buffer->dma); in csi2_isr_buffer()
694 csi2_ctx_enable(isp, csi2, 0, 1); in csi2_isr_buffer()
697 static void csi2_isr_ctx(struct isp_csi2_device *csi2, in csi2_isr_ctx() argument
700 struct isp_device *isp = csi2->isp; in csi2_isr_ctx()
704 status = isp_reg_readl(isp, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(n)); in csi2_isr_ctx()
705 isp_reg_writel(isp, status, csi2->regs1, ISPCSI2_CTX_IRQSTATUS(n)); in csi2_isr_ctx()
710 /* Skip interrupts until we reach the frame skip count. The CSI2 will be in csi2_isr_ctx()
715 * but it turned out that the interrupt is only generated when the CSI2 in csi2_isr_ctx()
718 * but no interrupt arrives). Maybe a CSI2 hardware bug. in csi2_isr_ctx()
720 if (csi2->frame_skip) { in csi2_isr_ctx()
721 csi2->frame_skip--; in csi2_isr_ctx()
722 if (csi2->frame_skip == 0) { in csi2_isr_ctx()
723 ctx->format_id = csi2_ctx_map_format(csi2); in csi2_isr_ctx()
724 csi2_ctx_config(isp, csi2, ctx); in csi2_isr_ctx()
725 csi2_ctx_enable(isp, csi2, n, 1); in csi2_isr_ctx()
730 if (csi2->output & CSI2_OUTPUT_MEMORY) in csi2_isr_ctx()
731 csi2_isr_buffer(csi2); in csi2_isr_ctx()
735 * omap3isp_csi2_isr - CSI2 interrupt handling.
737 void omap3isp_csi2_isr(struct isp_csi2_device *csi2) in omap3isp_csi2_isr() argument
739 struct isp_pipeline *pipe = to_isp_pipeline(&csi2->subdev.entity); in omap3isp_csi2_isr()
741 struct isp_device *isp = csi2->isp; in omap3isp_csi2_isr()
743 if (!csi2->available) in omap3isp_csi2_isr()
746 csi2_irqstatus = isp_reg_readl(isp, csi2->regs1, ISPCSI2_IRQSTATUS); in omap3isp_csi2_isr()
747 isp_reg_writel(isp, csi2_irqstatus, csi2->regs1, ISPCSI2_IRQSTATUS); in omap3isp_csi2_isr()
751 cpxio1_irqstatus = isp_reg_readl(isp, csi2->regs1, in omap3isp_csi2_isr()
754 csi2->regs1, ISPCSI2_PHY_IRQSTATUS); in omap3isp_csi2_isr()
755 dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ %x\n", in omap3isp_csi2_isr()
766 "CSI2 Err: OCP:%d, Short_pack:%d, ECC:%d, CPXIO2:%d, FIFO_OVF:%d,\n", in omap3isp_csi2_isr()
780 if (omap3isp_module_sync_is_stopping(&csi2->wait, &csi2->stopping)) in omap3isp_csi2_isr()
785 csi2_isr_ctx(csi2, &csi2->contexts[0]); in omap3isp_csi2_isr()
788 dev_dbg(isp->dev, "CSI2: ECC correction done\n"); in omap3isp_csi2_isr()
803 struct isp_csi2_device *csi2 = &isp->isp_csi2a; in csi2_queue() local
805 csi2_set_outaddr(csi2, buffer->dma); in csi2_queue()
813 if (csi2->video_out.dmaqueue_flags & ISP_VIDEO_DMAQUEUE_UNDERRUN) { in csi2_queue()
815 csi2_if_enable(isp, csi2, 1); in csi2_queue()
816 csi2_ctx_enable(isp, csi2, 0, 1); in csi2_queue()
817 isp_video_dmaqueue_flags_clr(&csi2->video_out); in csi2_queue()
832 __csi2_get_format(struct isp_csi2_device *csi2, in __csi2_get_format() argument
839 return &csi2->formats[pad]; in __csi2_get_format()
843 csi2_try_format(struct isp_csi2_device *csi2, in csi2_try_format() argument
874 format = __csi2_get_format(csi2, sd_state, CSI2_PAD_SINK, in csi2_try_format()
904 struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); in csi2_enum_mbus_code() local
914 format = __csi2_get_format(csi2, sd_state, CSI2_PAD_SINK, in csi2_enum_mbus_code()
941 struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); in csi2_enum_frame_size() local
950 csi2_try_format(csi2, sd_state, fse->pad, &format, fse->which); in csi2_enum_frame_size()
960 csi2_try_format(csi2, sd_state, fse->pad, &format, fse->which); in csi2_enum_frame_size()
978 struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); in csi2_get_format() local
981 format = __csi2_get_format(csi2, sd_state, fmt->pad, fmt->which); in csi2_get_format()
1000 struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); in csi2_set_format() local
1003 format = __csi2_get_format(csi2, sd_state, fmt->pad, fmt->which); in csi2_set_format()
1007 csi2_try_format(csi2, sd_state, fmt->pad, &fmt->format, fmt->which); in csi2_set_format()
1012 format = __csi2_get_format(csi2, sd_state, CSI2_PAD_SOURCE, in csi2_set_format()
1015 csi2_try_format(csi2, sd_state, CSI2_PAD_SOURCE, format, in csi2_set_format()
1024 * @sd: ISP CSI2 V4L2 subdevice
1047 * csi2_set_stream - Enable/Disable streaming on the CSI2 module
1048 * @sd: ISP CSI2 V4L2 subdevice
1055 struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); in csi2_set_stream() local
1056 struct isp_device *isp = csi2->isp; in csi2_set_stream()
1057 struct isp_video *video_out = &csi2->video_out; in csi2_set_stream()
1061 if (omap3isp_csiphy_acquire(csi2->phy, &sd->entity) < 0) in csi2_set_stream()
1063 if (csi2->output & CSI2_OUTPUT_MEMORY) in csi2_set_stream()
1065 csi2_configure(csi2); in csi2_set_stream()
1066 csi2_print_status(csi2); in csi2_set_stream()
1074 if (csi2->output & CSI2_OUTPUT_MEMORY && in csi2_set_stream()
1078 atomic_set(&csi2->stopping, 0); in csi2_set_stream()
1079 csi2_ctx_enable(isp, csi2, 0, 1); in csi2_set_stream()
1080 csi2_if_enable(isp, csi2, 1); in csi2_set_stream()
1085 if (csi2->state == ISP_PIPELINE_STREAM_STOPPED) in csi2_set_stream()
1087 if (omap3isp_module_sync_idle(&sd->entity, &csi2->wait, in csi2_set_stream()
1088 &csi2->stopping)) in csi2_set_stream()
1091 csi2_ctx_enable(isp, csi2, 0, 0); in csi2_set_stream()
1092 csi2_if_enable(isp, csi2, 0); in csi2_set_stream()
1093 csi2_irq_ctx_set(isp, csi2, 0); in csi2_set_stream()
1094 omap3isp_csiphy_release(csi2->phy); in csi2_set_stream()
1100 csi2->state = enable; in csi2_set_stream()
1133 * csi2_link_setup - Setup CSI2 connections.
1145 struct isp_csi2_device *csi2 = v4l2_get_subdevdata(sd); in csi2_link_setup() local
1146 struct isp_csi2_ctrl_cfg *ctrl = &csi2->ctrl; in csi2_link_setup()
1161 if (csi2->output & ~CSI2_OUTPUT_MEMORY) in csi2_link_setup()
1163 csi2->output |= CSI2_OUTPUT_MEMORY; in csi2_link_setup()
1165 csi2->output &= ~CSI2_OUTPUT_MEMORY; in csi2_link_setup()
1171 if (csi2->output & ~CSI2_OUTPUT_CCDC) in csi2_link_setup()
1173 csi2->output |= CSI2_OUTPUT_CCDC; in csi2_link_setup()
1175 csi2->output &= ~CSI2_OUTPUT_CCDC; in csi2_link_setup()
1180 /* Link from camera to CSI2 is fixed... */ in csi2_link_setup()
1185 (csi2->output & CSI2_OUTPUT_MEMORY) ? false : true; in csi2_link_setup()
1186 ctrl->vp_clk_enable = !!(csi2->output & CSI2_OUTPUT_CCDC); in csi2_link_setup()
1197 void omap3isp_csi2_unregister_entities(struct isp_csi2_device *csi2) in omap3isp_csi2_unregister_entities() argument
1199 v4l2_device_unregister_subdev(&csi2->subdev); in omap3isp_csi2_unregister_entities()
1200 omap3isp_video_unregister(&csi2->video_out); in omap3isp_csi2_unregister_entities()
1203 int omap3isp_csi2_register_entities(struct isp_csi2_device *csi2, in omap3isp_csi2_register_entities() argument
1209 csi2->subdev.dev = vdev->mdev->dev; in omap3isp_csi2_register_entities()
1210 ret = v4l2_device_register_subdev(vdev, &csi2->subdev); in omap3isp_csi2_register_entities()
1214 ret = omap3isp_video_register(&csi2->video_out, vdev); in omap3isp_csi2_register_entities()
1221 omap3isp_csi2_unregister_entities(csi2); in omap3isp_csi2_register_entities()
1226 * ISP CSI2 initialisation and cleanup
1231 * @csi2: Pointer to csi2 structure.
1234 static int csi2_init_entities(struct isp_csi2_device *csi2) in csi2_init_entities() argument
1236 struct v4l2_subdev *sd = &csi2->subdev; in csi2_init_entities()
1237 struct media_pad *pads = csi2->pads; in csi2_init_entities()
1246 v4l2_set_subdevdata(sd, csi2); in csi2_init_entities()
1261 csi2->video_out.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in csi2_init_entities()
1262 csi2->video_out.ops = &csi2_ispvideo_ops; in csi2_init_entities()
1263 csi2->video_out.bpl_alignment = 32; in csi2_init_entities()
1264 csi2->video_out.bpl_zero_padding = 1; in csi2_init_entities()
1265 csi2->video_out.bpl_max = 0x1ffe0; in csi2_init_entities()
1266 csi2->video_out.isp = csi2->isp; in csi2_init_entities()
1267 csi2->video_out.capture_mem = PAGE_ALIGN(4096 * 4096) * 3; in csi2_init_entities()
1269 ret = omap3isp_video_init(&csi2->video_out, "CSI2a"); in csi2_init_entities()
1276 media_entity_cleanup(&csi2->subdev.entity); in csi2_init_entities()