#include "wave5-helper.h"
#define VPU_DEC_DEV_NAME …
#define VPU_DEC_DRV_NAME …
#define DEFAULT_SRC_SIZE(width, height) …
static const struct vpu_format dec_fmt_list[FMT_TYPES][MAX_FMTS] = …;
static int switch_state(struct vpu_instance *inst, enum vpu_instance_state state)
{ … }
static int wave5_vpu_dec_set_eos_on_firmware(struct vpu_instance *inst)
{ … }
static bool wave5_last_src_buffer_consumed(struct v4l2_m2m_ctx *m2m_ctx)
{ … }
static void wave5_handle_src_buffer(struct vpu_instance *inst, dma_addr_t rd_ptr)
{ … }
static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned int width,
unsigned int height)
{ … }
static int start_decode(struct vpu_instance *inst, u32 *fail_res)
{ … }
static void flag_last_buffer_done(struct vpu_instance *inst)
{ … }
static void send_eos_event(struct vpu_instance *inst)
{ … }
static int handle_dynamic_resolution_change(struct vpu_instance *inst)
{ … }
static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
{ … }
static int wave5_vpu_dec_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
{ … }
static int wave5_vpu_dec_enum_framesizes(struct file *f, void *fh, struct v4l2_frmsizeenum *fsize)
{ … }
static int wave5_vpu_dec_enum_fmt_cap(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{ … }
static int wave5_vpu_dec_try_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_dec_s_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_dec_g_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_dec_enum_fmt_out(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{ … }
static int wave5_vpu_dec_try_fmt_out(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_dec_s_fmt_out(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_dec_g_selection(struct file *file, void *fh, struct v4l2_selection *s)
{ … }
static int wave5_vpu_dec_s_selection(struct file *file, void *fh, struct v4l2_selection *s)
{ … }
static int wave5_vpu_dec_stop(struct vpu_instance *inst)
{ … }
static int wave5_vpu_dec_start(struct vpu_instance *inst)
{ … }
static int wave5_vpu_dec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *dc)
{ … }
static const struct v4l2_ioctl_ops wave5_vpu_dec_ioctl_ops = …;
static int wave5_vpu_dec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
unsigned int *num_planes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int wave5_prepare_fb(struct vpu_instance *inst)
{ … }
static int write_to_ringbuffer(struct vpu_instance *inst, void *buffer, size_t buffer_size,
struct vpu_buf *ring_buffer, dma_addr_t wr_ptr)
{ … }
static int fill_ringbuffer(struct vpu_instance *inst)
{ … }
static void wave5_vpu_dec_buf_queue_src(struct vb2_buffer *vb)
{ … }
static void wave5_vpu_dec_buf_queue_dst(struct vb2_buffer *vb)
{ … }
static void wave5_vpu_dec_buf_queue(struct vb2_buffer *vb)
{ … }
static int wave5_vpu_dec_allocate_ring_buffer(struct vpu_instance *inst)
{ … }
static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static int streamoff_output(struct vb2_queue *q)
{ … }
static int streamoff_capture(struct vb2_queue *q)
{ … }
static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops wave5_vpu_dec_vb2_ops = …;
static void wave5_set_default_format(struct v4l2_pix_format_mplane *src_fmt,
struct v4l2_pix_format_mplane *dst_fmt)
{ … }
static int wave5_vpu_dec_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)
{ … }
static const struct vpu_instance_ops wave5_vpu_dec_inst_ops = …;
static int initialize_sequence(struct vpu_instance *inst)
{ … }
static bool wave5_is_draining_or_eos(struct vpu_instance *inst)
{ … }
static void wave5_vpu_dec_device_run(void *priv)
{ … }
static void wave5_vpu_dec_job_abort(void *priv)
{ … }
static int wave5_vpu_dec_job_ready(void *priv)
{ … }
static const struct v4l2_m2m_ops wave5_vpu_dec_m2m_ops = …;
static int wave5_vpu_open_dec(struct file *filp)
{ … }
static int wave5_vpu_dec_release(struct file *filp)
{ … }
static const struct v4l2_file_operations wave5_vpu_dec_fops = …;
int wave5_vpu_dec_register_device(struct vpu_device *dev)
{ … }
void wave5_vpu_dec_unregister_device(struct vpu_device *dev)
{ … }