ivc                45 drivers/firmware/tegra/bpmp-tegra186.c 	frame = tegra_ivc_read_get_next_frame(channel->ivc);
ivc                60 drivers/firmware/tegra/bpmp-tegra186.c 	frame = tegra_ivc_write_get_next_frame(channel->ivc);
ivc                73 drivers/firmware/tegra/bpmp-tegra186.c 	return tegra_ivc_read_advance(channel->ivc);
ivc                78 drivers/firmware/tegra/bpmp-tegra186.c 	return tegra_ivc_write_advance(channel->ivc);
ivc                95 drivers/firmware/tegra/bpmp-tegra186.c static void tegra186_bpmp_ivc_notify(struct tegra_ivc *ivc, void *data)
ivc               115 drivers/firmware/tegra/bpmp-tegra186.c 	channel->ivc = devm_kzalloc(bpmp->dev, sizeof(*channel->ivc),
ivc               117 drivers/firmware/tegra/bpmp-tegra186.c 	if (!channel->ivc)
ivc               124 drivers/firmware/tegra/bpmp-tegra186.c 	err = tegra_ivc_init(channel->ivc, NULL,
ivc               144 drivers/firmware/tegra/bpmp-tegra186.c 	tegra_ivc_reset(channel->ivc);
ivc               147 drivers/firmware/tegra/bpmp-tegra186.c 	while (tegra_ivc_notified(channel->ivc))
ivc               153 drivers/firmware/tegra/bpmp-tegra186.c 	tegra_ivc_cleanup(channel->ivc);
ivc                71 drivers/firmware/tegra/ivc.c static inline void tegra_ivc_invalidate(struct tegra_ivc *ivc, dma_addr_t phys)
ivc                73 drivers/firmware/tegra/ivc.c 	if (!ivc->peer)
ivc                76 drivers/firmware/tegra/ivc.c 	dma_sync_single_for_cpu(ivc->peer, phys, TEGRA_IVC_ALIGN,
ivc                80 drivers/firmware/tegra/ivc.c static inline void tegra_ivc_flush(struct tegra_ivc *ivc, dma_addr_t phys)
ivc                82 drivers/firmware/tegra/ivc.c 	if (!ivc->peer)
ivc                85 drivers/firmware/tegra/ivc.c 	dma_sync_single_for_device(ivc->peer, phys, TEGRA_IVC_ALIGN,
ivc                89 drivers/firmware/tegra/ivc.c static inline bool tegra_ivc_empty(struct tegra_ivc *ivc,
ivc               110 drivers/firmware/tegra/ivc.c 	if (tx - rx > ivc->num_frames)
ivc               116 drivers/firmware/tegra/ivc.c static inline bool tegra_ivc_full(struct tegra_ivc *ivc,
ivc               126 drivers/firmware/tegra/ivc.c 	return tx - rx >= ivc->num_frames;
ivc               129 drivers/firmware/tegra/ivc.c static inline u32 tegra_ivc_available(struct tegra_ivc *ivc,
ivc               144 drivers/firmware/tegra/ivc.c static inline void tegra_ivc_advance_tx(struct tegra_ivc *ivc)
ivc               146 drivers/firmware/tegra/ivc.c 	WRITE_ONCE(ivc->tx.channel->tx.count,
ivc               147 drivers/firmware/tegra/ivc.c 		   READ_ONCE(ivc->tx.channel->tx.count) + 1);
ivc               149 drivers/firmware/tegra/ivc.c 	if (ivc->tx.position == ivc->num_frames - 1)
ivc               150 drivers/firmware/tegra/ivc.c 		ivc->tx.position = 0;
ivc               152 drivers/firmware/tegra/ivc.c 		ivc->tx.position++;
ivc               155 drivers/firmware/tegra/ivc.c static inline void tegra_ivc_advance_rx(struct tegra_ivc *ivc)
ivc               157 drivers/firmware/tegra/ivc.c 	WRITE_ONCE(ivc->rx.channel->rx.count,
ivc               158 drivers/firmware/tegra/ivc.c 		   READ_ONCE(ivc->rx.channel->rx.count) + 1);
ivc               160 drivers/firmware/tegra/ivc.c 	if (ivc->rx.position == ivc->num_frames - 1)
ivc               161 drivers/firmware/tegra/ivc.c 		ivc->rx.position = 0;
ivc               163 drivers/firmware/tegra/ivc.c 		ivc->rx.position++;
ivc               166 drivers/firmware/tegra/ivc.c static inline int tegra_ivc_check_read(struct tegra_ivc *ivc)
ivc               178 drivers/firmware/tegra/ivc.c 	if (ivc->tx.channel->tx.state != TEGRA_IVC_STATE_ESTABLISHED)
ivc               188 drivers/firmware/tegra/ivc.c 	if (!tegra_ivc_empty(ivc, ivc->rx.channel))
ivc               191 drivers/firmware/tegra/ivc.c 	tegra_ivc_invalidate(ivc, ivc->rx.phys + offset);
ivc               193 drivers/firmware/tegra/ivc.c 	if (tegra_ivc_empty(ivc, ivc->rx.channel))
ivc               199 drivers/firmware/tegra/ivc.c static inline int tegra_ivc_check_write(struct tegra_ivc *ivc)
ivc               203 drivers/firmware/tegra/ivc.c 	if (ivc->tx.channel->tx.state != TEGRA_IVC_STATE_ESTABLISHED)
ivc               206 drivers/firmware/tegra/ivc.c 	if (!tegra_ivc_full(ivc, ivc->tx.channel))
ivc               209 drivers/firmware/tegra/ivc.c 	tegra_ivc_invalidate(ivc, ivc->tx.phys + offset);
ivc               211 drivers/firmware/tegra/ivc.c 	if (tegra_ivc_full(ivc, ivc->tx.channel))
ivc               217 drivers/firmware/tegra/ivc.c static void *tegra_ivc_frame_virt(struct tegra_ivc *ivc,
ivc               221 drivers/firmware/tegra/ivc.c 	if (WARN_ON(frame >= ivc->num_frames))
ivc               224 drivers/firmware/tegra/ivc.c 	return (void *)(header + 1) + ivc->frame_size * frame;
ivc               227 drivers/firmware/tegra/ivc.c static inline dma_addr_t tegra_ivc_frame_phys(struct tegra_ivc *ivc,
ivc               233 drivers/firmware/tegra/ivc.c 	offset = sizeof(struct tegra_ivc_header) + ivc->frame_size * frame;
ivc               238 drivers/firmware/tegra/ivc.c static inline void tegra_ivc_invalidate_frame(struct tegra_ivc *ivc,
ivc               244 drivers/firmware/tegra/ivc.c 	if (!ivc->peer || WARN_ON(frame >= ivc->num_frames))
ivc               247 drivers/firmware/tegra/ivc.c 	phys = tegra_ivc_frame_phys(ivc, phys, frame) + offset;
ivc               249 drivers/firmware/tegra/ivc.c 	dma_sync_single_for_cpu(ivc->peer, phys, size, DMA_FROM_DEVICE);
ivc               252 drivers/firmware/tegra/ivc.c static inline void tegra_ivc_flush_frame(struct tegra_ivc *ivc,
ivc               258 drivers/firmware/tegra/ivc.c 	if (!ivc->peer || WARN_ON(frame >= ivc->num_frames))
ivc               261 drivers/firmware/tegra/ivc.c 	phys = tegra_ivc_frame_phys(ivc, phys, frame) + offset;
ivc               263 drivers/firmware/tegra/ivc.c 	dma_sync_single_for_device(ivc->peer, phys, size, DMA_TO_DEVICE);
ivc               267 drivers/firmware/tegra/ivc.c void *tegra_ivc_read_get_next_frame(struct tegra_ivc *ivc)
ivc               271 drivers/firmware/tegra/ivc.c 	if (WARN_ON(ivc == NULL))
ivc               274 drivers/firmware/tegra/ivc.c 	err = tegra_ivc_check_read(ivc);
ivc               284 drivers/firmware/tegra/ivc.c 	tegra_ivc_invalidate_frame(ivc, ivc->rx.phys, ivc->rx.position, 0,
ivc               285 drivers/firmware/tegra/ivc.c 				   ivc->frame_size);
ivc               287 drivers/firmware/tegra/ivc.c 	return tegra_ivc_frame_virt(ivc, ivc->rx.channel, ivc->rx.position);
ivc               291 drivers/firmware/tegra/ivc.c int tegra_ivc_read_advance(struct tegra_ivc *ivc)
ivc               302 drivers/firmware/tegra/ivc.c 	err = tegra_ivc_check_read(ivc);
ivc               306 drivers/firmware/tegra/ivc.c 	tegra_ivc_advance_rx(ivc);
ivc               308 drivers/firmware/tegra/ivc.c 	tegra_ivc_flush(ivc, ivc->rx.phys + rx);
ivc               321 drivers/firmware/tegra/ivc.c 	tegra_ivc_invalidate(ivc, ivc->rx.phys + tx);
ivc               323 drivers/firmware/tegra/ivc.c 	if (tegra_ivc_available(ivc, ivc->rx.channel) == ivc->num_frames - 1)
ivc               324 drivers/firmware/tegra/ivc.c 		ivc->notify(ivc, ivc->notify_data);
ivc               331 drivers/firmware/tegra/ivc.c void *tegra_ivc_write_get_next_frame(struct tegra_ivc *ivc)
ivc               335 drivers/firmware/tegra/ivc.c 	err = tegra_ivc_check_write(ivc);
ivc               339 drivers/firmware/tegra/ivc.c 	return tegra_ivc_frame_virt(ivc, ivc->tx.channel, ivc->tx.position);
ivc               344 drivers/firmware/tegra/ivc.c int tegra_ivc_write_advance(struct tegra_ivc *ivc)
ivc               350 drivers/firmware/tegra/ivc.c 	err = tegra_ivc_check_write(ivc);
ivc               354 drivers/firmware/tegra/ivc.c 	tegra_ivc_flush_frame(ivc, ivc->tx.phys, ivc->tx.position, 0,
ivc               355 drivers/firmware/tegra/ivc.c 			      ivc->frame_size);
ivc               363 drivers/firmware/tegra/ivc.c 	tegra_ivc_advance_tx(ivc);
ivc               364 drivers/firmware/tegra/ivc.c 	tegra_ivc_flush(ivc, ivc->tx.phys + tx);
ivc               377 drivers/firmware/tegra/ivc.c 	tegra_ivc_invalidate(ivc, ivc->tx.phys + rx);
ivc               379 drivers/firmware/tegra/ivc.c 	if (tegra_ivc_available(ivc, ivc->tx.channel) == 1)
ivc               380 drivers/firmware/tegra/ivc.c 		ivc->notify(ivc, ivc->notify_data);
ivc               386 drivers/firmware/tegra/ivc.c void tegra_ivc_reset(struct tegra_ivc *ivc)
ivc               390 drivers/firmware/tegra/ivc.c 	ivc->tx.channel->tx.state = TEGRA_IVC_STATE_SYNC;
ivc               391 drivers/firmware/tegra/ivc.c 	tegra_ivc_flush(ivc, ivc->tx.phys + offset);
ivc               392 drivers/firmware/tegra/ivc.c 	ivc->notify(ivc, ivc->notify_data);
ivc               416 drivers/firmware/tegra/ivc.c int tegra_ivc_notified(struct tegra_ivc *ivc)
ivc               422 drivers/firmware/tegra/ivc.c 	tegra_ivc_invalidate(ivc, ivc->rx.phys + offset);
ivc               423 drivers/firmware/tegra/ivc.c 	state = READ_ONCE(ivc->rx.channel->tx.state);
ivc               439 drivers/firmware/tegra/ivc.c 		ivc->tx.channel->tx.count = 0;
ivc               440 drivers/firmware/tegra/ivc.c 		ivc->rx.channel->rx.count = 0;
ivc               442 drivers/firmware/tegra/ivc.c 		ivc->tx.position = 0;
ivc               443 drivers/firmware/tegra/ivc.c 		ivc->rx.position = 0;
ivc               455 drivers/firmware/tegra/ivc.c 		ivc->tx.channel->tx.state = TEGRA_IVC_STATE_ACK;
ivc               456 drivers/firmware/tegra/ivc.c 		tegra_ivc_flush(ivc, ivc->tx.phys + offset);
ivc               461 drivers/firmware/tegra/ivc.c 		ivc->notify(ivc, ivc->notify_data);
ivc               463 drivers/firmware/tegra/ivc.c 	} else if (ivc->tx.channel->tx.state == TEGRA_IVC_STATE_SYNC &&
ivc               478 drivers/firmware/tegra/ivc.c 		ivc->tx.channel->tx.count = 0;
ivc               479 drivers/firmware/tegra/ivc.c 		ivc->rx.channel->rx.count = 0;
ivc               481 drivers/firmware/tegra/ivc.c 		ivc->tx.position = 0;
ivc               482 drivers/firmware/tegra/ivc.c 		ivc->rx.position = 0;
ivc               495 drivers/firmware/tegra/ivc.c 		ivc->tx.channel->tx.state = TEGRA_IVC_STATE_ESTABLISHED;
ivc               496 drivers/firmware/tegra/ivc.c 		tegra_ivc_flush(ivc, ivc->tx.phys + offset);
ivc               501 drivers/firmware/tegra/ivc.c 		ivc->notify(ivc, ivc->notify_data);
ivc               503 drivers/firmware/tegra/ivc.c 	} else if (ivc->tx.channel->tx.state == TEGRA_IVC_STATE_ACK) {
ivc               519 drivers/firmware/tegra/ivc.c 		ivc->tx.channel->tx.state = TEGRA_IVC_STATE_ESTABLISHED;
ivc               520 drivers/firmware/tegra/ivc.c 		tegra_ivc_flush(ivc, ivc->tx.phys + offset);
ivc               525 drivers/firmware/tegra/ivc.c 		ivc->notify(ivc, ivc->notify_data);
ivc               536 drivers/firmware/tegra/ivc.c 	if (ivc->tx.channel->tx.state != TEGRA_IVC_STATE_ESTABLISHED)
ivc               612 drivers/firmware/tegra/ivc.c int tegra_ivc_init(struct tegra_ivc *ivc, struct device *peer, void *rx,
ivc               615 drivers/firmware/tegra/ivc.c 		   void (*notify)(struct tegra_ivc *ivc, void *data),
ivc               621 drivers/firmware/tegra/ivc.c 	if (WARN_ON(!ivc || !notify))
ivc               639 drivers/firmware/tegra/ivc.c 		ivc->rx.phys = dma_map_single(peer, rx, queue_size,
ivc               641 drivers/firmware/tegra/ivc.c 		if (dma_mapping_error(peer, ivc->rx.phys))
ivc               644 drivers/firmware/tegra/ivc.c 		ivc->tx.phys = dma_map_single(peer, tx, queue_size,
ivc               646 drivers/firmware/tegra/ivc.c 		if (dma_mapping_error(peer, ivc->tx.phys)) {
ivc               647 drivers/firmware/tegra/ivc.c 			dma_unmap_single(peer, ivc->rx.phys, queue_size,
ivc               652 drivers/firmware/tegra/ivc.c 		ivc->rx.phys = rx_phys;
ivc               653 drivers/firmware/tegra/ivc.c 		ivc->tx.phys = tx_phys;
ivc               656 drivers/firmware/tegra/ivc.c 	ivc->rx.channel = rx;
ivc               657 drivers/firmware/tegra/ivc.c 	ivc->tx.channel = tx;
ivc               658 drivers/firmware/tegra/ivc.c 	ivc->peer = peer;
ivc               659 drivers/firmware/tegra/ivc.c 	ivc->notify = notify;
ivc               660 drivers/firmware/tegra/ivc.c 	ivc->notify_data = data;
ivc               661 drivers/firmware/tegra/ivc.c 	ivc->frame_size = frame_size;
ivc               662 drivers/firmware/tegra/ivc.c 	ivc->num_frames = num_frames;
ivc               668 drivers/firmware/tegra/ivc.c 	ivc->tx.position = 0;
ivc               669 drivers/firmware/tegra/ivc.c 	ivc->rx.position = 0;
ivc               675 drivers/firmware/tegra/ivc.c void tegra_ivc_cleanup(struct tegra_ivc *ivc)
ivc               677 drivers/firmware/tegra/ivc.c 	if (ivc->peer) {
ivc               678 drivers/firmware/tegra/ivc.c 		size_t size = tegra_ivc_total_queue_size(ivc->num_frames *
ivc               679 drivers/firmware/tegra/ivc.c 							 ivc->frame_size);
ivc               681 drivers/firmware/tegra/ivc.c 		dma_unmap_single(ivc->peer, ivc->rx.phys, size,
ivc               683 drivers/firmware/tegra/ivc.c 		dma_unmap_single(ivc->peer, ivc->tx.phys, size,
ivc               305 drivers/media/platform/exynos4-is/fimc-isp-video.c 	struct fimc_is_video *ivc = &isp->video_capture;
ivc               306 drivers/media/platform/exynos4-is/fimc-isp-video.c 	struct media_entity *entity = &ivc->ve.vdev.entity;
ivc               311 drivers/media/platform/exynos4-is/fimc-isp-video.c 	if (v4l2_fh_is_singular_file(file) && ivc->streaming) {
ivc               313 drivers/media/platform/exynos4-is/fimc-isp-video.c 		ivc->streaming = 0;
ivc               319 drivers/media/platform/exynos4-is/fimc-isp-video.c 		fimc_pipeline_call(&ivc->ve, close);
ivc                44 include/soc/tegra/bpmp.h 	struct tegra_ivc *ivc;
ivc                23 include/soc/tegra/ivc.h 	void (*notify)(struct tegra_ivc *ivc, void *data);
ivc                39 include/soc/tegra/ivc.h void *tegra_ivc_read_get_next_frame(struct tegra_ivc *ivc);
ivc                49 include/soc/tegra/ivc.h int tegra_ivc_read_advance(struct tegra_ivc *ivc);
ivc                59 include/soc/tegra/ivc.h void *tegra_ivc_write_get_next_frame(struct tegra_ivc *ivc);
ivc                69 include/soc/tegra/ivc.h int tegra_ivc_write_advance(struct tegra_ivc *ivc);
ivc                80 include/soc/tegra/ivc.h int tegra_ivc_notified(struct tegra_ivc *ivc);
ivc                90 include/soc/tegra/ivc.h void tegra_ivc_reset(struct tegra_ivc *ivc);
ivc                94 include/soc/tegra/ivc.h int tegra_ivc_init(struct tegra_ivc *ivc, struct device *peer, void *rx,
ivc                97 include/soc/tegra/ivc.h 		   void (*notify)(struct tegra_ivc *ivc, void *data),
ivc                99 include/soc/tegra/ivc.h void tegra_ivc_cleanup(struct tegra_ivc *ivc);