fimc               83 drivers/devfreq/event/exynos-ppmu.c 	PPMU_EVENT(fimc),
fimc               32 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_capture_hw_init(struct fimc_dev *fimc)
fimc               34 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_source_info *si = &fimc->vid_cap.source_config;
fimc               35 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_ctx *ctx = fimc->vid_cap.ctx;
fimc               43 drivers/media/platform/exynos4-is/fimc-capture.c 		ret = fimc_hw_camblk_cfg_writeback(fimc);
fimc               48 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc               52 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_hw_set_camera_polarity(fimc, si);
fimc               53 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_hw_set_camera_type(fimc, si);
fimc               54 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_hw_set_camera_source(fimc, si);
fimc               55 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_hw_set_camera_offset(fimc, &ctx->s_frame);
fimc               67 drivers/media/platform/exynos4-is/fimc-capture.c 		if (fimc->drv_data->alpha_color)
fimc               69 drivers/media/platform/exynos4-is/fimc-capture.c 		clear_bit(ST_CAPT_APPLY_CFG, &fimc->state);
fimc               71 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc               83 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_capture_state_cleanup(struct fimc_dev *fimc, bool suspend)
fimc               85 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *cap = &fimc->vid_cap;
fimc               90 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc               91 drivers/media/platform/exynos4-is/fimc-capture.c 	streaming = fimc->state & (1 << ST_CAPT_ISP_STREAM);
fimc               93 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->state &= ~(1 << ST_CAPT_RUN | 1 << ST_CAPT_SHUT |
fimc               96 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc->state |= (1 << ST_CAPT_SUSPENDED);
fimc               98 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc->state &= ~(1 << ST_CAPT_PEND | 1 << ST_CAPT_SUSPENDED);
fimc              114 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_hw_reset(fimc);
fimc              117 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              125 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_stop_capture(struct fimc_dev *fimc, bool suspend)
fimc              129 drivers/media/platform/exynos4-is/fimc-capture.c 	if (!fimc_capture_active(fimc))
fimc              132 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              133 drivers/media/platform/exynos4-is/fimc-capture.c 	set_bit(ST_CAPT_SHUT, &fimc->state);
fimc              134 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_deactivate_capture(fimc);
fimc              135 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              137 drivers/media/platform/exynos4-is/fimc-capture.c 	wait_event_timeout(fimc->irq_queue,
fimc              138 drivers/media/platform/exynos4-is/fimc-capture.c 			   !test_bit(ST_CAPT_SHUT, &fimc->state),
fimc              141 drivers/media/platform/exynos4-is/fimc-capture.c 	return fimc_capture_state_cleanup(fimc, suspend);
fimc              154 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              157 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_hw_set_camera_offset(fimc, &ctx->s_frame);
fimc              170 drivers/media/platform/exynos4-is/fimc-capture.c 	if (fimc->drv_data->alpha_color)
fimc              173 drivers/media/platform/exynos4-is/fimc-capture.c 	clear_bit(ST_CAPT_APPLY_CFG, &fimc->state);
fimc              177 drivers/media/platform/exynos4-is/fimc-capture.c void fimc_capture_irq_handler(struct fimc_dev *fimc, int deq_buf)
fimc              179 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *cap = &fimc->vid_cap;
fimc              185 drivers/media/platform/exynos4-is/fimc-capture.c 	if (test_and_clear_bit(ST_CAPT_SHUT, &fimc->state)) {
fimc              186 drivers/media/platform/exynos4-is/fimc-capture.c 		wake_up(&fimc->irq_queue);
fimc              191 drivers/media/platform/exynos4-is/fimc-capture.c 	    test_bit(ST_CAPT_RUN, &fimc->state) && deq_buf) {
fimc              203 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_hw_set_output_addr(fimc, &v_buf->paddr, cap->buf_index);
fimc              210 drivers/media/platform/exynos4-is/fimc-capture.c 		    fimc_hw_get_frame_index(fimc), v_buf->index);
fimc              222 drivers/media/platform/exynos4-is/fimc-capture.c 		s32 index = fimc_hw_get_frame_index(fimc);
fimc              237 drivers/media/platform/exynos4-is/fimc-capture.c 			clear_bit(ST_CAPT_RUN, &fimc->state);
fimc              242 drivers/media/platform/exynos4-is/fimc-capture.c 		set_bit(ST_CAPT_RUN, &fimc->state);
fimc              245 drivers/media/platform/exynos4-is/fimc-capture.c 	if (test_bit(ST_CAPT_APPLY_CFG, &fimc->state))
fimc              249 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_deactivate_capture(fimc);
fimc              250 drivers/media/platform/exynos4-is/fimc-capture.c 		clear_bit(ST_CAPT_STREAM, &fimc->state);
fimc              254 drivers/media/platform/exynos4-is/fimc-capture.c 	    fimc_hw_get_frame_index(fimc), cap->active_buf_cnt);
fimc              261 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              262 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vid_cap = &fimc->vid_cap;
fimc              268 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = fimc_capture_hw_init(fimc);
fimc              270 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_capture_state_cleanup(fimc, false);
fimc              274 drivers/media/platform/exynos4-is/fimc-capture.c 	set_bit(ST_CAPT_PEND, &fimc->state);
fimc              276 drivers/media/platform/exynos4-is/fimc-capture.c 	min_bufs = fimc->vid_cap.reqbufs_count > 1 ? 2 : 1;
fimc              279 drivers/media/platform/exynos4-is/fimc-capture.c 	    !test_and_set_bit(ST_CAPT_STREAM, &fimc->state)) {
fimc              282 drivers/media/platform/exynos4-is/fimc-capture.c 		if (!test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state))
fimc              292 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              294 drivers/media/platform/exynos4-is/fimc-capture.c 	if (!fimc_capture_active(fimc))
fimc              297 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_stop_capture(fimc, false);
fimc              300 drivers/media/platform/exynos4-is/fimc-capture.c int fimc_capture_suspend(struct fimc_dev *fimc)
fimc              302 drivers/media/platform/exynos4-is/fimc-capture.c 	bool suspend = fimc_capture_busy(fimc);
fimc              304 drivers/media/platform/exynos4-is/fimc-capture.c 	int ret = fimc_stop_capture(fimc, suspend);
fimc              307 drivers/media/platform/exynos4-is/fimc-capture.c 	return fimc_pipeline_call(&fimc->vid_cap.ve, close);
fimc              312 drivers/media/platform/exynos4-is/fimc-capture.c int fimc_capture_resume(struct fimc_dev *fimc)
fimc              314 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vid_cap = &fimc->vid_cap;
fimc              319 drivers/media/platform/exynos4-is/fimc-capture.c 	if (!test_and_clear_bit(ST_CAPT_SUSPENDED, &fimc->state))
fimc              322 drivers/media/platform/exynos4-is/fimc-capture.c 	INIT_LIST_HEAD(&fimc->vid_cap.active_buf_q);
fimc              325 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_capture_hw_init(fimc);
fimc              327 drivers/media/platform/exynos4-is/fimc-capture.c 	clear_bit(ST_CAPT_SUSPENDED, &fimc->state);
fimc              405 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              406 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vid_cap = &fimc->vid_cap;
fimc              411 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              414 drivers/media/platform/exynos4-is/fimc-capture.c 	if (!test_bit(ST_CAPT_SUSPENDED, &fimc->state) &&
fimc              415 drivers/media/platform/exynos4-is/fimc-capture.c 	    !test_bit(ST_CAPT_STREAM, &fimc->state) &&
fimc              421 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_hw_set_output_addr(fimc, &buf->paddr, buf_id);
fimc              436 drivers/media/platform/exynos4-is/fimc-capture.c 	    !test_and_set_bit(ST_CAPT_STREAM, &fimc->state)) {
fimc              440 drivers/media/platform/exynos4-is/fimc-capture.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc              442 drivers/media/platform/exynos4-is/fimc-capture.c 		if (test_and_set_bit(ST_CAPT_ISP_STREAM, &fimc->state))
fimc              450 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              463 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_capture_set_default_format(struct fimc_dev *fimc);
fimc              467 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc              468 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc              472 drivers/media/platform/exynos4-is/fimc-capture.c 	dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state);
fimc              474 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc              476 drivers/media/platform/exynos4-is/fimc-capture.c 	if (fimc_m2m_active(fimc))
fimc              479 drivers/media/platform/exynos4-is/fimc-capture.c 	set_bit(ST_CAPT_BUSY, &fimc->state);
fimc              480 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = pm_runtime_get_sync(&fimc->pdev->dev);
fimc              486 drivers/media/platform/exynos4-is/fimc-capture.c 		pm_runtime_put_sync(&fimc->pdev->dev);
fimc              512 drivers/media/platform/exynos4-is/fimc-capture.c 			ret = fimc_capture_set_default_format(fimc);
fimc              515 drivers/media/platform/exynos4-is/fimc-capture.c 			clear_bit(ST_CAPT_BUSY, &fimc->state);
fimc              516 drivers/media/platform/exynos4-is/fimc-capture.c 			pm_runtime_put_sync(&fimc->pdev->dev);
fimc              521 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc              527 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc              528 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc              532 drivers/media/platform/exynos4-is/fimc-capture.c 	dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state);
fimc              534 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc              544 drivers/media/platform/exynos4-is/fimc-capture.c 		clear_bit(ST_CAPT_BUSY, &fimc->state);
fimc              546 drivers/media/platform/exynos4-is/fimc-capture.c 		clear_bit(ST_CAPT_SUSPENDED, &fimc->state);
fimc              553 drivers/media/platform/exynos4-is/fimc-capture.c 	pm_runtime_put_sync(&fimc->pdev->dev);
fimc              554 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc              577 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              578 drivers/media/platform/exynos4-is/fimc-capture.c 	const struct fimc_variant *var = fimc->variant;
fimc              654 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              655 drivers/media/platform/exynos4-is/fimc-capture.c 	const struct fimc_variant *var = fimc->variant;
fimc              726 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc              728 drivers/media/platform/exynos4-is/fimc-capture.c 	__fimc_vidioc_querycap(&fimc->pdev->dev, cap);
fimc              773 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              774 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_pipeline *p = to_fimc_pipeline(fimc->vid_cap.ve.pipe);
fimc              806 drivers/media/platform/exynos4-is/fimc-capture.c 		while (me != &fimc->vid_cap.subdev.entity) {
fimc              902 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc              904 drivers/media/platform/exynos4-is/fimc-capture.c 	__fimc_get_format(&fimc->vid_cap.ctx->d_frame, f);
fimc              913 drivers/media/platform/exynos4-is/fimc-capture.c static int __video_try_or_set_format(struct fimc_dev *fimc,
fimc              919 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc              957 drivers/media/platform/exynos4-is/fimc-capture.c 		mf = try ? &mbus_fmt : &fimc->vid_cap.ci_fmt;
fimc              997 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1000 drivers/media/platform/exynos4-is/fimc-capture.c 	return __video_try_or_set_format(fimc, f, true, &inp_fmt, &out_fmt);
fimc             1017 drivers/media/platform/exynos4-is/fimc-capture.c static int __fimc_capture_set_format(struct fimc_dev *fimc,
fimc             1020 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc             1027 drivers/media/platform/exynos4-is/fimc-capture.c 	if (vb2_is_busy(&fimc->vid_cap.vbq))
fimc             1030 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = __video_try_or_set_format(fimc, f, false, &inp_fmt, &ff->fmt);
fimc             1062 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1064 drivers/media/platform/exynos4-is/fimc-capture.c 	return __fimc_capture_set_format(fimc, f);
fimc             1070 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1071 drivers/media/platform/exynos4-is/fimc-capture.c 	struct exynos_video_entity *ve = &fimc->vid_cap.ve;
fimc             1106 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_pipeline_validate(struct fimc_dev *fimc)
fimc             1109 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc             1187 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1188 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc             1194 drivers/media/platform/exynos4-is/fimc-capture.c 	if (fimc_capture_active(fimc))
fimc             1219 drivers/media/platform/exynos4-is/fimc-capture.c 		ret = fimc_pipeline_validate(fimc);
fimc             1238 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1239 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc             1254 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1260 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc->vid_cap.reqbufs_count = reqbufs->count;
fimc             1268 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1269 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_ctx *ctx = fimc->vid_cap.ctx;
fimc             1318 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc             1319 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_ctx *ctx = fimc->vid_cap.ctx;
fimc             1345 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc             1348 drivers/media/platform/exynos4-is/fimc-capture.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1350 drivers/media/platform/exynos4-is/fimc-capture.c 	set_bit(ST_CAPT_APPLY_CFG, &fimc->state);
fimc             1387 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1388 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc             1394 drivers/media/platform/exynos4-is/fimc-capture.c 	if (WARN_ON(fimc == NULL))
fimc             1399 drivers/media/platform/exynos4-is/fimc-capture.c 	    fimc->vid_cap.input);
fimc             1402 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc->vid_cap.input = 0;
fimc             1446 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc;
fimc             1457 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc = si ? source_to_sensor_info(si)->host : NULL;
fimc             1459 drivers/media/platform/exynos4-is/fimc-capture.c 	if (fimc && arg && notification == S5P_FIMC_TX_END_NOTIFY &&
fimc             1460 drivers/media/platform/exynos4-is/fimc-capture.c 	    test_bit(ST_CAPT_PEND, &fimc->state)) {
fimc             1462 drivers/media/platform/exynos4-is/fimc-capture.c 		spin_lock_irqsave(&fimc->slock, irq_flags);
fimc             1463 drivers/media/platform/exynos4-is/fimc-capture.c 		if (!list_empty(&fimc->vid_cap.active_buf_q)) {
fimc             1464 drivers/media/platform/exynos4-is/fimc-capture.c 			buf = list_entry(fimc->vid_cap.active_buf_q.next,
fimc             1469 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_capture_irq_handler(fimc, 1);
fimc             1470 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_deactivate_capture(fimc);
fimc             1471 drivers/media/platform/exynos4-is/fimc-capture.c 		spin_unlock_irqrestore(&fimc->slock, irq_flags);
fimc             1493 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1494 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_ctx *ctx = fimc->vid_cap.ctx;
fimc             1505 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc             1516 drivers/media/platform/exynos4-is/fimc-capture.c 		*mf = fimc->vid_cap.wb_fmt;
fimc             1520 drivers/media/platform/exynos4-is/fimc-capture.c 		*mf = fimc->vid_cap.ci_fmt;
fimc             1524 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc             1534 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1536 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc             1547 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc             1550 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc             1575 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc             1592 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc             1600 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1601 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_ctx *ctx = fimc->vid_cap.ctx;
fimc             1609 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc             1620 drivers/media/platform/exynos4-is/fimc-capture.c 		mutex_unlock(&fimc->lock);
fimc             1631 drivers/media/platform/exynos4-is/fimc-capture.c 		mutex_unlock(&fimc->lock);
fimc             1648 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc             1656 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1657 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_ctx *ctx = fimc->vid_cap.ctx;
fimc             1666 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc             1678 drivers/media/platform/exynos4-is/fimc-capture.c 		mutex_unlock(&fimc->lock);
fimc             1685 drivers/media/platform/exynos4-is/fimc-capture.c 		spin_lock_irqsave(&fimc->slock, flags);
fimc             1687 drivers/media/platform/exynos4-is/fimc-capture.c 		set_bit(ST_CAPT_APPLY_CFG, &fimc->state);
fimc             1690 drivers/media/platform/exynos4-is/fimc-capture.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1696 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc             1713 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_capture_set_default_format(struct fimc_dev *fimc)
fimc             1726 drivers/media/platform/exynos4-is/fimc-capture.c 	return __fimc_capture_set_format(fimc, &fmt);
fimc             1730 drivers/media/platform/exynos4-is/fimc-capture.c static int fimc_register_capture_device(struct fimc_dev *fimc,
fimc             1733 drivers/media/platform/exynos4-is/fimc-capture.c 	struct video_device *vfd = &fimc->vid_cap.ve.vdev;
fimc             1734 drivers/media/platform/exynos4-is/fimc-capture.c 	struct vb2_queue *q = &fimc->vid_cap.vbq;
fimc             1744 drivers/media/platform/exynos4-is/fimc-capture.c 	ctx->fimc_dev	 = fimc;
fimc             1752 drivers/media/platform/exynos4-is/fimc-capture.c 	snprintf(vfd->name, sizeof(vfd->name), "fimc.%d.capture", fimc->id);
fimc             1760 drivers/media/platform/exynos4-is/fimc-capture.c 	vfd->lock	= &fimc->lock;
fimc             1763 drivers/media/platform/exynos4-is/fimc-capture.c 	video_set_drvdata(vfd, fimc);
fimc             1764 drivers/media/platform/exynos4-is/fimc-capture.c 	vid_cap = &fimc->vid_cap;
fimc             1780 drivers/media/platform/exynos4-is/fimc-capture.c 	q->lock = &fimc->lock;
fimc             1781 drivers/media/platform/exynos4-is/fimc-capture.c 	q->dev = &fimc->pdev->dev;
fimc             1832 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1835 drivers/media/platform/exynos4-is/fimc-capture.c 	if (fimc == NULL)
fimc             1838 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = fimc_register_m2m_device(fimc, sd->v4l2_dev);
fimc             1842 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->vid_cap.ve.pipe = v4l2_get_subdev_hostdata(sd);
fimc             1844 drivers/media/platform/exynos4-is/fimc-capture.c 	ret = fimc_register_capture_device(fimc, sd->v4l2_dev);
fimc             1846 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_unregister_m2m_device(fimc);
fimc             1847 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc->vid_cap.ve.pipe = NULL;
fimc             1855 drivers/media/platform/exynos4-is/fimc-capture.c 	struct fimc_dev *fimc = v4l2_get_subdevdata(sd);
fimc             1858 drivers/media/platform/exynos4-is/fimc-capture.c 	if (fimc == NULL)
fimc             1861 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_lock(&fimc->lock);
fimc             1863 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc_unregister_m2m_device(fimc);
fimc             1864 drivers/media/platform/exynos4-is/fimc-capture.c 	vdev = &fimc->vid_cap.ve.vdev;
fimc             1869 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc_ctrls_delete(fimc->vid_cap.ctx);
fimc             1870 drivers/media/platform/exynos4-is/fimc-capture.c 		fimc->vid_cap.ve.pipe = NULL;
fimc             1872 drivers/media/platform/exynos4-is/fimc-capture.c 	kfree(fimc->vid_cap.ctx);
fimc             1873 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->vid_cap.ctx = NULL;
fimc             1875 drivers/media/platform/exynos4-is/fimc-capture.c 	mutex_unlock(&fimc->lock);
fimc             1883 drivers/media/platform/exynos4-is/fimc-capture.c int fimc_initialize_capture_subdev(struct fimc_dev *fimc)
fimc             1885 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = &fimc->vid_cap.subdev;
fimc             1890 drivers/media/platform/exynos4-is/fimc-capture.c 	snprintf(sd->name, sizeof(sd->name), "FIMC.%d", fimc->id);
fimc             1892 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->vid_cap.sd_pads[FIMC_SD_PAD_SINK_CAM].flags = MEDIA_PAD_FL_SINK;
fimc             1893 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->vid_cap.sd_pads[FIMC_SD_PAD_SINK_FIFO].flags = MEDIA_PAD_FL_SINK;
fimc             1894 drivers/media/platform/exynos4-is/fimc-capture.c 	fimc->vid_cap.sd_pads[FIMC_SD_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
fimc             1896 drivers/media/platform/exynos4-is/fimc-capture.c 				fimc->vid_cap.sd_pads);
fimc             1902 drivers/media/platform/exynos4-is/fimc-capture.c 	v4l2_set_subdevdata(sd, fimc);
fimc             1906 drivers/media/platform/exynos4-is/fimc-capture.c void fimc_unregister_capture_subdev(struct fimc_dev *fimc)
fimc             1908 drivers/media/platform/exynos4-is/fimc-capture.c 	struct v4l2_subdev *sd = &fimc->vid_cap.subdev;
fimc              292 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc = priv;
fimc              295 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_hw_clear_irq(fimc);
fimc              297 drivers/media/platform/exynos4-is/fimc-core.c 	spin_lock(&fimc->slock);
fimc              299 drivers/media/platform/exynos4-is/fimc-core.c 	if (test_and_clear_bit(ST_M2M_PEND, &fimc->state)) {
fimc              300 drivers/media/platform/exynos4-is/fimc-core.c 		if (test_and_clear_bit(ST_M2M_SUSPENDING, &fimc->state)) {
fimc              301 drivers/media/platform/exynos4-is/fimc-core.c 			set_bit(ST_M2M_SUSPENDED, &fimc->state);
fimc              302 drivers/media/platform/exynos4-is/fimc-core.c 			wake_up(&fimc->irq_queue);
fimc              305 drivers/media/platform/exynos4-is/fimc-core.c 		ctx = v4l2_m2m_get_curr_priv(fimc->m2m.m2m_dev);
fimc              307 drivers/media/platform/exynos4-is/fimc-core.c 			spin_unlock(&fimc->slock);
fimc              312 drivers/media/platform/exynos4-is/fimc-core.c 				wake_up(&fimc->irq_queue);
fimc              316 drivers/media/platform/exynos4-is/fimc-core.c 	} else if (test_bit(ST_CAPT_PEND, &fimc->state)) {
fimc              317 drivers/media/platform/exynos4-is/fimc-core.c 		int last_buf = test_bit(ST_CAPT_JPEG, &fimc->state) &&
fimc              318 drivers/media/platform/exynos4-is/fimc-core.c 				fimc->vid_cap.reqbufs_count == 1;
fimc              319 drivers/media/platform/exynos4-is/fimc-core.c 		fimc_capture_irq_handler(fimc, !last_buf);
fimc              322 drivers/media/platform/exynos4-is/fimc-core.c 	spin_unlock(&fimc->slock);
fimc              509 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              510 drivers/media/platform/exynos4-is/fimc-core.c 	const struct fimc_variant *variant = fimc->variant;
fimc              526 drivers/media/platform/exynos4-is/fimc-core.c 		if (fimc_capture_pending(fimc)) {
fimc              552 drivers/media/platform/exynos4-is/fimc-core.c 	set_bit(ST_CAPT_APPLY_CFG, &fimc->state);
fimc              659 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              662 drivers/media/platform/exynos4-is/fimc-core.c 	if (ctrl == NULL || !fimc->drv_data->alpha_color)
fimc              781 drivers/media/platform/exynos4-is/fimc-core.c static void fimc_clk_put(struct fimc_dev *fimc)
fimc              785 drivers/media/platform/exynos4-is/fimc-core.c 		if (IS_ERR(fimc->clock[i]))
fimc              787 drivers/media/platform/exynos4-is/fimc-core.c 		clk_unprepare(fimc->clock[i]);
fimc              788 drivers/media/platform/exynos4-is/fimc-core.c 		clk_put(fimc->clock[i]);
fimc              789 drivers/media/platform/exynos4-is/fimc-core.c 		fimc->clock[i] = ERR_PTR(-EINVAL);
fimc              793 drivers/media/platform/exynos4-is/fimc-core.c static int fimc_clk_get(struct fimc_dev *fimc)
fimc              798 drivers/media/platform/exynos4-is/fimc-core.c 		fimc->clock[i] = ERR_PTR(-EINVAL);
fimc              801 drivers/media/platform/exynos4-is/fimc-core.c 		fimc->clock[i] = clk_get(&fimc->pdev->dev, fimc_clocks[i]);
fimc              802 drivers/media/platform/exynos4-is/fimc-core.c 		if (IS_ERR(fimc->clock[i])) {
fimc              803 drivers/media/platform/exynos4-is/fimc-core.c 			ret = PTR_ERR(fimc->clock[i]);
fimc              806 drivers/media/platform/exynos4-is/fimc-core.c 		ret = clk_prepare(fimc->clock[i]);
fimc              808 drivers/media/platform/exynos4-is/fimc-core.c 			clk_put(fimc->clock[i]);
fimc              809 drivers/media/platform/exynos4-is/fimc-core.c 			fimc->clock[i] = ERR_PTR(-EINVAL);
fimc              815 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_clk_put(fimc);
fimc              816 drivers/media/platform/exynos4-is/fimc-core.c 	dev_err(&fimc->pdev->dev, "failed to get clock: %s\n",
fimc              822 drivers/media/platform/exynos4-is/fimc-core.c static int fimc_m2m_suspend(struct fimc_dev *fimc)
fimc              827 drivers/media/platform/exynos4-is/fimc-core.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              828 drivers/media/platform/exynos4-is/fimc-core.c 	if (!fimc_m2m_pending(fimc)) {
fimc              829 drivers/media/platform/exynos4-is/fimc-core.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc              832 drivers/media/platform/exynos4-is/fimc-core.c 	clear_bit(ST_M2M_SUSPENDED, &fimc->state);
fimc              833 drivers/media/platform/exynos4-is/fimc-core.c 	set_bit(ST_M2M_SUSPENDING, &fimc->state);
fimc              834 drivers/media/platform/exynos4-is/fimc-core.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              836 drivers/media/platform/exynos4-is/fimc-core.c 	timeout = wait_event_timeout(fimc->irq_queue,
fimc              837 drivers/media/platform/exynos4-is/fimc-core.c 			     test_bit(ST_M2M_SUSPENDED, &fimc->state),
fimc              840 drivers/media/platform/exynos4-is/fimc-core.c 	clear_bit(ST_M2M_SUSPENDING, &fimc->state);
fimc              844 drivers/media/platform/exynos4-is/fimc-core.c static int fimc_m2m_resume(struct fimc_dev *fimc)
fimc              849 drivers/media/platform/exynos4-is/fimc-core.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              851 drivers/media/platform/exynos4-is/fimc-core.c 	ctx = fimc->m2m.ctx;
fimc              852 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->m2m.ctx = NULL;
fimc              853 drivers/media/platform/exynos4-is/fimc-core.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              855 drivers/media/platform/exynos4-is/fimc-core.c 	if (test_and_clear_bit(ST_M2M_SUSPENDED, &fimc->state))
fimc              864 drivers/media/platform/exynos4-is/fimc-core.c static int fimc_parse_dt(struct fimc_dev *fimc, u32 *clk_freq)
fimc              866 drivers/media/platform/exynos4-is/fimc-core.c 	struct device *dev = &fimc->pdev->dev;
fimc              884 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->drv_data = of_id->data;
fimc              916 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->id = of_alias_get_id(node, "fimc");
fimc              918 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->variant = v;
fimc              926 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc;
fimc              930 drivers/media/platform/exynos4-is/fimc-core.c 	fimc = devm_kzalloc(dev, sizeof(*fimc), GFP_KERNEL);
fimc              931 drivers/media/platform/exynos4-is/fimc-core.c 	if (!fimc)
fimc              934 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->pdev = pdev;
fimc              937 drivers/media/platform/exynos4-is/fimc-core.c 		ret = fimc_parse_dt(fimc, &lclk_freq);
fimc              941 drivers/media/platform/exynos4-is/fimc-core.c 		fimc->drv_data = fimc_get_drvdata(pdev);
fimc              942 drivers/media/platform/exynos4-is/fimc-core.c 		fimc->id = pdev->id;
fimc              944 drivers/media/platform/exynos4-is/fimc-core.c 	if (!fimc->drv_data || fimc->id >= fimc->drv_data->num_entities ||
fimc              945 drivers/media/platform/exynos4-is/fimc-core.c 	    fimc->id < 0) {
fimc              947 drivers/media/platform/exynos4-is/fimc-core.c 			fimc->id);
fimc              951 drivers/media/platform/exynos4-is/fimc-core.c 		fimc->variant = fimc->drv_data->variant[fimc->id];
fimc              953 drivers/media/platform/exynos4-is/fimc-core.c 	init_waitqueue_head(&fimc->irq_queue);
fimc              954 drivers/media/platform/exynos4-is/fimc-core.c 	spin_lock_init(&fimc->slock);
fimc              955 drivers/media/platform/exynos4-is/fimc-core.c 	mutex_init(&fimc->lock);
fimc              957 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->sysreg = fimc_get_sysreg_regmap(dev->of_node);
fimc              958 drivers/media/platform/exynos4-is/fimc-core.c 	if (IS_ERR(fimc->sysreg))
fimc              959 drivers/media/platform/exynos4-is/fimc-core.c 		return PTR_ERR(fimc->sysreg);
fimc              962 drivers/media/platform/exynos4-is/fimc-core.c 	fimc->regs = devm_ioremap_resource(dev, res);
fimc              963 drivers/media/platform/exynos4-is/fimc-core.c 	if (IS_ERR(fimc->regs))
fimc              964 drivers/media/platform/exynos4-is/fimc-core.c 		return PTR_ERR(fimc->regs);
fimc              972 drivers/media/platform/exynos4-is/fimc-core.c 	ret = fimc_clk_get(fimc);
fimc              977 drivers/media/platform/exynos4-is/fimc-core.c 		lclk_freq = fimc->drv_data->lclk_frequency;
fimc              979 drivers/media/platform/exynos4-is/fimc-core.c 	ret = clk_set_rate(fimc->clock[CLK_BUS], lclk_freq);
fimc              983 drivers/media/platform/exynos4-is/fimc-core.c 	ret = clk_enable(fimc->clock[CLK_BUS]);
fimc              988 drivers/media/platform/exynos4-is/fimc-core.c 			       0, dev_name(dev), fimc);
fimc              994 drivers/media/platform/exynos4-is/fimc-core.c 	ret = fimc_initialize_capture_subdev(fimc);
fimc              998 drivers/media/platform/exynos4-is/fimc-core.c 	platform_set_drvdata(pdev, fimc);
fimc             1002 drivers/media/platform/exynos4-is/fimc-core.c 		ret = clk_enable(fimc->clock[CLK_GATE]);
fimc             1009 drivers/media/platform/exynos4-is/fimc-core.c 	dev_dbg(dev, "FIMC.%d registered successfully\n", fimc->id);
fimc             1013 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_unregister_capture_subdev(fimc);
fimc             1015 drivers/media/platform/exynos4-is/fimc-core.c 	clk_disable(fimc->clock[CLK_BUS]);
fimc             1016 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_clk_put(fimc);
fimc             1023 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc =	dev_get_drvdata(dev);
fimc             1025 drivers/media/platform/exynos4-is/fimc-core.c 	dbg("fimc%d: state: 0x%lx", fimc->id, fimc->state);
fimc             1028 drivers/media/platform/exynos4-is/fimc-core.c 	clk_enable(fimc->clock[CLK_GATE]);
fimc             1029 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_hw_reset(fimc);
fimc             1032 drivers/media/platform/exynos4-is/fimc-core.c 	if (fimc_capture_busy(fimc))
fimc             1033 drivers/media/platform/exynos4-is/fimc-core.c 		return fimc_capture_resume(fimc);
fimc             1035 drivers/media/platform/exynos4-is/fimc-core.c 	return fimc_m2m_resume(fimc);
fimc             1040 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc =	dev_get_drvdata(dev);
fimc             1043 drivers/media/platform/exynos4-is/fimc-core.c 	if (fimc_capture_busy(fimc))
fimc             1044 drivers/media/platform/exynos4-is/fimc-core.c 		ret = fimc_capture_suspend(fimc);
fimc             1046 drivers/media/platform/exynos4-is/fimc-core.c 		ret = fimc_m2m_suspend(fimc);
fimc             1048 drivers/media/platform/exynos4-is/fimc-core.c 		clk_disable(fimc->clock[CLK_GATE]);
fimc             1050 drivers/media/platform/exynos4-is/fimc-core.c 	dbg("fimc%d: state: 0x%lx", fimc->id, fimc->state);
fimc             1058 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc =	dev_get_drvdata(dev);
fimc             1061 drivers/media/platform/exynos4-is/fimc-core.c 	dbg("fimc%d: state: 0x%lx", fimc->id, fimc->state);
fimc             1064 drivers/media/platform/exynos4-is/fimc-core.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc             1065 drivers/media/platform/exynos4-is/fimc-core.c 	if (!test_and_clear_bit(ST_LPM, &fimc->state) ||
fimc             1066 drivers/media/platform/exynos4-is/fimc-core.c 	    (!fimc_m2m_active(fimc) && !fimc_capture_busy(fimc))) {
fimc             1067 drivers/media/platform/exynos4-is/fimc-core.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1070 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_hw_reset(fimc);
fimc             1071 drivers/media/platform/exynos4-is/fimc-core.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1073 drivers/media/platform/exynos4-is/fimc-core.c 	if (fimc_capture_busy(fimc))
fimc             1074 drivers/media/platform/exynos4-is/fimc-core.c 		return fimc_capture_resume(fimc);
fimc             1076 drivers/media/platform/exynos4-is/fimc-core.c 	return fimc_m2m_resume(fimc);
fimc             1081 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc =	dev_get_drvdata(dev);
fimc             1083 drivers/media/platform/exynos4-is/fimc-core.c 	dbg("fimc%d: state: 0x%lx", fimc->id, fimc->state);
fimc             1085 drivers/media/platform/exynos4-is/fimc-core.c 	if (test_and_set_bit(ST_LPM, &fimc->state))
fimc             1087 drivers/media/platform/exynos4-is/fimc-core.c 	if (fimc_capture_busy(fimc))
fimc             1088 drivers/media/platform/exynos4-is/fimc-core.c 		return fimc_capture_suspend(fimc);
fimc             1090 drivers/media/platform/exynos4-is/fimc-core.c 	return fimc_m2m_suspend(fimc);
fimc             1096 drivers/media/platform/exynos4-is/fimc-core.c 	struct fimc_dev *fimc = platform_get_drvdata(pdev);
fimc             1100 drivers/media/platform/exynos4-is/fimc-core.c 		clk_disable(fimc->clock[CLK_GATE]);
fimc             1103 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_unregister_capture_subdev(fimc);
fimc             1106 drivers/media/platform/exynos4-is/fimc-core.c 	clk_disable(fimc->clock[CLK_BUS]);
fimc             1107 drivers/media/platform/exynos4-is/fimc-core.c 	fimc_clk_put(fimc);
fimc              531 drivers/media/platform/exynos4-is/fimc-core.h static inline bool fimc_capture_active(struct fimc_dev *fimc)
fimc              536 drivers/media/platform/exynos4-is/fimc-core.h 	spin_lock_irqsave(&fimc->slock, flags);
fimc              537 drivers/media/platform/exynos4-is/fimc-core.h 	ret = !!(fimc->state & (1 << ST_CAPT_RUN) ||
fimc              538 drivers/media/platform/exynos4-is/fimc-core.h 		 fimc->state & (1 << ST_CAPT_PEND));
fimc              539 drivers/media/platform/exynos4-is/fimc-core.h 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              637 drivers/media/platform/exynos4-is/fimc-core.h void fimc_capture_irq_handler(struct fimc_dev *fimc, int deq_buf);
fimc              639 drivers/media/platform/exynos4-is/fimc-core.h int fimc_register_m2m_device(struct fimc_dev *fimc,
fimc              641 drivers/media/platform/exynos4-is/fimc-core.h void fimc_unregister_m2m_device(struct fimc_dev *fimc);
fimc              660 drivers/media/platform/exynos4-is/fimc-core.h int fimc_initialize_capture_subdev(struct fimc_dev *fimc);
fimc              661 drivers/media/platform/exynos4-is/fimc-core.h void fimc_unregister_capture_subdev(struct fimc_dev *fimc);
fimc              662 drivers/media/platform/exynos4-is/fimc-core.h int fimc_capture_ctrls_create(struct fimc_dev *fimc);
fimc              665 drivers/media/platform/exynos4-is/fimc-core.h int fimc_capture_suspend(struct fimc_dev *fimc);
fimc              666 drivers/media/platform/exynos4-is/fimc-core.h int fimc_capture_resume(struct fimc_dev *fimc);
fimc              132 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_hw_init(struct fimc_lite *fimc, bool isp_output)
fimc              137 drivers/media/platform/exynos4-is/fimc-lite.c 	if (fimc->sensor == NULL)
fimc              140 drivers/media/platform/exynos4-is/fimc-lite.c 	if (fimc->inp_frame.fmt == NULL || fimc->out_frame.fmt == NULL)
fimc              144 drivers/media/platform/exynos4-is/fimc-lite.c 	si = v4l2_get_subdev_hostdata(fimc->sensor);
fimc              148 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              150 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_camera_bus(fimc, si);
fimc              151 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_source_format(fimc, &fimc->inp_frame);
fimc              152 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_window_offset(fimc, &fimc->inp_frame);
fimc              153 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_dma_buf_mask(fimc, 0);
fimc              154 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_output_dma(fimc, &fimc->out_frame, !isp_output);
fimc              155 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_interrupt_mask(fimc);
fimc              156 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_test_pattern(fimc, fimc->test_pattern->val);
fimc              159 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_dump_regs(fimc, __func__);
fimc              161 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              173 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_reinit(struct fimc_lite *fimc, bool suspend)
fimc              179 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              180 drivers/media/platform/exynos4-is/fimc-lite.c 	streaming = fimc->state & (1 << ST_SENSOR_STREAM);
fimc              182 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->state &= ~(1 << ST_FLITE_RUN | 1 << ST_FLITE_OFF |
fimc              185 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->state |= (1 << ST_FLITE_SUSPENDED);
fimc              187 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->state &= ~(1 << ST_FLITE_PENDING |
fimc              191 drivers/media/platform/exynos4-is/fimc-lite.c 	while (!suspend && !list_empty(&fimc->pending_buf_q)) {
fimc              192 drivers/media/platform/exynos4-is/fimc-lite.c 		buf = fimc_lite_pending_queue_pop(fimc);
fimc              196 drivers/media/platform/exynos4-is/fimc-lite.c 	while (!list_empty(&fimc->active_buf_q)) {
fimc              197 drivers/media/platform/exynos4-is/fimc-lite.c 		buf = fimc_lite_active_queue_pop(fimc);
fimc              199 drivers/media/platform/exynos4-is/fimc-lite.c 			fimc_lite_pending_queue_add(fimc, buf);
fimc              204 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              206 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_reset(fimc);
fimc              211 drivers/media/platform/exynos4-is/fimc-lite.c 	return fimc_pipeline_call(&fimc->ve, set_stream, 0);
fimc              214 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_stop_capture(struct fimc_lite *fimc, bool suspend)
fimc              218 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!fimc_lite_active(fimc))
fimc              221 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              222 drivers/media/platform/exynos4-is/fimc-lite.c 	set_bit(ST_FLITE_OFF, &fimc->state);
fimc              223 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_capture_stop(fimc);
fimc              224 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              226 drivers/media/platform/exynos4-is/fimc-lite.c 	wait_event_timeout(fimc->irq_queue,
fimc              227 drivers/media/platform/exynos4-is/fimc-lite.c 			   !test_bit(ST_FLITE_OFF, &fimc->state),
fimc              230 drivers/media/platform/exynos4-is/fimc-lite.c 	return fimc_lite_reinit(fimc, suspend);
fimc              234 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_config_update(struct fimc_lite *fimc)
fimc              236 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_window_offset(fimc, &fimc->inp_frame);
fimc              237 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_dma_window(fimc, &fimc->out_frame);
fimc              238 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_set_test_pattern(fimc, fimc->test_pattern->val);
fimc              239 drivers/media/platform/exynos4-is/fimc-lite.c 	clear_bit(ST_FLITE_CONFIG, &fimc->state);
fimc              244 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = priv;
fimc              249 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              251 drivers/media/platform/exynos4-is/fimc-lite.c 	intsrc = flite_hw_get_interrupt_source(fimc);
fimc              252 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_clear_pending_irq(fimc);
fimc              254 drivers/media/platform/exynos4-is/fimc-lite.c 	if (test_and_clear_bit(ST_FLITE_OFF, &fimc->state)) {
fimc              255 drivers/media/platform/exynos4-is/fimc-lite.c 		wake_up(&fimc->irq_queue);
fimc              260 drivers/media/platform/exynos4-is/fimc-lite.c 		clear_bit(ST_FLITE_RUN, &fimc->state);
fimc              261 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->events.data_overflow++;
fimc              265 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_clear_last_capture_end(fimc);
fimc              266 drivers/media/platform/exynos4-is/fimc-lite.c 		clear_bit(ST_FLITE_STREAM, &fimc->state);
fimc              267 drivers/media/platform/exynos4-is/fimc-lite.c 		wake_up(&fimc->irq_queue);
fimc              270 drivers/media/platform/exynos4-is/fimc-lite.c 	if (atomic_read(&fimc->out_path) != FIMC_IO_DMA)
fimc              274 drivers/media/platform/exynos4-is/fimc-lite.c 	    test_bit(ST_FLITE_RUN, &fimc->state) &&
fimc              275 drivers/media/platform/exynos4-is/fimc-lite.c 	    !list_empty(&fimc->pending_buf_q)) {
fimc              276 drivers/media/platform/exynos4-is/fimc-lite.c 		vbuf = fimc_lite_pending_queue_pop(fimc);
fimc              277 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_set_dma_buffer(fimc, vbuf);
fimc              278 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_active_queue_add(fimc, vbuf);
fimc              282 drivers/media/platform/exynos4-is/fimc-lite.c 	    test_bit(ST_FLITE_RUN, &fimc->state) &&
fimc              283 drivers/media/platform/exynos4-is/fimc-lite.c 	    !list_empty(&fimc->active_buf_q)) {
fimc              284 drivers/media/platform/exynos4-is/fimc-lite.c 		vbuf = fimc_lite_active_queue_pop(fimc);
fimc              286 drivers/media/platform/exynos4-is/fimc-lite.c 		vbuf->vb.sequence = fimc->frame_count++;
fimc              287 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_mask_dma_buffer(fimc, vbuf->index);
fimc              291 drivers/media/platform/exynos4-is/fimc-lite.c 	if (test_bit(ST_FLITE_CONFIG, &fimc->state))
fimc              292 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_config_update(fimc);
fimc              294 drivers/media/platform/exynos4-is/fimc-lite.c 	if (list_empty(&fimc->pending_buf_q)) {
fimc              295 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_capture_stop(fimc);
fimc              296 drivers/media/platform/exynos4-is/fimc-lite.c 		clear_bit(ST_FLITE_STREAM, &fimc->state);
fimc              299 drivers/media/platform/exynos4-is/fimc-lite.c 	set_bit(ST_FLITE_RUN, &fimc->state);
fimc              300 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              306 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = q->drv_priv;
fimc              310 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              312 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->buf_index = 0;
fimc              313 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->frame_count = 0;
fimc              315 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              317 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_lite_hw_init(fimc, false);
fimc              319 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_reinit(fimc, false);
fimc              323 drivers/media/platform/exynos4-is/fimc-lite.c 	set_bit(ST_FLITE_PENDING, &fimc->state);
fimc              325 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!list_empty(&fimc->active_buf_q) &&
fimc              326 drivers/media/platform/exynos4-is/fimc-lite.c 	    !test_and_set_bit(ST_FLITE_STREAM, &fimc->state)) {
fimc              327 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_capture_start(fimc);
fimc              329 drivers/media/platform/exynos4-is/fimc-lite.c 		if (!test_and_set_bit(ST_SENSOR_STREAM, &fimc->state))
fimc              330 drivers/media/platform/exynos4-is/fimc-lite.c 			fimc_pipeline_call(&fimc->ve, set_stream, 1);
fimc              333 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_dump_regs(fimc, __func__);
fimc              340 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = q->drv_priv;
fimc              342 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!fimc_lite_active(fimc))
fimc              345 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_stop_capture(fimc, false);
fimc              352 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = vq->drv_priv;
fimc              353 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *frame = &fimc->out_frame;
fimc              381 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = vq->drv_priv;
fimc              384 drivers/media/platform/exynos4-is/fimc-lite.c 	if (fimc->out_frame.fmt == NULL)
fimc              387 drivers/media/platform/exynos4-is/fimc-lite.c 	for (i = 0; i < fimc->out_frame.fmt->memplanes; i++) {
fimc              388 drivers/media/platform/exynos4-is/fimc-lite.c 		unsigned long size = fimc->payload[i];
fimc              391 drivers/media/platform/exynos4-is/fimc-lite.c 			v4l2_err(&fimc->ve.vdev,
fimc              407 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = vb2_get_drv_priv(vb->vb2_queue);
fimc              410 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              413 drivers/media/platform/exynos4-is/fimc-lite.c 	buf->index = fimc->buf_index++;
fimc              414 drivers/media/platform/exynos4-is/fimc-lite.c 	if (fimc->buf_index >= fimc->reqbufs_count)
fimc              415 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->buf_index = 0;
fimc              417 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!test_bit(ST_FLITE_SUSPENDED, &fimc->state) &&
fimc              418 drivers/media/platform/exynos4-is/fimc-lite.c 	    !test_bit(ST_FLITE_STREAM, &fimc->state) &&
fimc              419 drivers/media/platform/exynos4-is/fimc-lite.c 	    list_empty(&fimc->active_buf_q)) {
fimc              420 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_set_dma_buffer(fimc, buf);
fimc              421 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_active_queue_add(fimc, buf);
fimc              423 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_pending_queue_add(fimc, buf);
fimc              426 drivers/media/platform/exynos4-is/fimc-lite.c 	if (vb2_is_streaming(&fimc->vb_queue) &&
fimc              427 drivers/media/platform/exynos4-is/fimc-lite.c 	    !list_empty(&fimc->pending_buf_q) &&
fimc              428 drivers/media/platform/exynos4-is/fimc-lite.c 	    !test_and_set_bit(ST_FLITE_STREAM, &fimc->state)) {
fimc              429 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_capture_start(fimc);
fimc              430 drivers/media/platform/exynos4-is/fimc-lite.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc              432 drivers/media/platform/exynos4-is/fimc-lite.c 		if (!test_and_set_bit(ST_SENSOR_STREAM, &fimc->state))
fimc              433 drivers/media/platform/exynos4-is/fimc-lite.c 			fimc_pipeline_call(&fimc->ve, set_stream, 1);
fimc              436 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              449 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_clear_event_counters(struct fimc_lite *fimc)
fimc              453 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              454 drivers/media/platform/exynos4-is/fimc-lite.c 	memset(&fimc->events, 0, sizeof(fimc->events));
fimc              455 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              460 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              461 drivers/media/platform/exynos4-is/fimc-lite.c 	struct media_entity *me = &fimc->ve.vdev.entity;
fimc              464 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc              465 drivers/media/platform/exynos4-is/fimc-lite.c 	if (atomic_read(&fimc->out_path) != FIMC_IO_DMA) {
fimc              470 drivers/media/platform/exynos4-is/fimc-lite.c 	set_bit(ST_FLITE_IN_USE, &fimc->state);
fimc              471 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = pm_runtime_get_sync(&fimc->pdev->dev);
fimc              480 drivers/media/platform/exynos4-is/fimc-lite.c 	    atomic_read(&fimc->out_path) != FIMC_IO_DMA)
fimc              485 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_pipeline_call(&fimc->ve, open, me, true);
fimc              494 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_clear_event_counters(fimc);
fimc              500 drivers/media/platform/exynos4-is/fimc-lite.c 	pm_runtime_put_sync(&fimc->pdev->dev);
fimc              501 drivers/media/platform/exynos4-is/fimc-lite.c 	clear_bit(ST_FLITE_IN_USE, &fimc->state);
fimc              503 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc              509 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              510 drivers/media/platform/exynos4-is/fimc-lite.c 	struct media_entity *entity = &fimc->ve.vdev.entity;
fimc              512 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc              515 drivers/media/platform/exynos4-is/fimc-lite.c 	    atomic_read(&fimc->out_path) == FIMC_IO_DMA) {
fimc              516 drivers/media/platform/exynos4-is/fimc-lite.c 		if (fimc->streaming) {
fimc              518 drivers/media/platform/exynos4-is/fimc-lite.c 			fimc->streaming = false;
fimc              520 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_lite_stop_capture(fimc, false);
fimc              521 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc_pipeline_call(&fimc->ve, close);
fimc              522 drivers/media/platform/exynos4-is/fimc-lite.c 		clear_bit(ST_FLITE_IN_USE, &fimc->state);
fimc              530 drivers/media/platform/exynos4-is/fimc-lite.c 	pm_runtime_put(&fimc->pdev->dev);
fimc              531 drivers/media/platform/exynos4-is/fimc-lite.c 	clear_bit(ST_FLITE_SUSPENDED, &fimc->state);
fimc              533 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc              550 drivers/media/platform/exynos4-is/fimc-lite.c static const struct fimc_fmt *fimc_lite_subdev_try_fmt(struct fimc_lite *fimc,
fimc              554 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_drvdata *dd = fimc->dd;
fimc              570 drivers/media/platform/exynos4-is/fimc-lite.c 		struct flite_frame *sink = &fimc->inp_frame;
fimc              575 drivers/media/platform/exynos4-is/fimc-lite.c 			sink_fmt = v4l2_subdev_get_try_format(&fimc->subdev, cfg,
fimc              581 drivers/media/platform/exynos4-is/fimc-lite.c 			rect = v4l2_subdev_get_try_crop(&fimc->subdev, cfg,
fimc              596 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, &fimc->subdev, "code: %#x (%d), %dx%d\n",
fimc              602 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_try_crop(struct fimc_lite *fimc, struct v4l2_rect *r)
fimc              604 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *frame = &fimc->inp_frame;
fimc              611 drivers/media/platform/exynos4-is/fimc-lite.c 	r->left = round_down(r->left, fimc->dd->win_hor_offs_align);
fimc              614 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, &fimc->subdev, "(%d,%d)/%dx%d, sink fmt: %dx%d\n",
fimc              619 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_try_compose(struct fimc_lite *fimc, struct v4l2_rect *r)
fimc              621 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *frame = &fimc->out_frame;
fimc              622 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_rect *crop_rect = &fimc->inp_frame.rect;
fimc              631 drivers/media/platform/exynos4-is/fimc-lite.c 	r->left = round_down(r->left, fimc->dd->out_hor_offs_align);
fimc              632 drivers/media/platform/exynos4-is/fimc-lite.c 	r->top  = clamp_t(u32, r->top, 0, fimc->out_frame.f_height - r->height);
fimc              634 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_dbg(1, debug, &fimc->subdev, "(%d,%d)/%dx%d, source fmt: %dx%d\n",
fimc              645 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              650 drivers/media/platform/exynos4-is/fimc-lite.c 					dev_name(&fimc->pdev->dev));
fimc              671 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              674 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *frame = &fimc->out_frame;
fimc              689 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_try_fmt(struct fimc_lite *fimc,
fimc              694 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_drvdata *dd = fimc->dd;
fimc              695 drivers/media/platform/exynos4-is/fimc-lite.c 	const struct fimc_fmt *inp_fmt = fimc->inp_frame.fmt;
fimc              736 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              737 drivers/media/platform/exynos4-is/fimc-lite.c 	return fimc_lite_try_fmt(fimc, &f->fmt.pix_mp, NULL);
fimc              744 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              745 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *frame = &fimc->out_frame;
fimc              749 drivers/media/platform/exynos4-is/fimc-lite.c 	if (vb2_is_busy(&fimc->vb_queue))
fimc              752 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_lite_try_fmt(fimc, &f->fmt.pix_mp, &fmt);
fimc              757 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->payload[0] = max((pixm->width * pixm->height * fmt->depth[0]) / 8,
fimc              765 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_pipeline_validate(struct fimc_lite *fimc)
fimc              767 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = &fimc->subdev;
fimc              778 drivers/media/platform/exynos4-is/fimc-lite.c 		if (sd == &fimc->subdev) {
fimc              779 drivers/media/platform/exynos4-is/fimc-lite.c 			struct flite_frame *ff = &fimc->out_frame;
fimc              782 drivers/media/platform/exynos4-is/fimc-lite.c 			sink_fmt.format.code = fimc->inp_frame.fmt->mbus_code;
fimc              814 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              815 drivers/media/platform/exynos4-is/fimc-lite.c 	struct media_entity *entity = &fimc->ve.vdev.entity;
fimc              818 drivers/media/platform/exynos4-is/fimc-lite.c 	if (fimc_lite_active(fimc))
fimc              821 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = media_pipeline_start(entity, &fimc->ve.pipe->mp);
fimc              825 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_pipeline_validate(fimc);
fimc              829 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->sensor = fimc_find_remote_sensor(&fimc->subdev.entity);
fimc              833 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->streaming = true;
fimc              845 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              852 drivers/media/platform/exynos4-is/fimc-lite.c 	media_pipeline_stop(&fimc->ve.vdev.entity);
fimc              853 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->streaming = false;
fimc              860 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              866 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->reqbufs_count = reqbufs->count;
fimc              887 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              888 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *f = &fimc->out_frame;
fimc              913 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = video_drvdata(file);
fimc              914 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *f = &fimc->out_frame;
fimc              922 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_try_compose(fimc, &rect);
fimc              933 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              935 drivers/media/platform/exynos4-is/fimc-lite.c 	set_bit(ST_FLITE_CONFIG, &fimc->state);
fimc              936 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              965 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc              968 drivers/media/platform/exynos4-is/fimc-lite.c 	if (WARN_ON(fimc == NULL))
fimc              973 drivers/media/platform/exynos4-is/fimc-lite.c 		 flags, fimc->source_subdev_grp_id);
fimc              978 drivers/media/platform/exynos4-is/fimc-lite.c 			if (fimc->source_subdev_grp_id == 0)
fimc              979 drivers/media/platform/exynos4-is/fimc-lite.c 				fimc->source_subdev_grp_id = sd->grp_id;
fimc              983 drivers/media/platform/exynos4-is/fimc-lite.c 			fimc->source_subdev_grp_id = 0;
fimc              984 drivers/media/platform/exynos4-is/fimc-lite.c 			fimc->sensor = NULL;
fimc              990 drivers/media/platform/exynos4-is/fimc-lite.c 			atomic_set(&fimc->out_path, FIMC_IO_NONE);
fimc              992 drivers/media/platform/exynos4-is/fimc-lite.c 			atomic_set(&fimc->out_path, FIMC_IO_DMA);
fimc              997 drivers/media/platform/exynos4-is/fimc-lite.c 			atomic_set(&fimc->out_path, FIMC_IO_NONE);
fimc              999 drivers/media/platform/exynos4-is/fimc-lite.c 			atomic_set(&fimc->out_path, FIMC_IO_ISP);
fimc             1042 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1044 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *f = &fimc->inp_frame;
fimc             1052 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc             1065 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc             1073 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1075 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *sink = &fimc->inp_frame;
fimc             1076 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *source = &fimc->out_frame;
fimc             1082 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc             1084 drivers/media/platform/exynos4-is/fimc-lite.c 	if ((atomic_read(&fimc->out_path) == FIMC_IO_ISP &&
fimc             1086 drivers/media/platform/exynos4-is/fimc-lite.c 	    (atomic_read(&fimc->out_path) == FIMC_IO_DMA &&
fimc             1087 drivers/media/platform/exynos4-is/fimc-lite.c 	    vb2_is_busy(&fimc->vb_queue))) {
fimc             1088 drivers/media/platform/exynos4-is/fimc-lite.c 		mutex_unlock(&fimc->lock);
fimc             1092 drivers/media/platform/exynos4-is/fimc-lite.c 	ffmt = fimc_lite_subdev_try_fmt(fimc, cfg, fmt);
fimc             1106 drivers/media/platform/exynos4-is/fimc-lite.c 		mutex_unlock(&fimc->lock);
fimc             1125 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc             1133 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1134 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *f = &fimc->inp_frame;
fimc             1146 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc             1155 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc             1168 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1169 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *f = &fimc->inp_frame;
fimc             1175 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc             1176 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_try_crop(fimc, &sel->r);
fimc             1182 drivers/media/platform/exynos4-is/fimc-lite.c 		spin_lock_irqsave(&fimc->slock, flags);
fimc             1185 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->out_frame.rect = sel->r;
fimc             1186 drivers/media/platform/exynos4-is/fimc-lite.c 		set_bit(ST_FLITE_CONFIG, &fimc->state);
fimc             1187 drivers/media/platform/exynos4-is/fimc-lite.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1189 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc             1200 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1211 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->sensor = fimc_find_remote_sensor(&sd->entity);
fimc             1213 drivers/media/platform/exynos4-is/fimc-lite.c 	if (atomic_read(&fimc->out_path) != FIMC_IO_ISP)
fimc             1216 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc             1218 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_reset(fimc);
fimc             1219 drivers/media/platform/exynos4-is/fimc-lite.c 		ret = fimc_lite_hw_init(fimc, true);
fimc             1221 drivers/media/platform/exynos4-is/fimc-lite.c 			spin_lock_irqsave(&fimc->slock, flags);
fimc             1222 drivers/media/platform/exynos4-is/fimc-lite.c 			flite_hw_capture_start(fimc);
fimc             1223 drivers/media/platform/exynos4-is/fimc-lite.c 			spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1226 drivers/media/platform/exynos4-is/fimc-lite.c 		set_bit(ST_FLITE_OFF, &fimc->state);
fimc             1228 drivers/media/platform/exynos4-is/fimc-lite.c 		spin_lock_irqsave(&fimc->slock, flags);
fimc             1229 drivers/media/platform/exynos4-is/fimc-lite.c 		flite_hw_capture_stop(fimc);
fimc             1230 drivers/media/platform/exynos4-is/fimc-lite.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1232 drivers/media/platform/exynos4-is/fimc-lite.c 		ret = wait_event_timeout(fimc->irq_queue,
fimc             1233 drivers/media/platform/exynos4-is/fimc-lite.c 				!test_bit(ST_FLITE_OFF, &fimc->state),
fimc             1237 drivers/media/platform/exynos4-is/fimc-lite.c 		clear_bit(ST_FLITE_RUN, &fimc->state);
fimc             1240 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc             1246 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1248 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_dump_regs(fimc, __func__);
fimc             1254 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1255 drivers/media/platform/exynos4-is/fimc-lite.c 	struct vb2_queue *q = &fimc->vb_queue;
fimc             1256 drivers/media/platform/exynos4-is/fimc-lite.c 	struct video_device *vfd = &fimc->ve.vdev;
fimc             1260 drivers/media/platform/exynos4-is/fimc-lite.c 	atomic_set(&fimc->out_path, FIMC_IO_DMA);
fimc             1263 drivers/media/platform/exynos4-is/fimc-lite.c 		 fimc->index);
fimc             1272 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->reqbufs_count = 0;
fimc             1274 drivers/media/platform/exynos4-is/fimc-lite.c 	INIT_LIST_HEAD(&fimc->pending_buf_q);
fimc             1275 drivers/media/platform/exynos4-is/fimc-lite.c 	INIT_LIST_HEAD(&fimc->active_buf_q);
fimc             1283 drivers/media/platform/exynos4-is/fimc-lite.c 	q->drv_priv = fimc;
fimc             1285 drivers/media/platform/exynos4-is/fimc-lite.c 	q->lock = &fimc->lock;
fimc             1286 drivers/media/platform/exynos4-is/fimc-lite.c 	q->dev = &fimc->pdev->dev;
fimc             1292 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->vd_pad.flags = MEDIA_PAD_FL_SINK;
fimc             1293 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = media_entity_pads_init(&vfd->entity, 1, &fimc->vd_pad);
fimc             1297 drivers/media/platform/exynos4-is/fimc-lite.c 	video_set_drvdata(vfd, fimc);
fimc             1298 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->ve.pipe = v4l2_get_subdev_hostdata(sd);
fimc             1303 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->ve.pipe = NULL;
fimc             1314 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
fimc             1316 drivers/media/platform/exynos4-is/fimc-lite.c 	if (fimc == NULL)
fimc             1319 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_lock(&fimc->lock);
fimc             1321 drivers/media/platform/exynos4-is/fimc-lite.c 	if (video_is_registered(&fimc->ve.vdev)) {
fimc             1322 drivers/media/platform/exynos4-is/fimc-lite.c 		video_unregister_device(&fimc->ve.vdev);
fimc             1323 drivers/media/platform/exynos4-is/fimc-lite.c 		media_entity_cleanup(&fimc->ve.vdev.entity);
fimc             1324 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->ve.pipe = NULL;
fimc             1327 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_unlock(&fimc->lock);
fimc             1359 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = container_of(ctrl->handler, struct fimc_lite,
fimc             1361 drivers/media/platform/exynos4-is/fimc-lite.c 	set_bit(ST_FLITE_CONFIG, &fimc->state);
fimc             1377 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_set_default_config(struct fimc_lite *fimc)
fimc             1379 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *sink = &fimc->inp_frame;
fimc             1380 drivers/media/platform/exynos4-is/fimc-lite.c 	struct flite_frame *source = &fimc->out_frame;
fimc             1394 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_create_capture_subdev(struct fimc_lite *fimc)
fimc             1396 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_ctrl_handler *handler = &fimc->ctrl_handler;
fimc             1397 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = &fimc->subdev;
fimc             1402 drivers/media/platform/exynos4-is/fimc-lite.c 	snprintf(sd->name, sizeof(sd->name), "FIMC-LITE.%d", fimc->index);
fimc             1404 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->subdev_pads[FLITE_SD_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
fimc             1405 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->subdev_pads[FLITE_SD_PAD_SOURCE_DMA].flags = MEDIA_PAD_FL_SOURCE;
fimc             1406 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->subdev_pads[FLITE_SD_PAD_SOURCE_ISP].flags = MEDIA_PAD_FL_SOURCE;
fimc             1408 drivers/media/platform/exynos4-is/fimc-lite.c 				fimc->subdev_pads);
fimc             1413 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->test_pattern = v4l2_ctrl_new_custom(handler, &fimc_lite_ctrl,
fimc             1425 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_set_subdevdata(sd, fimc);
fimc             1430 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_unregister_capture_subdev(struct fimc_lite *fimc)
fimc             1432 drivers/media/platform/exynos4-is/fimc-lite.c 	struct v4l2_subdev *sd = &fimc->subdev;
fimc             1436 drivers/media/platform/exynos4-is/fimc-lite.c 	v4l2_ctrl_handler_free(&fimc->ctrl_handler);
fimc             1440 drivers/media/platform/exynos4-is/fimc-lite.c static void fimc_lite_clk_put(struct fimc_lite *fimc)
fimc             1442 drivers/media/platform/exynos4-is/fimc-lite.c 	if (IS_ERR(fimc->clock))
fimc             1445 drivers/media/platform/exynos4-is/fimc-lite.c 	clk_put(fimc->clock);
fimc             1446 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->clock = ERR_PTR(-EINVAL);
fimc             1449 drivers/media/platform/exynos4-is/fimc-lite.c static int fimc_lite_clk_get(struct fimc_lite *fimc)
fimc             1451 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->clock = clk_get(&fimc->pdev->dev, FLITE_CLK_NAME);
fimc             1452 drivers/media/platform/exynos4-is/fimc-lite.c 	return PTR_ERR_OR_ZERO(fimc->clock);
fimc             1462 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc;
fimc             1469 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc = devm_kzalloc(dev, sizeof(*fimc), GFP_KERNEL);
fimc             1470 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!fimc)
fimc             1476 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->index = of_alias_get_id(dev->of_node, "fimc-lite");
fimc             1478 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!drv_data || fimc->index >= drv_data->num_instances ||
fimc             1479 drivers/media/platform/exynos4-is/fimc-lite.c 						fimc->index < 0) {
fimc             1484 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->dd = drv_data;
fimc             1485 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->pdev = pdev;
fimc             1487 drivers/media/platform/exynos4-is/fimc-lite.c 	init_waitqueue_head(&fimc->irq_queue);
fimc             1488 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_init(&fimc->slock);
fimc             1489 drivers/media/platform/exynos4-is/fimc-lite.c 	mutex_init(&fimc->lock);
fimc             1492 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc->regs = devm_ioremap_resource(dev, res);
fimc             1493 drivers/media/platform/exynos4-is/fimc-lite.c 	if (IS_ERR(fimc->regs))
fimc             1494 drivers/media/platform/exynos4-is/fimc-lite.c 		return PTR_ERR(fimc->regs);
fimc             1502 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_lite_clk_get(fimc);
fimc             1507 drivers/media/platform/exynos4-is/fimc-lite.c 			       0, dev_name(dev), fimc);
fimc             1514 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_lite_create_capture_subdev(fimc);
fimc             1518 drivers/media/platform/exynos4-is/fimc-lite.c 	platform_set_drvdata(pdev, fimc);
fimc             1522 drivers/media/platform/exynos4-is/fimc-lite.c 		ret = clk_prepare_enable(fimc->clock);
fimc             1529 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_set_default_config(fimc);
fimc             1532 drivers/media/platform/exynos4-is/fimc-lite.c 		fimc->index);
fimc             1536 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_unregister_capture_subdev(fimc);
fimc             1538 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_clk_put(fimc);
fimc             1545 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = dev_get_drvdata(dev);
fimc             1547 drivers/media/platform/exynos4-is/fimc-lite.c 	clk_prepare_enable(fimc->clock);
fimc             1553 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = dev_get_drvdata(dev);
fimc             1555 drivers/media/platform/exynos4-is/fimc-lite.c 	clk_disable_unprepare(fimc->clock);
fimc             1563 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = dev_get_drvdata(dev);
fimc             1568 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc             1569 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!test_and_clear_bit(ST_LPM, &fimc->state) ||
fimc             1570 drivers/media/platform/exynos4-is/fimc-lite.c 	    !test_bit(ST_FLITE_IN_USE, &fimc->state)) {
fimc             1571 drivers/media/platform/exynos4-is/fimc-lite.c 		spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1574 drivers/media/platform/exynos4-is/fimc-lite.c 	flite_hw_reset(fimc);
fimc             1575 drivers/media/platform/exynos4-is/fimc-lite.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc             1577 drivers/media/platform/exynos4-is/fimc-lite.c 	if (!test_and_clear_bit(ST_FLITE_SUSPENDED, &fimc->state))
fimc             1580 drivers/media/platform/exynos4-is/fimc-lite.c 	INIT_LIST_HEAD(&fimc->active_buf_q);
fimc             1581 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_pipeline_call(&fimc->ve, open,
fimc             1582 drivers/media/platform/exynos4-is/fimc-lite.c 			   &fimc->ve.vdev.entity, false);
fimc             1583 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_hw_init(fimc, atomic_read(&fimc->out_path) == FIMC_IO_ISP);
fimc             1584 drivers/media/platform/exynos4-is/fimc-lite.c 	clear_bit(ST_FLITE_SUSPENDED, &fimc->state);
fimc             1586 drivers/media/platform/exynos4-is/fimc-lite.c 	for (i = 0; i < fimc->reqbufs_count; i++) {
fimc             1587 drivers/media/platform/exynos4-is/fimc-lite.c 		if (list_empty(&fimc->pending_buf_q))
fimc             1589 drivers/media/platform/exynos4-is/fimc-lite.c 		buf = fimc_lite_pending_queue_pop(fimc);
fimc             1597 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = dev_get_drvdata(dev);
fimc             1598 drivers/media/platform/exynos4-is/fimc-lite.c 	bool suspend = test_bit(ST_FLITE_IN_USE, &fimc->state);
fimc             1601 drivers/media/platform/exynos4-is/fimc-lite.c 	if (test_and_set_bit(ST_LPM, &fimc->state))
fimc             1604 drivers/media/platform/exynos4-is/fimc-lite.c 	ret = fimc_lite_stop_capture(fimc, suspend);
fimc             1605 drivers/media/platform/exynos4-is/fimc-lite.c 	if (ret < 0 || !fimc_lite_active(fimc))
fimc             1608 drivers/media/platform/exynos4-is/fimc-lite.c 	return fimc_pipeline_call(&fimc->ve, close);
fimc             1614 drivers/media/platform/exynos4-is/fimc-lite.c 	struct fimc_lite *fimc = platform_get_drvdata(pdev);
fimc             1619 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_unregister_capture_subdev(fimc);
fimc             1621 drivers/media/platform/exynos4-is/fimc-lite.c 	fimc_lite_clk_put(fimc);
fimc              180 drivers/media/platform/exynos4-is/fimc-lite.h static inline bool fimc_lite_active(struct fimc_lite *fimc)
fimc              185 drivers/media/platform/exynos4-is/fimc-lite.h 	spin_lock_irqsave(&fimc->slock, flags);
fimc              186 drivers/media/platform/exynos4-is/fimc-lite.h 	ret = fimc->state & (1 << ST_FLITE_RUN) ||
fimc              187 drivers/media/platform/exynos4-is/fimc-lite.h 		fimc->state & (1 << ST_FLITE_PENDING);
fimc              188 drivers/media/platform/exynos4-is/fimc-lite.h 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc               61 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc               63 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (!fimc_m2m_pending(fimc))
fimc               68 drivers/media/platform/exynos4-is/fimc-m2m.c 	wait_event_timeout(fimc->irq_queue,
fimc               97 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc;
fimc              104 drivers/media/platform/exynos4-is/fimc-m2m.c 	fimc = ctx->fimc_dev;
fimc              105 drivers/media/platform/exynos4-is/fimc-m2m.c 	spin_lock_irqsave(&fimc->slock, flags);
fimc              107 drivers/media/platform/exynos4-is/fimc-m2m.c 	set_bit(ST_M2M_PEND, &fimc->state);
fimc              133 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (fimc->m2m.ctx != ctx) {
fimc              135 drivers/media/platform/exynos4-is/fimc-m2m.c 		fimc->m2m.ctx = ctx;
fimc              151 drivers/media/platform/exynos4-is/fimc-m2m.c 		if (fimc->drv_data->alpha_color)
fimc              155 drivers/media/platform/exynos4-is/fimc-m2m.c 	fimc_hw_set_input_addr(fimc, &sf->paddr);
fimc              156 drivers/media/platform/exynos4-is/fimc-m2m.c 	fimc_hw_set_output_addr(fimc, &df->paddr, -1);
fimc              160 drivers/media/platform/exynos4-is/fimc-m2m.c 	fimc_hw_activate_input_dma(fimc, true);
fimc              163 drivers/media/platform/exynos4-is/fimc-m2m.c 	spin_unlock_irqrestore(&fimc->slock, flags);
fimc              234 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc              236 drivers/media/platform/exynos4-is/fimc-m2m.c 	__fimc_vidioc_querycap(&fimc->pdev->dev, cap);
fimc              269 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              270 drivers/media/platform/exynos4-is/fimc-m2m.c 	const struct fimc_variant *variant = fimc->variant;
fimc              345 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              358 drivers/media/platform/exynos4-is/fimc-m2m.c 		v4l2_err(&fimc->m2m.vfd, "queue (%d) busy\n", f->type);
fimc              433 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              439 drivers/media/platform/exynos4-is/fimc-m2m.c 		v4l2_err(&fimc->m2m.vfd,
fimc              456 drivers/media/platform/exynos4-is/fimc-m2m.c 		fimc->variant->min_inp_pixsize : fimc->variant->min_out_pixsize;
fimc              459 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (fimc->variant->min_vsize_align == 1)
fimc              462 drivers/media/platform/exynos4-is/fimc-m2m.c 		halign = ffs(fimc->variant->min_vsize_align) - 1;
fimc              479 drivers/media/platform/exynos4-is/fimc-m2m.c 	s->r.top  = round_down(s->r.top, fimc->variant->hor_offs_align);
fimc              492 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              514 drivers/media/platform/exynos4-is/fimc-m2m.c 		v4l2_err(&fimc->m2m.vfd, "Out of scaler range\n");
fimc              608 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = video_drvdata(file);
fimc              612 drivers/media/platform/exynos4-is/fimc-m2m.c 	pr_debug("pid: %d, state: %#lx\n", task_pid_nr(current), fimc->state);
fimc              614 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (mutex_lock_interruptible(&fimc->lock))
fimc              620 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (test_bit(ST_CAPT_BUSY, &fimc->state))
fimc              628 drivers/media/platform/exynos4-is/fimc-m2m.c 	v4l2_fh_init(&ctx->fh, &fimc->m2m.vfd);
fimc              629 drivers/media/platform/exynos4-is/fimc-m2m.c 	ctx->fimc_dev = fimc;
fimc              651 drivers/media/platform/exynos4-is/fimc-m2m.c 	ctx->fh.m2m_ctx = v4l2_m2m_ctx_init(fimc->m2m.m2m_dev, ctx, queue_init);
fimc              657 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (fimc->m2m.refcnt++ == 0)
fimc              658 drivers/media/platform/exynos4-is/fimc-m2m.c 		set_bit(ST_M2M_RUN, &fimc->state);
fimc              664 drivers/media/platform/exynos4-is/fimc-m2m.c 	mutex_unlock(&fimc->lock);
fimc              676 drivers/media/platform/exynos4-is/fimc-m2m.c 	mutex_unlock(&fimc->lock);
fimc              683 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct fimc_dev *fimc = ctx->fimc_dev;
fimc              686 drivers/media/platform/exynos4-is/fimc-m2m.c 		task_pid_nr(current), fimc->state, fimc->m2m.refcnt);
fimc              688 drivers/media/platform/exynos4-is/fimc-m2m.c 	mutex_lock(&fimc->lock);
fimc              695 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (--fimc->m2m.refcnt <= 0)
fimc              696 drivers/media/platform/exynos4-is/fimc-m2m.c 		clear_bit(ST_M2M_RUN, &fimc->state);
fimc              699 drivers/media/platform/exynos4-is/fimc-m2m.c 	mutex_unlock(&fimc->lock);
fimc              717 drivers/media/platform/exynos4-is/fimc-m2m.c int fimc_register_m2m_device(struct fimc_dev *fimc,
fimc              720 drivers/media/platform/exynos4-is/fimc-m2m.c 	struct video_device *vfd = &fimc->m2m.vfd;
fimc              723 drivers/media/platform/exynos4-is/fimc-m2m.c 	fimc->v4l2_dev = v4l2_dev;
fimc              731 drivers/media/platform/exynos4-is/fimc-m2m.c 	vfd->lock = &fimc->lock;
fimc              736 drivers/media/platform/exynos4-is/fimc-m2m.c 	snprintf(vfd->name, sizeof(vfd->name), "fimc.%d.m2m", fimc->id);
fimc              737 drivers/media/platform/exynos4-is/fimc-m2m.c 	video_set_drvdata(vfd, fimc);
fimc              739 drivers/media/platform/exynos4-is/fimc-m2m.c 	fimc->m2m.m2m_dev = v4l2_m2m_init(&m2m_ops);
fimc              740 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (IS_ERR(fimc->m2m.m2m_dev)) {
fimc              742 drivers/media/platform/exynos4-is/fimc-m2m.c 		return PTR_ERR(fimc->m2m.m2m_dev);
fimc              760 drivers/media/platform/exynos4-is/fimc-m2m.c 	v4l2_m2m_release(fimc->m2m.m2m_dev);
fimc              764 drivers/media/platform/exynos4-is/fimc-m2m.c void fimc_unregister_m2m_device(struct fimc_dev *fimc)
fimc              766 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (!fimc)
fimc              769 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (fimc->m2m.m2m_dev)
fimc              770 drivers/media/platform/exynos4-is/fimc-m2m.c 		v4l2_m2m_release(fimc->m2m.m2m_dev);
fimc              772 drivers/media/platform/exynos4-is/fimc-m2m.c 	if (video_is_registered(&fimc->m2m.vfd)) {
fimc              773 drivers/media/platform/exynos4-is/fimc-m2m.c 		video_unregister_device(&fimc->m2m.vfd);
fimc              774 drivers/media/platform/exynos4-is/fimc-m2m.c 		media_entity_cleanup(&fimc->m2m.vfd.entity);
fimc              556 drivers/media/platform/exynos4-is/fimc-reg.c int fimc_hw_set_camera_polarity(struct fimc_dev *fimc,
fimc              559 drivers/media/platform/exynos4-is/fimc-reg.c 	u32 cfg = readl(fimc->regs + FIMC_REG_CIGCTRL);
fimc              580 drivers/media/platform/exynos4-is/fimc-reg.c 	writel(cfg, fimc->regs + FIMC_REG_CIGCTRL);
fimc              598 drivers/media/platform/exynos4-is/fimc-reg.c int fimc_hw_set_camera_source(struct fimc_dev *fimc,
fimc              601 drivers/media/platform/exynos4-is/fimc-reg.c 	struct fimc_vid_cap *vc = &fimc->vid_cap;
fimc              642 drivers/media/platform/exynos4-is/fimc-reg.c 	writel(cfg, fimc->regs + FIMC_REG_CISRCFMT);
fimc              646 drivers/media/platform/exynos4-is/fimc-reg.c void fimc_hw_set_camera_offset(struct fimc_dev *fimc, struct fimc_frame *f)
fimc              650 drivers/media/platform/exynos4-is/fimc-reg.c 	u32 cfg = readl(fimc->regs + FIMC_REG_CIWDOFST);
fimc              656 drivers/media/platform/exynos4-is/fimc-reg.c 	writel(cfg, fimc->regs + FIMC_REG_CIWDOFST);
fimc              662 drivers/media/platform/exynos4-is/fimc-reg.c 	writel(cfg, fimc->regs + FIMC_REG_CIWDOFST2);
fimc              665 drivers/media/platform/exynos4-is/fimc-reg.c int fimc_hw_set_camera_type(struct fimc_dev *fimc,
fimc              668 drivers/media/platform/exynos4-is/fimc-reg.c 	struct fimc_vid_cap *vid_cap = &fimc->vid_cap;
fimc              672 drivers/media/platform/exynos4-is/fimc-reg.c 	cfg = readl(fimc->regs + FIMC_REG_CIGCTRL);
fimc              705 drivers/media/platform/exynos4-is/fimc-reg.c 		writel(tmp, fimc->regs + FIMC_REG_CSIIMGFMT);
fimc              715 drivers/media/platform/exynos4-is/fimc-reg.c 		if (fimc->variant->has_isp_wb)
fimc              726 drivers/media/platform/exynos4-is/fimc-reg.c 	writel(cfg, fimc->regs + FIMC_REG_CIGCTRL);
fimc              793 drivers/media/platform/exynos4-is/fimc-reg.c void fimc_deactivate_capture(struct fimc_dev *fimc)
fimc              795 drivers/media/platform/exynos4-is/fimc-reg.c 	fimc_hw_en_lastirq(fimc, true);
fimc              796 drivers/media/platform/exynos4-is/fimc-reg.c 	fimc_hw_disable_capture(fimc);
fimc              797 drivers/media/platform/exynos4-is/fimc-reg.c 	fimc_hw_enable_scaler(fimc, false);
fimc              798 drivers/media/platform/exynos4-is/fimc-reg.c 	fimc_hw_en_lastirq(fimc, false);
fimc              801 drivers/media/platform/exynos4-is/fimc-reg.c int fimc_hw_camblk_cfg_writeback(struct fimc_dev *fimc)
fimc              803 drivers/media/platform/exynos4-is/fimc-reg.c 	struct regmap *map = fimc->sysreg;
fimc              814 drivers/media/platform/exynos4-is/fimc-reg.c 	if (!WARN(fimc->id >= 3, "not supported id: %d\n", fimc->id))
fimc              815 drivers/media/platform/exynos4-is/fimc-reg.c 		val = 0x1 << (fimc->id + 20);
fimc              291 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_hw_reset(struct fimc_dev *fimc);
fimc              295 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_hw_en_lastirq(struct fimc_dev *fimc, int enable);
fimc              296 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_hw_en_irq(struct fimc_dev *fimc, int enable);
fimc              305 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_hw_set_input_addr(struct fimc_dev *fimc, struct fimc_addr *paddr);
fimc              306 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_hw_set_output_addr(struct fimc_dev *fimc, struct fimc_addr *paddr,
fimc              308 drivers/media/platform/exynos4-is/fimc-reg.h int fimc_hw_set_camera_source(struct fimc_dev *fimc,
fimc              310 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_hw_set_camera_offset(struct fimc_dev *fimc, struct fimc_frame *f);
fimc              311 drivers/media/platform/exynos4-is/fimc-reg.h int fimc_hw_set_camera_polarity(struct fimc_dev *fimc,
fimc              313 drivers/media/platform/exynos4-is/fimc-reg.h int fimc_hw_set_camera_type(struct fimc_dev *fimc,
fimc              321 drivers/media/platform/exynos4-is/fimc-reg.h int fimc_hw_camblk_cfg_writeback(struct fimc_dev *fimc);
fimc              323 drivers/media/platform/exynos4-is/fimc-reg.h void fimc_deactivate_capture(struct fimc_dev *fimc);
fimc              582 drivers/media/platform/exynos4-is/media-dev.c static int register_fimc_entity(struct fimc_md *fmd, struct fimc_dev *fimc)
fimc              588 drivers/media/platform/exynos4-is/media-dev.c 	if (WARN_ON(fimc->id >= FIMC_MAX_DEVS || fmd->fimc[fimc->id]))
fimc              591 drivers/media/platform/exynos4-is/media-dev.c 	sd = &fimc->vid_cap.subdev;
fimc              602 drivers/media/platform/exynos4-is/media-dev.c 		if (!fmd->pmf && fimc->pdev)
fimc              603 drivers/media/platform/exynos4-is/media-dev.c 			fmd->pmf = &fimc->pdev->dev;
fimc              604 drivers/media/platform/exynos4-is/media-dev.c 		fmd->fimc[fimc->id] = fimc;
fimc              605 drivers/media/platform/exynos4-is/media-dev.c 		fimc->vid_cap.user_subdev_api = fmd->user_subdev_api;
fimc              608 drivers/media/platform/exynos4-is/media-dev.c 			 fimc->id, ret);
fimc              753 drivers/media/platform/exynos4-is/media-dev.c 		struct fimc_dev *dev = fmd->fimc[i];
fimc              758 drivers/media/platform/exynos4-is/media-dev.c 		fmd->fimc[i] = NULL;
fimc              807 drivers/media/platform/exynos4-is/media-dev.c 		if (!fmd->fimc[i])
fimc              813 drivers/media/platform/exynos4-is/media-dev.c 		if (!fmd->fimc[i]->variant->has_cam_if)
fimc              818 drivers/media/platform/exynos4-is/media-dev.c 		sink = &fmd->fimc[i]->vid_cap.subdev.entity;
fimc              863 drivers/media/platform/exynos4-is/media-dev.c 		struct fimc_lite *fimc = fmd->fimc_lite[i];
fimc              865 drivers/media/platform/exynos4-is/media-dev.c 		if (fimc == NULL)
fimc              868 drivers/media/platform/exynos4-is/media-dev.c 		source = &fimc->subdev.entity;
fimc              869 drivers/media/platform/exynos4-is/media-dev.c 		sink = &fimc->ve.vdev.entity;
fimc              896 drivers/media/platform/exynos4-is/media-dev.c 		if (fmd->fimc[i] == NULL)
fimc              900 drivers/media/platform/exynos4-is/media-dev.c 		sink = &fmd->fimc[i]->vid_cap.subdev.entity;
fimc             1011 drivers/media/platform/exynos4-is/media-dev.c 		if (!fmd->fimc[i])
fimc             1014 drivers/media/platform/exynos4-is/media-dev.c 		source = &fmd->fimc[i]->vid_cap.subdev.entity;
fimc             1015 drivers/media/platform/exynos4-is/media-dev.c 		sink = &fmd->fimc[i]->vid_cap.ve.vdev.entity;
fimc             1242 drivers/media/platform/exynos4-is/media-dev.c 		if (fmd->fimc[i])
fimc             1243 drivers/media/platform/exynos4-is/media-dev.c 			fmd->fimc[i]->vid_cap.user_subdev_api = subdev_api;
fimc              126 drivers/media/platform/exynos4-is/media-dev.h 	struct fimc_dev *fimc[FIMC_MAX_DEVS];