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()
666 ub_size = ops->get_ub_size(vfe->id); in vfe_enable_output()
670 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_enable_output()
672 ops->reg_update_clear(vfe, line->id); in vfe_enable_output()
675 dev_err(vfe->camss->dev, "Output is not in reserved state %d\n", in vfe_enable_output()
677 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_enable_output()
698 vfe_output_frame_drop(vfe, output, 1); in vfe_enable_output()
701 vfe_output_frame_drop(vfe, output, 3); in vfe_enable_output()
704 vfe_output_frame_drop(vfe, output, 0); in vfe_enable_output()
714 vfe_output_init_addrs(vfe, output, 0); in vfe_enable_output()
717 ops->set_cgc_override(vfe, output->wm_idx[0], 1); in vfe_enable_output()
718 ops->enable_irq_wm_line(vfe, output->wm_idx[0], line->id, 1); in vfe_enable_output()
719 ops->bus_connect_wm_to_rdi(vfe, output->wm_idx[0], line->id); in vfe_enable_output()
720 ops->wm_set_subsample(vfe, output->wm_idx[0]); in vfe_enable_output()
721 ops->set_rdi_cid(vfe, line->id, 0); in vfe_enable_output()
722 ops->wm_set_ub_cfg(vfe, output->wm_idx[0], in vfe_enable_output()
724 ops->wm_frame_based(vfe, output->wm_idx[0], 1); in vfe_enable_output()
725 ops->wm_enable(vfe, output->wm_idx[0], 1); in vfe_enable_output()
726 ops->bus_reload_wm(vfe, output->wm_idx[0]); in vfe_enable_output()
730 ops->set_cgc_override(vfe, output->wm_idx[i], 1); in vfe_enable_output()
731 ops->wm_set_subsample(vfe, output->wm_idx[i]); in vfe_enable_output()
732 ops->wm_set_ub_cfg(vfe, output->wm_idx[i], in vfe_enable_output()
735 ops->wm_line_based(vfe, output->wm_idx[i], in vfe_enable_output()
738 ops->wm_enable(vfe, output->wm_idx[i], 1); in vfe_enable_output()
739 ops->bus_reload_wm(vfe, output->wm_idx[i]); in vfe_enable_output()
741 ops->enable_irq_pix_line(vfe, 0, line->id, 1); in vfe_enable_output()
742 ops->set_module_cfg(vfe, 1); in vfe_enable_output()
743 ops->set_camif_cfg(vfe, line); in vfe_enable_output()
744 ops->set_realign_cfg(vfe, line, 1); in vfe_enable_output()
745 ops->set_xbar_cfg(vfe, output, 1); in vfe_enable_output()
746 ops->set_demux_cfg(vfe, line); in vfe_enable_output()
747 ops->set_scale_cfg(vfe, line); in vfe_enable_output()
748 ops->set_crop_cfg(vfe, line); in vfe_enable_output()
749 ops->set_clamp_cfg(vfe); in vfe_enable_output()
750 ops->set_camif_cmd(vfe, 1); in vfe_enable_output()
753 ops->reg_update(vfe, line->id); in vfe_enable_output()
755 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_enable_output()
762 struct vfe_device *vfe = to_vfe(line); in vfe_disable_output() local
764 const struct vfe_hw_ops *ops = vfe->ops; in vfe_disable_output()
769 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_disable_output()
772 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
777 dev_err(vfe->camss->dev, "VFE sof timeout\n"); in vfe_disable_output()
779 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_disable_output()
781 ops->wm_enable(vfe, output->wm_idx[i], 0); in vfe_disable_output()
783 ops->reg_update(vfe, line->id); in vfe_disable_output()
785 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
790 dev_err(vfe->camss->dev, "VFE reg update timeout\n"); in vfe_disable_output()
792 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_disable_output()
795 ops->wm_frame_based(vfe, output->wm_idx[0], 0); in vfe_disable_output()
796 ops->bus_disconnect_wm_from_rdi(vfe, output->wm_idx[0], in vfe_disable_output()
798 ops->enable_irq_wm_line(vfe, output->wm_idx[0], line->id, 0); in vfe_disable_output()
799 ops->set_cgc_override(vfe, output->wm_idx[0], 0); in vfe_disable_output()
800 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
803 ops->wm_line_based(vfe, output->wm_idx[i], NULL, i, 0); in vfe_disable_output()
804 ops->set_cgc_override(vfe, output->wm_idx[i], 0); in vfe_disable_output()
807 ops->enable_irq_pix_line(vfe, 0, line->id, 0); in vfe_disable_output()
808 ops->set_module_cfg(vfe, 0); in vfe_disable_output()
809 ops->set_realign_cfg(vfe, line, 0); in vfe_disable_output()
810 ops->set_xbar_cfg(vfe, output, 0); in vfe_disable_output()
812 ops->set_camif_cmd(vfe, 0); in vfe_disable_output()
813 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_disable_output()
815 ops->camif_wait_for_stop(vfe, vfe->camss->dev); in vfe_disable_output()
829 struct vfe_device *vfe = to_vfe(line); in vfe_enable() local
832 mutex_lock(&vfe->stream_lock); in vfe_enable()
834 if (!vfe->stream_count) { in vfe_enable()
835 vfe->ops->enable_irq_common(vfe); in vfe_enable()
837 vfe->ops->bus_enable_wr_if(vfe, 1); in vfe_enable()
839 vfe->ops->set_qos(vfe); in vfe_enable()
841 vfe->ops->set_ds(vfe); in vfe_enable()
844 vfe->stream_count++; in vfe_enable()
846 mutex_unlock(&vfe->stream_lock); in vfe_enable()
856 vfe->was_streaming = 1; in vfe_enable()
865 mutex_lock(&vfe->stream_lock); in vfe_enable()
867 if (vfe->stream_count == 1) in vfe_enable()
868 vfe->ops->bus_enable_wr_if(vfe, 0); in vfe_enable()
870 vfe->stream_count--; in vfe_enable()
872 mutex_unlock(&vfe->stream_lock); in vfe_enable()
885 struct vfe_device *vfe = to_vfe(line); in vfe_disable() local
891 mutex_lock(&vfe->stream_lock); in vfe_disable()
893 if (vfe->stream_count == 1) in vfe_disable()
894 vfe->ops->bus_enable_wr_if(vfe, 0); in vfe_disable()
896 vfe->stream_count--; in vfe_disable()
898 mutex_unlock(&vfe->stream_lock); in vfe_disable()
908 static void vfe_isr_sof(struct vfe_device *vfe, enum vfe_line_id line_id) in vfe_isr_sof() argument
913 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_isr_sof()
914 output = &vfe->line[line_id].output; in vfe_isr_sof()
919 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_sof()
927 static void vfe_isr_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id) in vfe_isr_reg_update() argument
932 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_isr_reg_update()
933 vfe->ops->reg_update_clear(vfe, line_id); in vfe_isr_reg_update()
935 output = &vfe->line[line_id].output; in vfe_isr_reg_update()
940 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_reg_update()
972 vfe_output_frame_drop(vfe, output, 2); in vfe_isr_reg_update()
975 vfe_output_frame_drop(vfe, output, 3); in vfe_isr_reg_update()
978 vfe_output_frame_drop(vfe, output, 0); in vfe_isr_reg_update()
982 vfe_output_init_addrs(vfe, output, 1); in vfe_isr_reg_update()
985 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_reg_update()
993 static void vfe_isr_wm_done(struct vfe_device *vfe, u8 wm) in vfe_isr_wm_done() argument
1003 active_index = vfe->ops->wm_get_ping_pong_status(vfe, wm); in vfe_isr_wm_done()
1005 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_isr_wm_done()
1007 if (vfe->wm_output_map[wm] == VFE_LINE_NONE) { in vfe_isr_wm_done()
1008 dev_err_ratelimited(vfe->camss->dev, in vfe_isr_wm_done()
1012 output = &vfe->line[vfe->wm_output_map[wm]].output; in vfe_isr_wm_done()
1015 dev_err_ratelimited(vfe->camss->dev, in vfe_isr_wm_done()
1023 dev_err_ratelimited(vfe->camss->dev, in vfe_isr_wm_done()
1037 vfe_buf_update_wm_on_last(vfe, output); in vfe_isr_wm_done()
1040 vfe_buf_update_wm_on_next(vfe, output); in vfe_isr_wm_done()
1045 vfe->ops->wm_set_ping_addr(vfe, output->wm_idx[i], in vfe_isr_wm_done()
1049 vfe->ops->wm_set_pong_addr(vfe, output->wm_idx[i], in vfe_isr_wm_done()
1052 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_wm_done()
1062 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_isr_wm_done()
1070 static void vfe_isr_comp_done(struct vfe_device *vfe, u8 comp) in vfe_isr_comp_done() argument
1074 for (i = 0; i < ARRAY_SIZE(vfe->wm_output_map); i++) in vfe_isr_comp_done()
1075 if (vfe->wm_output_map[i] == VFE_LINE_PIX) { in vfe_isr_comp_done()
1076 vfe_isr_wm_done(vfe, i); in vfe_isr_comp_done()
1081 static inline void vfe_isr_reset_ack(struct vfe_device *vfe) in vfe_isr_reset_ack() argument
1083 complete(&vfe->reset_complete); in vfe_isr_reset_ack()
1086 static inline void vfe_isr_halt_ack(struct vfe_device *vfe) in vfe_isr_halt_ack() argument
1088 complete(&vfe->halt_complete); in vfe_isr_halt_ack()
1089 vfe->ops->halt_clear(vfe); in vfe_isr_halt_ack()
1098 static int vfe_set_clock_rates(struct vfe_device *vfe) in vfe_set_clock_rates() argument
1100 struct device *dev = vfe->camss->dev; in vfe_set_clock_rates()
1106 ret = camss_get_pixel_clock(&vfe->line[i].subdev.entity, in vfe_set_clock_rates()
1112 for (i = 0; i < vfe->nclocks; i++) { in vfe_set_clock_rates()
1113 struct camss_clock *clock = &vfe->clock[i]; in vfe_set_clock_rates()
1127 struct vfe_line *l = &vfe->line[j]; in vfe_set_clock_rates()
1181 static int vfe_check_clock_rates(struct vfe_device *vfe) in vfe_check_clock_rates() argument
1188 ret = camss_get_pixel_clock(&vfe->line[i].subdev.entity, in vfe_check_clock_rates()
1194 for (i = 0; i < vfe->nclocks; i++) { in vfe_check_clock_rates()
1195 struct camss_clock *clock = &vfe->clock[i]; in vfe_check_clock_rates()
1209 struct vfe_line *l = &vfe->line[j]; in vfe_check_clock_rates()
1238 static int vfe_get(struct vfe_device *vfe) in vfe_get() argument
1242 mutex_lock(&vfe->power_lock); in vfe_get()
1244 if (vfe->power_count == 0) { in vfe_get()
1245 ret = camss_pm_domain_on(vfe->camss, vfe->id); in vfe_get()
1249 ret = pm_runtime_get_sync(vfe->camss->dev); in vfe_get()
1253 ret = vfe_set_clock_rates(vfe); in vfe_get()
1257 ret = camss_enable_clocks(vfe->nclocks, vfe->clock, in vfe_get()
1258 vfe->camss->dev); in vfe_get()
1262 ret = vfe_reset(vfe); in vfe_get()
1266 vfe_reset_output_maps(vfe); in vfe_get()
1268 vfe_init_outputs(vfe); in vfe_get()
1270 ret = vfe_check_clock_rates(vfe); in vfe_get()
1274 vfe->power_count++; in vfe_get()
1276 mutex_unlock(&vfe->power_lock); in vfe_get()
1281 camss_disable_clocks(vfe->nclocks, vfe->clock); in vfe_get()
1284 pm_runtime_put_sync(vfe->camss->dev); in vfe_get()
1287 camss_pm_domain_off(vfe->camss, vfe->id); in vfe_get()
1290 mutex_unlock(&vfe->power_lock); in vfe_get()
1299 static void vfe_put(struct vfe_device *vfe) in vfe_put() argument
1301 mutex_lock(&vfe->power_lock); in vfe_put()
1303 if (vfe->power_count == 0) { in vfe_put()
1304 dev_err(vfe->camss->dev, "vfe power off on power_count == 0\n"); in vfe_put()
1306 } else if (vfe->power_count == 1) { in vfe_put()
1307 if (vfe->was_streaming) { in vfe_put()
1308 vfe->was_streaming = 0; in vfe_put()
1309 vfe_halt(vfe); in vfe_put()
1311 camss_disable_clocks(vfe->nclocks, vfe->clock); in vfe_put()
1312 pm_runtime_put_sync(vfe->camss->dev); in vfe_put()
1313 camss_pm_domain_off(vfe->camss, vfe->id); in vfe_put()
1316 vfe->power_count--; in vfe_put()
1319 mutex_unlock(&vfe->power_lock); in vfe_put()
1336 struct vfe_device *vfe = to_vfe(line); in vfe_queue_buffer() local
1342 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_queue_buffer()
1344 vfe_buf_update_wm_on_new(vfe, output, buf); in vfe_queue_buffer()
1346 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_queue_buffer()
1365 struct vfe_device *vfe = to_vfe(line); in vfe_flush_buffers() local
1371 spin_lock_irqsave(&vfe->output_lock, flags); in vfe_flush_buffers()
1386 spin_unlock_irqrestore(&vfe->output_lock, flags); in vfe_flush_buffers()
1401 struct vfe_device *vfe = to_vfe(line); in vfe_set_power() local
1405 ret = vfe_get(vfe); in vfe_set_power()
1409 vfe->ops->hw_version_read(vfe, vfe->camss->dev); in vfe_set_power()
1411 vfe_put(vfe); in vfe_set_power()
1429 struct vfe_device *vfe = to_vfe(line); in vfe_set_stream() local
1435 dev_err(vfe->camss->dev, in vfe_set_stream()
1440 dev_err(vfe->camss->dev, in vfe_set_stream()
1967 int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, in msm_vfe_subdev_init() argument
1976 vfe->isr_ops.reset_ack = vfe_isr_reset_ack; in msm_vfe_subdev_init()
1977 vfe->isr_ops.halt_ack = vfe_isr_halt_ack; in msm_vfe_subdev_init()
1978 vfe->isr_ops.reg_update = vfe_isr_reg_update; in msm_vfe_subdev_init()
1979 vfe->isr_ops.sof = vfe_isr_sof; in msm_vfe_subdev_init()
1980 vfe->isr_ops.comp_done = vfe_isr_comp_done; in msm_vfe_subdev_init()
1981 vfe->isr_ops.wm_done = vfe_isr_wm_done; in msm_vfe_subdev_init()
1984 vfe->ops = &vfe_ops_4_1; in msm_vfe_subdev_init()
1986 vfe->ops = &vfe_ops_4_7; in msm_vfe_subdev_init()
1993 vfe->base = devm_ioremap_resource(dev, r); in msm_vfe_subdev_init()
1994 if (IS_ERR(vfe->base)) { in msm_vfe_subdev_init()
1996 return PTR_ERR(vfe->base); in msm_vfe_subdev_init()
2008 vfe->irq = r->start; in msm_vfe_subdev_init()
2009 snprintf(vfe->irq_name, sizeof(vfe->irq_name), "%s_%s%d", in msm_vfe_subdev_init()
2010 dev_name(dev), MSM_VFE_NAME, vfe->id); in msm_vfe_subdev_init()
2011 ret = devm_request_irq(dev, vfe->irq, vfe->ops->isr, in msm_vfe_subdev_init()
2012 IRQF_TRIGGER_RISING, vfe->irq_name, vfe); in msm_vfe_subdev_init()
2020 vfe->nclocks = 0; in msm_vfe_subdev_init()
2021 while (res->clock[vfe->nclocks]) in msm_vfe_subdev_init()
2022 vfe->nclocks++; in msm_vfe_subdev_init()
2024 vfe->clock = devm_kcalloc(dev, vfe->nclocks, sizeof(*vfe->clock), in msm_vfe_subdev_init()
2026 if (!vfe->clock) in msm_vfe_subdev_init()
2029 for (i = 0; i < vfe->nclocks; i++) { in msm_vfe_subdev_init()
2030 struct camss_clock *clock = &vfe->clock[i]; in msm_vfe_subdev_init()
2058 mutex_init(&vfe->power_lock); in msm_vfe_subdev_init()
2059 vfe->power_count = 0; in msm_vfe_subdev_init()
2061 mutex_init(&vfe->stream_lock); in msm_vfe_subdev_init()
2062 vfe->stream_count = 0; in msm_vfe_subdev_init()
2064 spin_lock_init(&vfe->output_lock); in msm_vfe_subdev_init()
2066 vfe->camss = camss; in msm_vfe_subdev_init()
2067 vfe->id = id; in msm_vfe_subdev_init()
2068 vfe->reg_update = 0; in msm_vfe_subdev_init()
2071 struct vfe_line *l = &vfe->line[i]; in msm_vfe_subdev_init()
2100 init_completion(&vfe->reset_complete); in msm_vfe_subdev_init()
2101 init_completion(&vfe->halt_complete); in msm_vfe_subdev_init()
2115 struct vfe_device *vfe; in msm_vfe_get_vfe_id() local
2119 vfe = to_vfe(line); in msm_vfe_get_vfe_id()
2121 *id = vfe->id; in msm_vfe_get_vfe_id()
2197 void msm_vfe_stop_streaming(struct vfe_device *vfe) in msm_vfe_stop_streaming() argument
2201 for (i = 0; i < ARRAY_SIZE(vfe->line); i++) in msm_vfe_stop_streaming()
2202 msm_video_stop_streaming(&vfe->line[i].video_out); in msm_vfe_stop_streaming()
2217 int msm_vfe_register_entities(struct vfe_device *vfe, in msm_vfe_register_entities() argument
2220 struct device *dev = vfe->camss->dev; in msm_vfe_register_entities()
2227 for (i = 0; i < ARRAY_SIZE(vfe->line); i++) { in msm_vfe_register_entities()
2230 sd = &vfe->line[i].subdev; in msm_vfe_register_entities()
2231 pads = vfe->line[i].pads; in msm_vfe_register_entities()
2232 video_out = &vfe->line[i].video_out; in msm_vfe_register_entities()
2239 MSM_VFE_NAME, vfe->id, "pix"); in msm_vfe_register_entities()
2242 MSM_VFE_NAME, vfe->id, "rdi", i); in msm_vfe_register_entities()
2244 v4l2_set_subdevdata(sd, &vfe->line[i]); in msm_vfe_register_entities()
2278 MSM_VFE_NAME, vfe->id, "video", i); in msm_vfe_register_entities()
2312 sd = &vfe->line[i].subdev; in msm_vfe_register_entities()
2313 video_out = &vfe->line[i].video_out; in msm_vfe_register_entities()
2327 void msm_vfe_unregister_entities(struct vfe_device *vfe) in msm_vfe_unregister_entities() argument
2331 mutex_destroy(&vfe->power_lock); in msm_vfe_unregister_entities()
2332 mutex_destroy(&vfe->stream_lock); in msm_vfe_unregister_entities()
2334 for (i = 0; i < ARRAY_SIZE(vfe->line); i++) { in msm_vfe_unregister_entities()
2335 struct v4l2_subdev *sd = &vfe->line[i].subdev; in msm_vfe_unregister_entities()
2336 struct camss_video *video_out = &vfe->line[i].video_out; in msm_vfe_unregister_entities()