Lines Matching refs:prev

149 preview_config_luma_enhancement(struct isp_prev_device *prev,  in preview_config_luma_enhancement()  argument
152 struct isp_device *isp = to_isp_device(prev); in preview_config_luma_enhancement()
168 preview_enable_luma_enhancement(struct isp_prev_device *prev, bool enable) in preview_enable_luma_enhancement() argument
170 struct isp_device *isp = to_isp_device(prev); in preview_enable_luma_enhancement()
183 static void preview_enable_invalaw(struct isp_prev_device *prev, bool enable) in preview_enable_invalaw() argument
185 struct isp_device *isp = to_isp_device(prev); in preview_enable_invalaw()
198 static void preview_config_hmed(struct isp_prev_device *prev, in preview_config_hmed() argument
201 struct isp_device *isp = to_isp_device(prev); in preview_config_hmed()
213 static void preview_enable_hmed(struct isp_prev_device *prev, bool enable) in preview_enable_hmed() argument
215 struct isp_device *isp = to_isp_device(prev); in preview_enable_hmed()
233 static void preview_config_cfa(struct isp_prev_device *prev, in preview_config_cfa() argument
242 const unsigned int *order = cfa_coef_order[prev->params.cfa_order]; in preview_config_cfa()
244 struct isp_device *isp = to_isp_device(prev); in preview_config_cfa()
269 preview_config_chroma_suppression(struct isp_prev_device *prev, in preview_config_chroma_suppression() argument
272 struct isp_device *isp = to_isp_device(prev); in preview_config_chroma_suppression()
285 preview_enable_chroma_suppression(struct isp_prev_device *prev, bool enable) in preview_enable_chroma_suppression() argument
287 struct isp_device *isp = to_isp_device(prev); in preview_enable_chroma_suppression()
303 preview_config_whitebalance(struct isp_prev_device *prev, in preview_config_whitebalance() argument
306 struct isp_device *isp = to_isp_device(prev); in preview_config_whitebalance()
342 preview_config_blkadj(struct isp_prev_device *prev, in preview_config_blkadj() argument
345 struct isp_device *isp = to_isp_device(prev); in preview_config_blkadj()
358 preview_config_rgb_blending(struct isp_prev_device *prev, in preview_config_rgb_blending() argument
361 struct isp_device *isp = to_isp_device(prev); in preview_config_rgb_blending()
396 preview_config_csc(struct isp_prev_device *prev, in preview_config_csc() argument
399 struct isp_device *isp = to_isp_device(prev); in preview_config_csc()
428 preview_config_yc_range(struct isp_prev_device *prev, in preview_config_yc_range() argument
431 struct isp_device *isp = to_isp_device(prev); in preview_config_yc_range()
446 preview_config_dcor(struct isp_prev_device *prev, in preview_config_dcor() argument
449 struct isp_device *isp = to_isp_device(prev); in preview_config_dcor()
468 static void preview_enable_dcor(struct isp_prev_device *prev, bool enable) in preview_enable_dcor() argument
470 struct isp_device *isp = to_isp_device(prev); in preview_enable_dcor()
484 preview_enable_drkframe_capture(struct isp_prev_device *prev, bool enable) in preview_enable_drkframe_capture() argument
486 struct isp_device *isp = to_isp_device(prev); in preview_enable_drkframe_capture()
499 static void preview_enable_drkframe(struct isp_prev_device *prev, bool enable) in preview_enable_drkframe() argument
501 struct isp_device *isp = to_isp_device(prev); in preview_enable_drkframe()
515 preview_config_noisefilter(struct isp_prev_device *prev, in preview_config_noisefilter() argument
518 struct isp_device *isp = to_isp_device(prev); in preview_config_noisefilter()
535 preview_enable_noisefilter(struct isp_prev_device *prev, bool enable) in preview_enable_noisefilter() argument
537 struct isp_device *isp = to_isp_device(prev); in preview_enable_noisefilter()
551 preview_config_gammacorrn(struct isp_prev_device *prev, in preview_config_gammacorrn() argument
554 struct isp_device *isp = to_isp_device(prev); in preview_config_gammacorrn()
584 preview_enable_gammacorrn(struct isp_prev_device *prev, bool enable) in preview_enable_gammacorrn() argument
586 struct isp_device *isp = to_isp_device(prev); in preview_enable_gammacorrn()
602 preview_config_contrast(struct isp_prev_device *prev, in preview_config_contrast() argument
605 struct isp_device *isp = to_isp_device(prev); in preview_config_contrast()
616 preview_config_brightness(struct isp_prev_device *prev, in preview_config_brightness() argument
619 struct isp_device *isp = to_isp_device(prev); in preview_config_brightness()
633 preview_update_contrast(struct isp_prev_device *prev, u8 contrast) in preview_update_contrast() argument
638 spin_lock_irqsave(&prev->params.lock, flags); in preview_update_contrast()
639 params = (prev->params.active & OMAP3ISP_PREV_CONTRAST) in preview_update_contrast()
640 ? &prev->params.params[0] : &prev->params.params[1]; in preview_update_contrast()
646 spin_unlock_irqrestore(&prev->params.lock, flags); in preview_update_contrast()
655 preview_update_brightness(struct isp_prev_device *prev, u8 brightness) in preview_update_brightness() argument
660 spin_lock_irqsave(&prev->params.lock, flags); in preview_update_brightness()
661 params = (prev->params.active & OMAP3ISP_PREV_BRIGHTNESS) in preview_update_brightness()
662 ? &prev->params.params[0] : &prev->params.params[1]; in preview_update_brightness()
668 spin_unlock_irqrestore(&prev->params.lock, flags); in preview_update_brightness()
672 preview_params_lock(struct isp_prev_device *prev, u32 update, bool shadow) in preview_params_lock() argument
674 u32 active = prev->params.active; in preview_params_lock()
678 prev->params.params[0].busy |= ~active & update; in preview_params_lock()
679 prev->params.params[1].busy |= active & update; in preview_params_lock()
682 update = (prev->params.params[0].update & active) in preview_params_lock()
683 | (prev->params.params[1].update & ~active); in preview_params_lock()
685 prev->params.params[0].busy |= active & update; in preview_params_lock()
686 prev->params.params[1].busy |= ~active & update; in preview_params_lock()
693 preview_params_unlock(struct isp_prev_device *prev, u32 update, bool shadow) in preview_params_unlock() argument
695 u32 active = prev->params.active; in preview_params_unlock()
701 prev->params.params[0].update |= (~active & update); in preview_params_unlock()
702 prev->params.params[1].update |= (active & update); in preview_params_unlock()
703 prev->params.params[0].busy &= active; in preview_params_unlock()
704 prev->params.params[1].busy &= ~active; in preview_params_unlock()
709 prev->params.params[0].update &= ~(active & update); in preview_params_unlock()
710 prev->params.params[1].update &= ~(~active & update); in preview_params_unlock()
711 prev->params.params[0].busy &= ~active; in preview_params_unlock()
712 prev->params.params[1].busy &= active; in preview_params_unlock()
716 static void preview_params_switch(struct isp_prev_device *prev) in preview_params_switch() argument
724 to_switch = (prev->params.params[0].update & ~prev->params.active) in preview_params_switch()
725 | (prev->params.params[1].update & prev->params.active); in preview_params_switch()
726 to_switch &= ~(prev->params.params[0].busy | in preview_params_switch()
727 prev->params.params[1].busy); in preview_params_switch()
731 prev->params.active ^= to_switch; in preview_params_switch()
736 prev->params.params[0].update &= ~(~prev->params.active & to_switch); in preview_params_switch()
737 prev->params.params[1].update &= ~(prev->params.active & to_switch); in preview_params_switch()
859 static int preview_config(struct isp_prev_device *prev, in preview_config() argument
872 spin_lock_irqsave(&prev->params.lock, flags); in preview_config()
873 preview_params_lock(prev, cfg->update, true); in preview_config()
874 active = prev->params.active; in preview_config()
875 spin_unlock_irqrestore(&prev->params.lock, flags); in preview_config()
887 params = &prev->params.params[!!(active & bit)]; in preview_config()
909 spin_lock_irqsave(&prev->params.lock, flags); in preview_config()
910 preview_params_unlock(prev, update, true); in preview_config()
911 preview_params_switch(prev); in preview_config()
912 spin_unlock_irqrestore(&prev->params.lock, flags); in preview_config()
925 static void preview_setup_hw(struct isp_prev_device *prev, u32 update, in preview_setup_hw() argument
941 params = &prev->params.params[!(active & bit)]; in preview_setup_hw()
945 attr->config(prev, params); in preview_setup_hw()
947 attr->enable(prev, true); in preview_setup_hw()
950 attr->enable(prev, false); in preview_setup_hw()
960 static void preview_config_ycpos(struct isp_prev_device *prev, u32 pixelcode) in preview_config_ycpos() argument
962 struct isp_device *isp = to_isp_device(prev); in preview_config_ycpos()
985 static void preview_config_averager(struct isp_prev_device *prev, u8 average) in preview_config_averager() argument
987 struct isp_device *isp = to_isp_device(prev); in preview_config_averager()
1008 static void preview_config_input_format(struct isp_prev_device *prev, in preview_config_input_format() argument
1011 struct isp_device *isp = to_isp_device(prev); in preview_config_input_format()
1023 prev->params.cfa_order = 0; in preview_config_input_format()
1026 prev->params.cfa_order = 1; in preview_config_input_format()
1029 prev->params.cfa_order = 2; in preview_config_input_format()
1032 prev->params.cfa_order = 3; in preview_config_input_format()
1045 params = (prev->params.active & OMAP3ISP_PREV_CFA) in preview_config_input_format()
1046 ? &prev->params.params[0] : &prev->params.params[1]; in preview_config_input_format()
1048 preview_config_cfa(prev, params); in preview_config_input_format()
1062 static void preview_config_input_size(struct isp_prev_device *prev, u32 active) in preview_config_input_size() argument
1064 const struct v4l2_mbus_framefmt *format = &prev->formats[PREV_PAD_SINK]; in preview_config_input_size()
1065 struct isp_device *isp = to_isp_device(prev); in preview_config_input_size()
1066 unsigned int sph = prev->crop.left; in preview_config_input_size()
1067 unsigned int eph = prev->crop.left + prev->crop.width - 1; in preview_config_input_size()
1068 unsigned int slv = prev->crop.top; in preview_config_input_size()
1069 unsigned int elv = prev->crop.top + prev->crop.height - 1; in preview_config_input_size()
1080 features = (prev->params.params[0].features & active) in preview_config_input_size()
1081 | (prev->params.params[1].features & ~active); in preview_config_input_size()
1113 preview_config_inlineoffset(struct isp_prev_device *prev, u32 offset) in preview_config_inlineoffset() argument
1115 struct isp_device *isp = to_isp_device(prev); in preview_config_inlineoffset()
1127 static void preview_set_inaddr(struct isp_prev_device *prev, u32 addr) in preview_set_inaddr() argument
1129 struct isp_device *isp = to_isp_device(prev); in preview_set_inaddr()
1140 static void preview_config_outlineoffset(struct isp_prev_device *prev, in preview_config_outlineoffset() argument
1143 struct isp_device *isp = to_isp_device(prev); in preview_config_outlineoffset()
1155 static void preview_set_outaddr(struct isp_prev_device *prev, u32 addr) in preview_set_outaddr() argument
1157 struct isp_device *isp = to_isp_device(prev); in preview_set_outaddr()
1162 static void preview_adjust_bandwidth(struct isp_prev_device *prev) in preview_adjust_bandwidth() argument
1164 struct isp_pipeline *pipe = to_isp_pipeline(&prev->subdev.entity); in preview_adjust_bandwidth()
1165 struct isp_device *isp = to_isp_device(prev); in preview_adjust_bandwidth()
1166 const struct v4l2_mbus_framefmt *ifmt = &prev->formats[PREV_PAD_SINK]; in preview_adjust_bandwidth()
1176 if (prev->input != PREVIEW_INPUT_MEMORY) { in preview_adjust_bandwidth()
1215 int omap3isp_preview_busy(struct isp_prev_device *prev) in omap3isp_preview_busy() argument
1217 struct isp_device *isp = to_isp_device(prev); in omap3isp_preview_busy()
1228 struct isp_prev_device *prev = &isp->isp_prev; in omap3isp_preview_restore_context() local
1231 prev->params.params[0].update = prev->params.active & update; in omap3isp_preview_restore_context()
1232 prev->params.params[1].update = ~prev->params.active & update; in omap3isp_preview_restore_context()
1234 preview_setup_hw(prev, update, prev->params.active); in omap3isp_preview_restore_context()
1236 prev->params.params[0].update = 0; in omap3isp_preview_restore_context()
1237 prev->params.params[1].update = 0; in omap3isp_preview_restore_context()
1247 static void preview_print_status(struct isp_prev_device *prev) in preview_print_status() argument
1249 struct isp_device *isp = to_isp_device(prev); in preview_print_status()
1297 static void preview_init_params(struct isp_prev_device *prev) in preview_init_params() argument
1302 spin_lock_init(&prev->params.lock); in preview_init_params()
1304 prev->params.active = ~0; in preview_init_params()
1305 prev->params.params[0].busy = 0; in preview_init_params()
1306 prev->params.params[0].update = OMAP3ISP_PREV_FEATURES_END - 1; in preview_init_params()
1307 prev->params.params[1].busy = 0; in preview_init_params()
1308 prev->params.params[1].update = 0; in preview_init_params()
1310 params = &prev->params.params[0]; in preview_init_params()
1361 static unsigned int preview_max_out_width(struct isp_prev_device *prev) in preview_max_out_width() argument
1363 struct isp_device *isp = to_isp_device(prev); in preview_max_out_width()
1378 static void preview_configure(struct isp_prev_device *prev) in preview_configure() argument
1380 struct isp_device *isp = to_isp_device(prev); in preview_configure()
1387 spin_lock_irqsave(&prev->params.lock, flags); in preview_configure()
1389 update = preview_params_lock(prev, 0, false); in preview_configure()
1390 active = prev->params.active; in preview_configure()
1391 spin_unlock_irqrestore(&prev->params.lock, flags); in preview_configure()
1394 format = &prev->formats[PREV_PAD_SINK]; in preview_configure()
1397 preview_adjust_bandwidth(prev); in preview_configure()
1399 preview_config_input_format(prev, info); in preview_configure()
1400 preview_config_input_size(prev, active); in preview_configure()
1402 if (prev->input == PREVIEW_INPUT_CCDC) in preview_configure()
1403 preview_config_inlineoffset(prev, 0); in preview_configure()
1405 preview_config_inlineoffset(prev, ALIGN(format->width, 0x20) * in preview_configure()
1408 preview_setup_hw(prev, update, active); in preview_configure()
1411 format = &prev->formats[PREV_PAD_SOURCE]; in preview_configure()
1413 if (prev->output & PREVIEW_OUTPUT_MEMORY) in preview_configure()
1420 if (prev->output & PREVIEW_OUTPUT_RESIZER) in preview_configure()
1427 if (prev->output & PREVIEW_OUTPUT_MEMORY) in preview_configure()
1428 preview_config_outlineoffset(prev, in preview_configure()
1431 preview_config_averager(prev, 0); in preview_configure()
1432 preview_config_ycpos(prev, format->code); in preview_configure()
1434 spin_lock_irqsave(&prev->params.lock, flags); in preview_configure()
1435 preview_params_unlock(prev, update, false); in preview_configure()
1436 spin_unlock_irqrestore(&prev->params.lock, flags); in preview_configure()
1443 static void preview_enable_oneshot(struct isp_prev_device *prev) in preview_enable_oneshot() argument
1445 struct isp_device *isp = to_isp_device(prev); in preview_enable_oneshot()
1451 if (prev->input == PREVIEW_INPUT_MEMORY) in preview_enable_oneshot()
1459 void omap3isp_preview_isr_frame_sync(struct isp_prev_device *prev) in omap3isp_preview_isr_frame_sync() argument
1467 if (prev->state == ISP_PIPELINE_STREAM_CONTINUOUS && in omap3isp_preview_isr_frame_sync()
1468 prev->video_out.dmaqueue_flags & ISP_VIDEO_DMAQUEUE_QUEUED) { in omap3isp_preview_isr_frame_sync()
1469 preview_enable_oneshot(prev); in omap3isp_preview_isr_frame_sync()
1470 isp_video_dmaqueue_flags_clr(&prev->video_out); in omap3isp_preview_isr_frame_sync()
1474 static void preview_isr_buffer(struct isp_prev_device *prev) in preview_isr_buffer() argument
1476 struct isp_pipeline *pipe = to_isp_pipeline(&prev->subdev.entity); in preview_isr_buffer()
1480 if (prev->output & PREVIEW_OUTPUT_MEMORY) { in preview_isr_buffer()
1481 buffer = omap3isp_video_buffer_next(&prev->video_out); in preview_isr_buffer()
1483 preview_set_outaddr(prev, buffer->dma); in preview_isr_buffer()
1489 if (prev->input == PREVIEW_INPUT_MEMORY) { in preview_isr_buffer()
1490 buffer = omap3isp_video_buffer_next(&prev->video_in); in preview_isr_buffer()
1492 preview_set_inaddr(prev, buffer->dma); in preview_isr_buffer()
1496 switch (prev->state) { in preview_isr_buffer()
1508 preview_enable_oneshot(prev); in preview_isr_buffer()
1522 void omap3isp_preview_isr(struct isp_prev_device *prev) in omap3isp_preview_isr() argument
1528 if (omap3isp_module_sync_is_stopping(&prev->wait, &prev->stopping)) in omap3isp_preview_isr()
1531 spin_lock_irqsave(&prev->params.lock, flags); in omap3isp_preview_isr()
1532 preview_params_switch(prev); in omap3isp_preview_isr()
1533 update = preview_params_lock(prev, 0, false); in omap3isp_preview_isr()
1534 active = prev->params.active; in omap3isp_preview_isr()
1535 spin_unlock_irqrestore(&prev->params.lock, flags); in omap3isp_preview_isr()
1537 preview_setup_hw(prev, update, active); in omap3isp_preview_isr()
1538 preview_config_input_size(prev, active); in omap3isp_preview_isr()
1540 if (prev->input == PREVIEW_INPUT_MEMORY || in omap3isp_preview_isr()
1541 prev->output & PREVIEW_OUTPUT_MEMORY) in omap3isp_preview_isr()
1542 preview_isr_buffer(prev); in omap3isp_preview_isr()
1543 else if (prev->state == ISP_PIPELINE_STREAM_CONTINUOUS) in omap3isp_preview_isr()
1544 preview_enable_oneshot(prev); in omap3isp_preview_isr()
1546 spin_lock_irqsave(&prev->params.lock, flags); in omap3isp_preview_isr()
1547 preview_params_unlock(prev, update, false); in omap3isp_preview_isr()
1548 spin_unlock_irqrestore(&prev->params.lock, flags); in omap3isp_preview_isr()
1558 struct isp_prev_device *prev = &video->isp->isp_prev; in preview_video_queue() local
1561 preview_set_inaddr(prev, buffer->dma); in preview_video_queue()
1564 preview_set_outaddr(prev, buffer->dma); in preview_video_queue()
1583 struct isp_prev_device *prev = in preview_s_ctrl() local
1588 preview_update_brightness(prev, ctrl->val); in preview_s_ctrl()
1591 preview_update_contrast(prev, ctrl->val); in preview_s_ctrl()
1611 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_ioctl() local
1615 return preview_config(prev, arg); in preview_ioctl()
1630 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_set_stream() local
1631 struct isp_video *video_out = &prev->video_out; in preview_set_stream()
1632 struct isp_device *isp = to_isp_device(prev); in preview_set_stream()
1633 struct device *dev = to_device(prev); in preview_set_stream()
1635 if (prev->state == ISP_PIPELINE_STREAM_STOPPED) { in preview_set_stream()
1640 preview_configure(prev); in preview_set_stream()
1641 atomic_set(&prev->stopping, 0); in preview_set_stream()
1642 preview_print_status(prev); in preview_set_stream()
1647 if (prev->output & PREVIEW_OUTPUT_MEMORY) in preview_set_stream()
1651 !(prev->output & PREVIEW_OUTPUT_MEMORY)) in preview_set_stream()
1652 preview_enable_oneshot(prev); in preview_set_stream()
1658 if (prev->input == PREVIEW_INPUT_MEMORY) in preview_set_stream()
1660 if (prev->output & PREVIEW_OUTPUT_MEMORY) in preview_set_stream()
1663 preview_enable_oneshot(prev); in preview_set_stream()
1667 if (omap3isp_module_sync_idle(&sd->entity, &prev->wait, in preview_set_stream()
1668 &prev->stopping)) in preview_set_stream()
1677 prev->state = enable; in preview_set_stream()
1682 __preview_get_format(struct isp_prev_device *prev, in __preview_get_format() argument
1689 return &prev->formats[pad]; in __preview_get_format()
1693 __preview_get_crop(struct isp_prev_device *prev, in __preview_get_crop() argument
1700 return &prev->crop; in __preview_get_crop()
1733 static void preview_try_format(struct isp_prev_device *prev, in preview_try_format() argument
1754 if (prev->input == PREVIEW_INPUT_MEMORY) { in preview_try_format()
1756 preview_max_out_width(prev)); in preview_try_format()
1776 *fmt = *__preview_get_format(prev, sd_state, PREV_PAD_SINK, in preview_try_format()
1795 crop = __preview_get_crop(prev, sd_state, which); in preview_try_format()
1818 static void preview_try_crop(struct isp_prev_device *prev, in preview_try_crop() argument
1832 if (prev->input == PREVIEW_INPUT_CCDC) { in preview_try_crop()
1896 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_enum_frame_size() local
1905 preview_try_format(prev, sd_state, fse->pad, &format, fse->which); in preview_enum_frame_size()
1915 preview_try_format(prev, sd_state, fse->pad, &format, fse->which); in preview_enum_frame_size()
1936 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_get_selection() local
1949 format = __preview_get_format(prev, sd_state, PREV_PAD_SINK, in preview_get_selection()
1951 preview_try_crop(prev, format, &sel->r); in preview_get_selection()
1955 sel->r = *__preview_get_crop(prev, sd_state, sel->which); in preview_get_selection()
1979 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_set_selection() local
1987 if (prev->state != ISP_PIPELINE_STREAM_STOPPED) in preview_set_selection()
1995 sel->r = *__preview_get_crop(prev, sd_state, sel->which); in preview_set_selection()
1999 format = __preview_get_format(prev, sd_state, PREV_PAD_SINK, in preview_set_selection()
2001 preview_try_crop(prev, format, &sel->r); in preview_set_selection()
2002 *__preview_get_crop(prev, sd_state, sel->which) = sel->r; in preview_set_selection()
2005 format = __preview_get_format(prev, sd_state, PREV_PAD_SOURCE, in preview_set_selection()
2007 preview_try_format(prev, sd_state, PREV_PAD_SOURCE, format, in preview_set_selection()
2024 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_get_format() local
2027 format = __preview_get_format(prev, sd_state, fmt->pad, fmt->which); in preview_get_format()
2046 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_set_format() local
2050 format = __preview_get_format(prev, sd_state, fmt->pad, fmt->which); in preview_set_format()
2054 preview_try_format(prev, sd_state, fmt->pad, &fmt->format, fmt->which); in preview_set_format()
2060 crop = __preview_get_crop(prev, sd_state, fmt->which); in preview_set_format()
2066 preview_try_crop(prev, &fmt->format, crop); in preview_set_format()
2069 format = __preview_get_format(prev, sd_state, PREV_PAD_SOURCE, in preview_set_format()
2071 preview_try_format(prev, sd_state, PREV_PAD_SOURCE, format, in preview_set_format()
2152 struct isp_prev_device *prev = v4l2_get_subdevdata(sd); in preview_link_setup() local
2163 if (prev->input == PREVIEW_INPUT_CCDC) in preview_link_setup()
2165 prev->input = PREVIEW_INPUT_MEMORY; in preview_link_setup()
2167 if (prev->input == PREVIEW_INPUT_MEMORY) in preview_link_setup()
2168 prev->input = PREVIEW_INPUT_NONE; in preview_link_setup()
2175 if (prev->input == PREVIEW_INPUT_MEMORY) in preview_link_setup()
2177 prev->input = PREVIEW_INPUT_CCDC; in preview_link_setup()
2179 if (prev->input == PREVIEW_INPUT_CCDC) in preview_link_setup()
2180 prev->input = PREVIEW_INPUT_NONE; in preview_link_setup()
2192 if (prev->output & ~PREVIEW_OUTPUT_MEMORY) in preview_link_setup()
2194 prev->output |= PREVIEW_OUTPUT_MEMORY; in preview_link_setup()
2196 prev->output &= ~PREVIEW_OUTPUT_MEMORY; in preview_link_setup()
2203 if (prev->output & ~PREVIEW_OUTPUT_RESIZER) in preview_link_setup()
2205 prev->output |= PREVIEW_OUTPUT_RESIZER; in preview_link_setup()
2207 prev->output &= ~PREVIEW_OUTPUT_RESIZER; in preview_link_setup()
2224 void omap3isp_preview_unregister_entities(struct isp_prev_device *prev) in omap3isp_preview_unregister_entities() argument
2226 v4l2_device_unregister_subdev(&prev->subdev); in omap3isp_preview_unregister_entities()
2227 omap3isp_video_unregister(&prev->video_in); in omap3isp_preview_unregister_entities()
2228 omap3isp_video_unregister(&prev->video_out); in omap3isp_preview_unregister_entities()
2231 int omap3isp_preview_register_entities(struct isp_prev_device *prev, in omap3isp_preview_register_entities() argument
2237 prev->subdev.dev = vdev->mdev->dev; in omap3isp_preview_register_entities()
2238 ret = v4l2_device_register_subdev(vdev, &prev->subdev); in omap3isp_preview_register_entities()
2242 ret = omap3isp_video_register(&prev->video_in, vdev); in omap3isp_preview_register_entities()
2246 ret = omap3isp_video_register(&prev->video_out, vdev); in omap3isp_preview_register_entities()
2253 omap3isp_preview_unregister_entities(prev); in omap3isp_preview_register_entities()
2266 static int preview_init_entities(struct isp_prev_device *prev) in preview_init_entities() argument
2268 struct v4l2_subdev *sd = &prev->subdev; in preview_init_entities()
2269 struct media_pad *pads = prev->pads; in preview_init_entities()
2273 prev->input = PREVIEW_INPUT_NONE; in preview_init_entities()
2279 v4l2_set_subdevdata(sd, prev); in preview_init_entities()
2282 v4l2_ctrl_handler_init(&prev->ctrls, 2); in preview_init_entities()
2283 v4l2_ctrl_new_std(&prev->ctrls, &preview_ctrl_ops, V4L2_CID_BRIGHTNESS, in preview_init_entities()
2286 v4l2_ctrl_new_std(&prev->ctrls, &preview_ctrl_ops, V4L2_CID_CONTRAST, in preview_init_entities()
2289 v4l2_ctrl_handler_setup(&prev->ctrls); in preview_init_entities()
2290 sd->ctrl_handler = &prev->ctrls; in preview_init_entities()
2307 prev->video_in.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; in preview_init_entities()
2308 prev->video_in.ops = &preview_video_ops; in preview_init_entities()
2309 prev->video_in.isp = to_isp_device(prev); in preview_init_entities()
2310 prev->video_in.capture_mem = PAGE_ALIGN(4096 * 4096) * 2 * 3; in preview_init_entities()
2311 prev->video_in.bpl_alignment = 64; in preview_init_entities()
2312 prev->video_out.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in preview_init_entities()
2313 prev->video_out.ops = &preview_video_ops; in preview_init_entities()
2314 prev->video_out.isp = to_isp_device(prev); in preview_init_entities()
2315 prev->video_out.capture_mem = PAGE_ALIGN(4096 * 4096) * 2 * 3; in preview_init_entities()
2316 prev->video_out.bpl_alignment = 32; in preview_init_entities()
2318 ret = omap3isp_video_init(&prev->video_in, "preview"); in preview_init_entities()
2322 ret = omap3isp_video_init(&prev->video_out, "preview"); in preview_init_entities()
2329 omap3isp_video_cleanup(&prev->video_in); in preview_init_entities()
2331 media_entity_cleanup(&prev->subdev.entity); in preview_init_entities()
2333 v4l2_ctrl_handler_free(&prev->ctrls); in preview_init_entities()
2344 struct isp_prev_device *prev = &isp->isp_prev; in omap3isp_preview_init() local
2346 init_waitqueue_head(&prev->wait); in omap3isp_preview_init()
2348 preview_init_params(prev); in omap3isp_preview_init()
2350 return preview_init_entities(prev); in omap3isp_preview_init()
2355 struct isp_prev_device *prev = &isp->isp_prev; in omap3isp_preview_cleanup() local
2357 v4l2_ctrl_handler_free(&prev->ctrls); in omap3isp_preview_cleanup()
2358 omap3isp_video_cleanup(&prev->video_in); in omap3isp_preview_cleanup()
2359 omap3isp_video_cleanup(&prev->video_out); in omap3isp_preview_cleanup()
2360 media_entity_cleanup(&prev->subdev.entity); in omap3isp_preview_cleanup()