xref: /linux/drivers/media/platform/rockchip/rkcif/rkcif-stream.h (revision 24f171c7e145f43b9f187578e89b0982ce87e54c)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Rockchip Camera Interface (CIF) Driver
4  *
5  * Abstraction for the DMA part and the ping-pong scheme (a double-buffering
6  * mechanism) of the different CIF variants.
7  * Each stream is represented as V4L2 device whose corresponding media entity
8  * has one sink pad.
9  * The sink pad is connected to an instance of the INTERFACE/CROP abstraction
10  * in rkcif-interface.c.
11  *
12  * Copyright (C) 2025 Michael Riesch <michael.riesch@wolfvision.net>
13  * Copyright (C) 2025 Collabora, Ltd.
14  */
15 
16 #ifndef _RKCIF_STREAM_H
17 #define _RKCIF_STREAM_H
18 
19 #include "rkcif-common.h"
20 
21 void rkcif_stream_pingpong(struct rkcif_stream *stream);
22 
23 int rkcif_stream_register(struct rkcif_device *rkcif,
24 			  struct rkcif_stream *stream);
25 
26 void rkcif_stream_unregister(struct rkcif_stream *stream);
27 
28 const struct rkcif_output_fmt *
29 rkcif_stream_find_output_fmt(struct rkcif_stream *stream, bool ret_def,
30 			     u32 pixelfmt);
31 
32 #endif
33