#include <linux/atomic.h>
#include <linux/bug.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/lockdep.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <media/media-entity.h>
#include <media/v4l2-subdev.h>
#include <media/videobuf2-dma-contig.h>
#include <media/videobuf2-v4l2.h>
#include "ipu6-bus.h"
#include "ipu6-fw-isys.h"
#include "ipu6-isys.h"
#include "ipu6-isys-video.h"
static int queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
unsigned int *num_planes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int ipu6_isys_buf_prepare(struct vb2_buffer *vb)
{ … }
void ipu6_isys_buffer_list_queue(struct ipu6_isys_buffer_list *bl,
unsigned long op_flags,
enum vb2_buffer_state state)
{ … }
static void flush_firmware_streamon_fail(struct ipu6_isys_stream *stream)
{ … }
static int buffer_list_get(struct ipu6_isys_stream *stream,
struct ipu6_isys_buffer_list *bl)
{ … }
static void
ipu6_isys_buf_to_fw_frame_buf_pin(struct vb2_buffer *vb,
struct ipu6_fw_isys_frame_buff_set_abi *set)
{ … }
#define IPU6_ISYS_FRAME_NUM_THRESHOLD …
void
ipu6_isys_buf_to_fw_frame_buf(struct ipu6_fw_isys_frame_buff_set_abi *set,
struct ipu6_isys_stream *stream,
struct ipu6_isys_buffer_list *bl)
{ … }
static int ipu6_isys_stream_start(struct ipu6_isys_video *av,
struct ipu6_isys_buffer_list *bl, bool error)
{ … }
static void buf_queue(struct vb2_buffer *vb)
{ … }
static int ipu6_isys_link_fmt_validate(struct ipu6_isys_queue *aq)
{ … }
static void return_buffers(struct ipu6_isys_queue *aq,
enum vb2_buffer_state state)
{ … }
static void ipu6_isys_stream_cleanup(struct ipu6_isys_video *av)
{ … }
static int start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void stop_streaming(struct vb2_queue *q)
{ … }
static unsigned int
get_sof_sequence_by_timestamp(struct ipu6_isys_stream *stream,
struct ipu6_fw_isys_resp_info_abi *info)
{ … }
static u64 get_sof_ns_delta(struct ipu6_isys_video *av,
struct ipu6_fw_isys_resp_info_abi *info)
{ … }
void ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib,
struct ipu6_fw_isys_resp_info_abi *info)
{ … }
void ipu6_isys_queue_buf_done(struct ipu6_isys_buffer *ib)
{ … }
void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream,
struct ipu6_fw_isys_resp_info_abi *info)
{ … }
static const struct vb2_ops ipu6_isys_queue_ops = …;
int ipu6_isys_queue_init(struct ipu6_isys_queue *aq)
{ … }