#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <linux/workqueue.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/videobuf2-v4l2.h>
#include "s5p_mfc_common.h"
#include "s5p_mfc_ctrl.h"
#include "s5p_mfc_debug.h"
#include "s5p_mfc_dec.h"
#include "s5p_mfc_intr.h"
#include "s5p_mfc_opr.h"
#include "s5p_mfc_pm.h"
static const struct s5p_mfc_fmt formats[] = …;
#define NUM_FORMATS …
static const struct s5p_mfc_fmt *find_format(struct v4l2_format *f, unsigned int t)
{ … }
static struct mfc_control controls[] = …;
#define NUM_CTRLS …
static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx)
{ … }
static const struct s5p_mfc_codec_ops decoder_codec_ops = …;
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
bool out)
{ … }
static int vidioc_enum_fmt_vid_cap(struct file *file, void *pirv,
struct v4l2_fmtdesc *f)
{ … }
static int vidioc_enum_fmt_vid_out(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
{ … }
static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{ … }
static int vidioc_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
{ … }
static int reqbufs_output(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx,
struct v4l2_requestbuffers *reqbufs)
{ … }
static int reqbufs_capture(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx,
struct v4l2_requestbuffers *reqbufs)
{ … }
static int vidioc_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *reqbufs)
{ … }
static int vidioc_querybuf(struct file *file, void *priv,
struct v4l2_buffer *buf)
{ … }
static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{ … }
static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{ … }
static int vidioc_expbuf(struct file *file, void *priv,
struct v4l2_exportbuffer *eb)
{ … }
static int vidioc_streamon(struct file *file, void *priv,
enum v4l2_buf_type type)
{ … }
static int vidioc_streamoff(struct file *file, void *priv,
enum v4l2_buf_type type)
{ … }
static int s5p_mfc_dec_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int s5p_mfc_dec_g_v_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops s5p_mfc_dec_ctrl_ops = …;
static int vidioc_g_selection(struct file *file, void *priv,
struct v4l2_selection *s)
{ … }
static int vidioc_decoder_cmd(struct file *file, void *priv,
struct v4l2_decoder_cmd *cmd)
{ … }
static int vidioc_subscribe_event(struct v4l2_fh *fh,
const struct v4l2_event_subscription *sub)
{ … }
static const struct v4l2_ioctl_ops s5p_mfc_dec_ioctl_ops = …;
static int s5p_mfc_queue_setup(struct vb2_queue *vq,
unsigned int *buf_count,
unsigned int *plane_count, unsigned int psize[],
struct device *alloc_devs[])
{ … }
static int s5p_mfc_buf_init(struct vb2_buffer *vb)
{ … }
static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void s5p_mfc_stop_streaming(struct vb2_queue *q)
{ … }
static void s5p_mfc_buf_queue(struct vb2_buffer *vb)
{ … }
static const struct vb2_ops s5p_mfc_dec_qops = …;
const struct s5p_mfc_codec_ops *get_dec_codec_ops(void)
{ … }
const struct vb2_ops *get_dec_queue_ops(void)
{ … }
const struct v4l2_ioctl_ops *get_dec_v4l2_ioctl_ops(void)
{ … }
#define IS_MFC51_PRIV(x) …
int s5p_mfc_dec_ctrls_setup(struct s5p_mfc_ctx *ctx)
{ … }
void s5p_mfc_dec_ctrls_delete(struct s5p_mfc_ctx *ctx)
{ … }
void s5p_mfc_dec_init(struct s5p_mfc_ctx *ctx)
{ … }