Lines Matching refs:vfe

158 	struct vfe_device *vfe = to_vfe(line);  in vfe_src_pad_code()  local
160 if (vfe->camss->version == CAMSS_8x16) in vfe_src_pad_code()
208 else if (vfe->camss->version == CAMSS_8x96) in vfe_src_pad_code()
278 static int vfe_reset(struct vfe_device *vfe) in vfe_reset() argument
282 reinit_completion(&vfe->reset_complete); in vfe_reset()
284 vfe->ops->global_reset(vfe); in vfe_reset()
286 time = wait_for_completion_timeout(&vfe->reset_complete, in vfe_reset()
289 dev_err(vfe->camss->dev, "VFE reset timeout\n"); in vfe_reset()
302 static int vfe_halt(struct vfe_device *vfe) in vfe_halt() argument
306 reinit_completion(&vfe->halt_complete); in vfe_halt()
308 vfe->ops->halt_request(vfe); in vfe_halt()
310 time = wait_for_completion_timeout(&vfe->halt_complete, in vfe_halt()
313 dev_err(vfe->camss->dev, "VFE halt timeout\n"); in vfe_halt()
320 static void vfe_init_outputs(struct vfe_device *vfe) in vfe_init_outputs() argument
324 for (i = 0; i < ARRAY_SIZE(vfe->line); i++) { in vfe_init_outputs()
325 struct vfe_output *output = &vfe->line[i].output; in vfe_init_outputs()
334 static void vfe_reset_output_maps(struct vfe_device *vfe) in vfe_reset_output_maps() argument
338 for (i = 0; i < ARRAY_SIZE(vfe->wm_output_map); i++) in vfe_reset_output_maps()
339 vfe->wm_output_map[i] = VFE_LINE_NONE; in vfe_reset_output_maps()
342 static void vfe_output_init_addrs(struct vfe_device *vfe, in vfe_output_init_addrs() argument
362 vfe->ops->wm_set_ping_addr(vfe, output->wm_idx[i], ping_addr); in vfe_output_init_addrs()
363 vfe->ops->wm_set_pong_addr(vfe, output->wm_idx[i], pong_addr); in vfe_output_init_addrs()
365 vfe->ops->bus_reload_wm(vfe, output->wm_idx[i]); in vfe_output_init_addrs()
369 static void vfe_output_update_ping_addr(struct vfe_device *vfe, in vfe_output_update_ping_addr() argument
381 vfe->ops->wm_set_ping_addr(vfe, output->wm_idx[i], addr); in vfe_output_update_ping_addr()
383 vfe->ops->bus_reload_wm(vfe, output->wm_idx[i]); in vfe_output_update_ping_addr()
387 static void vfe_output_update_pong_addr(struct vfe_device *vfe, in vfe_output_update_pong_addr() argument
399 vfe->ops->wm_set_pong_addr(vfe, output->wm_idx[i], addr); in vfe_output_update_pong_addr()
401 vfe->ops->bus_reload_wm(vfe, output->wm_idx[i]); in vfe_output_update_pong_addr()
406 static int vfe_reserve_wm(struct vfe_device *vfe, enum vfe_line_id line_id) in vfe_reserve_wm() argument
411 for (i = 0; i < ARRAY_SIZE(vfe->wm_output_map); i++) { in vfe_reserve_wm()
412 if (vfe->wm_output_map[i] == VFE_LINE_NONE) { in vfe_reserve_wm()
413 vfe->wm_output_map[i] = line_id; in vfe_reserve_wm()
422 static int vfe_release_wm(struct vfe_device *vfe, u8 wm) in vfe_release_wm() argument
424 if (wm >= ARRAY_SIZE(vfe->wm_output_map)) in vfe_release_wm()
427 vfe->wm_output_map[wm] = VFE_LINE_NONE; in vfe_release_wm()
432 static void vfe_output_frame_drop(struct vfe_device *vfe, in vfe_output_frame_drop() argument
445 vfe->ops->wm_set_framedrop_period(vfe, output->wm_idx[i], in vfe_output_frame_drop()
447 vfe->ops->wm_set_framedrop_pattern(vfe, output->wm_idx[i], in vfe_output_frame_drop()
450 vfe->ops->reg_update(vfe, in vfe_output_frame_drop()
497 static void vfe_buf_update_wm_on_next(struct vfe_device *vfe, in vfe_buf_update_wm_on_next() argument
502 vfe_output_frame_drop(vfe, output, 3); in vfe_buf_update_wm_on_next()
506 dev_err_ratelimited(vfe->camss->dev, in vfe_buf_update_wm_on_next()
513 static void vfe_buf_update_wm_on_last(struct vfe_device *vfe, in vfe_buf_update_wm_on_last() argument
519 vfe_output_frame_drop(vfe, output, 1); in vfe_buf_update_wm_on_last()
523 vfe_output_frame_drop(vfe, output, 0); in vfe_buf_update_wm_on_last()
526 dev_err_ratelimited(vfe->camss->dev, in vfe_buf_update_wm_on_last()
533 static void vfe_buf_update_wm_on_new(struct vfe_device *vfe, in vfe_buf_update_wm_on_new() argument
547 vfe_output_update_pong_addr(vfe, output, 0); in vfe_buf_update_wm_on_new()
549 vfe_output_update_ping_addr(vfe, output, 0); in vfe_buf_update_wm_on_new()
551 vfe_output_frame_drop(vfe, output, 3); in vfe_buf_update_wm_on_new()
555 dev_err_ratelimited(vfe->camss->dev, in vfe_buf_update_wm_on_new()
564 vfe_output_init_addrs(vfe, output, 1); in vfe_buf_update_wm_on_new()
566 vfe_output_frame_drop(vfe, output, 1); in vfe_buf_update_wm_on_new()
570 dev_err_ratelimited(vfe->camss->dev, in vfe_buf_update_wm_on_new()
584 struct vfe_device *vfe = to_vfe(line); in vfe_get_output() local
591 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_get_output()
595 dev_err(vfe->camss->dev, "Output is running\n"); in vfe_get_output()
615 wm_idx = vfe_reserve_wm(vfe, line->id); in vfe_get_output()
617 dev_err(vfe->camss->dev, "Can not reserve wm\n"); in vfe_get_output()
625 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_get_output()
631 vfe_release_wm(vfe, output->wm_idx[i]); in vfe_get_output()
634 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_get_output()
641 struct vfe_device *vfe = to_vfe(line); in vfe_put_output() local
646 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_put_output()
649 vfe_release_wm(vfe, output->wm_idx[i]); in vfe_put_output()
653 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_put_output()
659 struct vfe_device *vfe = to_vfe(line); in vfe_enable_output() local
661 const struct vfe_hw_ops *ops = vfe->ops; in vfe_enable_output()
668 ub_size = ops->get_ub_size(vfe->id); in vfe_enable_output()
683 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_enable_output()
685 ops->reg_update_clear(vfe, line->id); in vfe_enable_output()
688 dev_err(vfe->camss->dev, "Output is not in reserved state %d\n", in vfe_enable_output()
690 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_enable_output()
711 vfe_output_frame_drop(vfe, output, 1 << frame_skip); in vfe_enable_output()
714 vfe_output_frame_drop(vfe, output, 3 << frame_skip); in vfe_enable_output()
717 vfe_output_frame_drop(vfe, output, 0); in vfe_enable_output()
727 vfe_output_init_addrs(vfe, output, 0); in vfe_enable_output()
730 ops->set_cgc_override(vfe, output->wm_idx[0], 1); in vfe_enable_output()
731 ops->enable_irq_wm_line(vfe, output->wm_idx[0], line->id, 1); in vfe_enable_output()
732 ops->bus_connect_wm_to_rdi(vfe, output->wm_idx[0], line->id); in vfe_enable_output()
733 ops->wm_set_subsample(vfe, output->wm_idx[0]); in vfe_enable_output()
734 ops->set_rdi_cid(vfe, line->id, 0); in vfe_enable_output()
735 ops->wm_set_ub_cfg(vfe, output->wm_idx[0], in vfe_enable_output()
737 ops->wm_frame_based(vfe, output->wm_idx[0], 1); in vfe_enable_output()
738 ops->wm_enable(vfe, output->wm_idx[0], 1); in vfe_enable_output()
739 ops->bus_reload_wm(vfe, output->wm_idx[0]); in vfe_enable_output()
743 ops->set_cgc_override(vfe, output->wm_idx[i], 1); in vfe_enable_output()
744 ops->wm_set_subsample(vfe, output->wm_idx[i]); in vfe_enable_output()
745 ops->wm_set_ub_cfg(vfe, output->wm_idx[i], in vfe_enable_output()
748 ops->wm_line_based(vfe, output->wm_idx[i], in vfe_enable_output()
751 ops->wm_enable(vfe, output->wm_idx[i], 1); in vfe_enable_output()
752 ops->bus_reload_wm(vfe, output->wm_idx[i]); in vfe_enable_output()
754 ops->enable_irq_pix_line(vfe, 0, line->id, 1); in vfe_enable_output()
755 ops->set_module_cfg(vfe, 1); in vfe_enable_output()
756 ops->set_camif_cfg(vfe, line); in vfe_enable_output()
757 ops->set_realign_cfg(vfe, line, 1); in vfe_enable_output()
758 ops->set_xbar_cfg(vfe, output, 1); in vfe_enable_output()
759 ops->set_demux_cfg(vfe, line); in vfe_enable_output()
760 ops->set_scale_cfg(vfe, line); in vfe_enable_output()
761 ops->set_crop_cfg(vfe, line); in vfe_enable_output()
762 ops->set_clamp_cfg(vfe); in vfe_enable_output()
763 ops->set_camif_cmd(vfe, 1); in vfe_enable_output()
766 ops->reg_update(vfe, line->id); in vfe_enable_output()
768 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_enable_output()
775 struct vfe_device *vfe = to_vfe(line); in vfe_disable_output() local
777 const struct vfe_hw_ops *ops = vfe->ops; in vfe_disable_output()
782 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_disable_output()
785 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
790 dev_err(vfe->camss->dev, "VFE sof timeout\n"); in vfe_disable_output()
792 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_disable_output()
794 ops->wm_enable(vfe, output->wm_idx[i], 0); in vfe_disable_output()
796 ops->reg_update(vfe, line->id); in vfe_disable_output()
798 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
803 dev_err(vfe->camss->dev, "VFE reg update timeout\n"); in vfe_disable_output()
805 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_disable_output()
808 ops->wm_frame_based(vfe, output->wm_idx[0], 0); in vfe_disable_output()
809 ops->bus_disconnect_wm_from_rdi(vfe, output->wm_idx[0], in vfe_disable_output()
811 ops->enable_irq_wm_line(vfe, output->wm_idx[0], line->id, 0); in vfe_disable_output()
812 ops->set_cgc_override(vfe, output->wm_idx[0], 0); in vfe_disable_output()
813 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
816 ops->wm_line_based(vfe, output->wm_idx[i], NULL, i, 0); in vfe_disable_output()
817 ops->set_cgc_override(vfe, output->wm_idx[i], 0); in vfe_disable_output()
820 ops->enable_irq_pix_line(vfe, 0, line->id, 0); in vfe_disable_output()
821 ops->set_module_cfg(vfe, 0); in vfe_disable_output()
822 ops->set_realign_cfg(vfe, line, 0); in vfe_disable_output()
823 ops->set_xbar_cfg(vfe, output, 0); in vfe_disable_output()
825 ops->set_camif_cmd(vfe, 0); in vfe_disable_output()
826 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
828 ops->camif_wait_for_stop(vfe, vfe->camss->dev); in vfe_disable_output()
842 struct vfe_device *vfe = to_vfe(line); in vfe_enable() local
845 mutex_lock(&vfe->stream_lock); in vfe_enable()
847 if (!vfe->stream_count) { in vfe_enable()
848 vfe->ops->enable_irq_common(vfe); in vfe_enable()
850 vfe->ops->bus_enable_wr_if(vfe, 1); in vfe_enable()
852 vfe->ops->set_qos(vfe); in vfe_enable()
854 vfe->ops->set_ds(vfe); in vfe_enable()
857 vfe->stream_count++; in vfe_enable()
859 mutex_unlock(&vfe->stream_lock); in vfe_enable()
869 vfe->was_streaming = 1; in vfe_enable()
878 mutex_lock(&vfe->stream_lock); in vfe_enable()
880 if (vfe->stream_count == 1) in vfe_enable()
881 vfe->ops->bus_enable_wr_if(vfe, 0); in vfe_enable()
883 vfe->stream_count--; in vfe_enable()
885 mutex_unlock(&vfe->stream_lock); in vfe_enable()
898 struct vfe_device *vfe = to_vfe(line); in vfe_disable() local
904 mutex_lock(&vfe->stream_lock); in vfe_disable()
906 if (vfe->stream_count == 1) in vfe_disable()
907 vfe->ops->bus_enable_wr_if(vfe, 0); in vfe_disable()
909 vfe->stream_count--; in vfe_disable()
911 mutex_unlock(&vfe->stream_lock); in vfe_disable()
921 static void vfe_isr_sof(struct vfe_device *vfe, enum vfe_line_id line_id) in vfe_isr_sof() argument
926 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_isr_sof()
927 output = &vfe->line[line_id].output; in vfe_isr_sof()
932 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_sof()
940 static void vfe_isr_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id) in vfe_isr_reg_update() argument
945 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_isr_reg_update()
946 vfe->ops->reg_update_clear(vfe, line_id); in vfe_isr_reg_update()
948 output = &vfe->line[line_id].output; in vfe_isr_reg_update()
953 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_reg_update()
985 vfe_output_frame_drop(vfe, output, 2); in vfe_isr_reg_update()
988 vfe_output_frame_drop(vfe, output, 3); in vfe_isr_reg_update()
991 vfe_output_frame_drop(vfe, output, 0); in vfe_isr_reg_update()
995 vfe_output_init_addrs(vfe, output, 1); in vfe_isr_reg_update()
998 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_reg_update()
1006 static void vfe_isr_wm_done(struct vfe_device *vfe, u8 wm) in vfe_isr_wm_done() argument
1016 active_index = vfe->ops->wm_get_ping_pong_status(vfe, wm); in vfe_isr_wm_done()
1018 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_isr_wm_done()
1020 if (vfe->wm_output_map[wm] == VFE_LINE_NONE) { in vfe_isr_wm_done()
1021 dev_err_ratelimited(vfe->camss->dev, in vfe_isr_wm_done()
1025 output = &vfe->line[vfe->wm_output_map[wm]].output; in vfe_isr_wm_done()
1028 dev_err_ratelimited(vfe->camss->dev, in vfe_isr_wm_done()
1036 dev_err_ratelimited(vfe->camss->dev, in vfe_isr_wm_done()
1050 vfe_buf_update_wm_on_last(vfe, output); in vfe_isr_wm_done()
1053 vfe_buf_update_wm_on_next(vfe, output); in vfe_isr_wm_done()
1058 vfe->ops->wm_set_ping_addr(vfe, output->wm_idx[i], in vfe_isr_wm_done()
1062 vfe->ops->wm_set_pong_addr(vfe, output->wm_idx[i], in vfe_isr_wm_done()
1065 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_wm_done()
1075 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_wm_done()
1083 static void vfe_isr_comp_done(struct vfe_device *vfe, u8 comp) in vfe_isr_comp_done() argument
1087 for (i = 0; i < ARRAY_SIZE(vfe->wm_output_map); i++) in vfe_isr_comp_done()
1088 if (vfe->wm_output_map[i] == VFE_LINE_PIX) { in vfe_isr_comp_done()
1089 vfe_isr_wm_done(vfe, i); in vfe_isr_comp_done()
1094 static inline void vfe_isr_reset_ack(struct vfe_device *vfe) in vfe_isr_reset_ack() argument
1096 complete(&vfe->reset_complete); in vfe_isr_reset_ack()
1099 static inline void vfe_isr_halt_ack(struct vfe_device *vfe) in vfe_isr_halt_ack() argument
1101 complete(&vfe->halt_complete); in vfe_isr_halt_ack()
1102 vfe->ops->halt_clear(vfe); in vfe_isr_halt_ack()
1111 static int vfe_set_clock_rates(struct vfe_device *vfe) in vfe_set_clock_rates() argument
1113 struct device *dev = vfe->camss->dev; in vfe_set_clock_rates()
1119 ret = camss_get_pixel_clock(&vfe->line[i].subdev.entity, in vfe_set_clock_rates()
1125 for (i = 0; i < vfe->nclocks; i++) { in vfe_set_clock_rates()
1126 struct camss_clock *clock = &vfe->clock[i]; in vfe_set_clock_rates()
1140 struct vfe_line *l = &vfe->line[j]; in vfe_set_clock_rates()
1194 static int vfe_check_clock_rates(struct vfe_device *vfe) in vfe_check_clock_rates() argument
1201 ret = camss_get_pixel_clock(&vfe->line[i].subdev.entity, in vfe_check_clock_rates()
1207 for (i = 0; i < vfe->nclocks; i++) { in vfe_check_clock_rates()
1208 struct camss_clock *clock = &vfe->clock[i]; in vfe_check_clock_rates()
1222 struct vfe_line *l = &vfe->line[j]; in vfe_check_clock_rates()
1251 static int vfe_get(struct vfe_device *vfe) in vfe_get() argument
1255 mutex_lock(&vfe->power_lock); in vfe_get()
1257 if (vfe->power_count == 0) { in vfe_get()
1258 ret = camss_pm_domain_on(vfe->camss, vfe->id); in vfe_get()
1262 ret = pm_runtime_get_sync(vfe->camss->dev); in vfe_get()
1266 ret = vfe_set_clock_rates(vfe); in vfe_get()
1270 ret = camss_enable_clocks(vfe->nclocks, vfe->clock, in vfe_get()
1271 vfe->camss->dev); in vfe_get()
1275 ret = vfe_reset(vfe); in vfe_get()
1279 vfe_reset_output_maps(vfe); in vfe_get()
1281 vfe_init_outputs(vfe); in vfe_get()
1283 ret = vfe_check_clock_rates(vfe); in vfe_get()
1287 vfe->power_count++; in vfe_get()
1289 mutex_unlock(&vfe->power_lock); in vfe_get()
1294 camss_disable_clocks(vfe->nclocks, vfe->clock); in vfe_get()
1297 pm_runtime_put_sync(vfe->camss->dev); in vfe_get()
1298 camss_pm_domain_off(vfe->camss, vfe->id); in vfe_get()
1301 mutex_unlock(&vfe->power_lock); in vfe_get()
1310 static void vfe_put(struct vfe_device *vfe) in vfe_put() argument
1312 mutex_lock(&vfe->power_lock); in vfe_put()
1314 if (vfe->power_count == 0) { in vfe_put()
1315 dev_err(vfe->camss->dev, "vfe power off on power_count == 0\n"); in vfe_put()
1317 } else if (vfe->power_count == 1) { in vfe_put()
1318 if (vfe->was_streaming) { in vfe_put()
1319 vfe->was_streaming = 0; in vfe_put()
1320 vfe_halt(vfe); in vfe_put()
1322 camss_disable_clocks(vfe->nclocks, vfe->clock); in vfe_put()
1323 pm_runtime_put_sync(vfe->camss->dev); in vfe_put()
1324 camss_pm_domain_off(vfe->camss, vfe->id); in vfe_put()
1327 vfe->power_count--; in vfe_put()
1330 mutex_unlock(&vfe->power_lock); in vfe_put()
1347 struct vfe_device *vfe = to_vfe(line); in vfe_queue_buffer() local
1353 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_queue_buffer()
1355 vfe_buf_update_wm_on_new(vfe, output, buf); in vfe_queue_buffer()
1357 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_queue_buffer()
1376 struct vfe_device *vfe = to_vfe(line); in vfe_flush_buffers() local
1382 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_flush_buffers()
1397 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_flush_buffers()
1412 struct vfe_device *vfe = to_vfe(line); in vfe_set_power() local
1416 ret = vfe_get(vfe); in vfe_set_power()
1420 vfe->ops->hw_version_read(vfe, vfe->camss->dev); in vfe_set_power()
1422 vfe_put(vfe); in vfe_set_power()
1440 struct vfe_device *vfe = to_vfe(line); in vfe_set_stream() local
1446 dev_err(vfe->camss->dev, in vfe_set_stream()
1451 dev_err(vfe->camss->dev, in vfe_set_stream()
1978 int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, in msm_vfe_subdev_init() argument
1987 vfe->isr_ops.reset_ack = vfe_isr_reset_ack; in msm_vfe_subdev_init()
1988 vfe->isr_ops.halt_ack = vfe_isr_halt_ack; in msm_vfe_subdev_init()
1989 vfe->isr_ops.reg_update = vfe_isr_reg_update; in msm_vfe_subdev_init()
1990 vfe->isr_ops.sof = vfe_isr_sof; in msm_vfe_subdev_init()
1991 vfe->isr_ops.comp_done = vfe_isr_comp_done; in msm_vfe_subdev_init()
1992 vfe->isr_ops.wm_done = vfe_isr_wm_done; in msm_vfe_subdev_init()
1995 vfe->ops = &vfe_ops_4_1; in msm_vfe_subdev_init()
1997 vfe->ops = &vfe_ops_4_7; in msm_vfe_subdev_init()
2004 vfe->base = devm_ioremap_resource(dev, r); in msm_vfe_subdev_init()
2005 if (IS_ERR(vfe->base)) { in msm_vfe_subdev_init()
2007 return PTR_ERR(vfe->base); in msm_vfe_subdev_init()
2019 vfe->irq = r->start; in msm_vfe_subdev_init()
2020 snprintf(vfe->irq_name, sizeof(vfe->irq_name), "%s_%s%d", in msm_vfe_subdev_init()
2021 dev_name(dev), MSM_VFE_NAME, vfe->id); in msm_vfe_subdev_init()
2022 ret = devm_request_irq(dev, vfe->irq, vfe->ops->isr, in msm_vfe_subdev_init()
2023 IRQF_TRIGGER_RISING, vfe->irq_name, vfe); in msm_vfe_subdev_init()
2031 vfe->nclocks = 0; in msm_vfe_subdev_init()
2032 while (res->clock[vfe->nclocks]) in msm_vfe_subdev_init()
2033 vfe->nclocks++; in msm_vfe_subdev_init()
2035 vfe->clock = devm_kcalloc(dev, vfe->nclocks, sizeof(*vfe->clock), in msm_vfe_subdev_init()
2037 if (!vfe->clock) in msm_vfe_subdev_init()
2040 for (i = 0; i < vfe->nclocks; i++) { in msm_vfe_subdev_init()
2041 struct camss_clock *clock = &vfe->clock[i]; in msm_vfe_subdev_init()
2069 mutex_init(&vfe->power_lock); in msm_vfe_subdev_init()
2070 vfe->power_count = 0; in msm_vfe_subdev_init()
2072 mutex_init(&vfe->stream_lock); in msm_vfe_subdev_init()
2073 vfe->stream_count = 0; in msm_vfe_subdev_init()
2075 spin_lock_init(&vfe->output_lock); in msm_vfe_subdev_init()
2077 vfe->camss = camss; in msm_vfe_subdev_init()
2078 vfe->id = id; in msm_vfe_subdev_init()
2079 vfe->reg_update = 0; in msm_vfe_subdev_init()
2082 struct vfe_line *l = &vfe->line[i]; in msm_vfe_subdev_init()
2111 init_completion(&vfe->reset_complete); in msm_vfe_subdev_init()
2112 init_completion(&vfe->halt_complete); in msm_vfe_subdev_init()
2126 struct vfe_device *vfe; in msm_vfe_get_vfe_id() local
2130 vfe = to_vfe(line); in msm_vfe_get_vfe_id()
2132 *id = vfe->id; in msm_vfe_get_vfe_id()
2220 int msm_vfe_register_entities(struct vfe_device *vfe, in msm_vfe_register_entities() argument
2223 struct device *dev = vfe->camss->dev; in msm_vfe_register_entities()
2230 for (i = 0; i < ARRAY_SIZE(vfe->line); i++) { in msm_vfe_register_entities()
2233 sd = &vfe->line[i].subdev; in msm_vfe_register_entities()
2234 pads = vfe->line[i].pads; in msm_vfe_register_entities()
2235 video_out = &vfe->line[i].video_out; in msm_vfe_register_entities()
2242 MSM_VFE_NAME, vfe->id, "pix"); in msm_vfe_register_entities()
2245 MSM_VFE_NAME, vfe->id, "rdi", i); in msm_vfe_register_entities()
2247 v4l2_set_subdevdata(sd, &vfe->line[i]); in msm_vfe_register_entities()
2281 MSM_VFE_NAME, vfe->id, "video", i); in msm_vfe_register_entities()
2315 sd = &vfe->line[i].subdev; in msm_vfe_register_entities()
2316 video_out = &vfe->line[i].video_out; in msm_vfe_register_entities()
2330 void msm_vfe_unregister_entities(struct vfe_device *vfe) in msm_vfe_unregister_entities() argument
2334 mutex_destroy(&vfe->power_lock); in msm_vfe_unregister_entities()
2335 mutex_destroy(&vfe->stream_lock); in msm_vfe_unregister_entities()
2337 for (i = 0; i < ARRAY_SIZE(vfe->line); i++) { in msm_vfe_unregister_entities()
2338 struct v4l2_subdev *sd = &vfe->line[i].subdev; in msm_vfe_unregister_entities()
2339 struct camss_video *video_out = &vfe->line[i].video_out; in msm_vfe_unregister_entities()