linux/drivers/staging/media/rkvdec/rkvdec.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Rockchip Video Decoder driver
 *
 * Copyright (C) 2019 Collabora, Ltd.
 *
 * Based on rkvdec driver by Google LLC. (Tomasz Figa <[email protected]>)
 * Based on s5p-mfc driver by Samsung Electronics Co., Ltd.
 * Copyright (C) 2011 Samsung Electronics Co., Ltd.
 */

#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <linux/workqueue.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mem2mem.h>
#include <media/videobuf2-core.h>
#include <media/videobuf2-vmalloc.h>

#include "rkvdec.h"
#include "rkvdec-regs.h"

static int rkvdec_try_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops rkvdec_ctrl_ops =;

static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] =;

static const struct rkvdec_ctrls rkvdec_h264_ctrls =;

static const u32 rkvdec_h264_vp9_decoded_fmts[] =;

static const struct rkvdec_ctrl_desc rkvdec_vp9_ctrl_descs[] =;

static const struct rkvdec_ctrls rkvdec_vp9_ctrls =;

static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] =;

static const struct rkvdec_coded_fmt_desc *
rkvdec_find_coded_fmt_desc(u32 fourcc)
{}

static void rkvdec_reset_fmt(struct rkvdec_ctx *ctx, struct v4l2_format *f,
			     u32 fourcc)
{}

static void rkvdec_reset_coded_fmt(struct rkvdec_ctx *ctx)
{}

static void rkvdec_reset_decoded_fmt(struct rkvdec_ctx *ctx)
{}

static int rkvdec_enum_framesizes(struct file *file, void *priv,
				  struct v4l2_frmsizeenum *fsize)
{}

static int rkvdec_querycap(struct file *file, void *priv,
			   struct v4l2_capability *cap)
{}

static int rkvdec_try_capture_fmt(struct file *file, void *priv,
				  struct v4l2_format *f)
{}

static int rkvdec_try_output_fmt(struct file *file, void *priv,
				 struct v4l2_format *f)
{}

static int rkvdec_s_capture_fmt(struct file *file, void *priv,
				struct v4l2_format *f)
{}

static int rkvdec_s_output_fmt(struct file *file, void *priv,
			       struct v4l2_format *f)
{}

static int rkvdec_g_output_fmt(struct file *file, void *priv,
			       struct v4l2_format *f)
{}

static int rkvdec_g_capture_fmt(struct file *file, void *priv,
				struct v4l2_format *f)
{}

static int rkvdec_enum_output_fmt(struct file *file, void *priv,
				  struct v4l2_fmtdesc *f)
{}

static int rkvdec_enum_capture_fmt(struct file *file, void *priv,
				   struct v4l2_fmtdesc *f)
{}

static const struct v4l2_ioctl_ops rkvdec_ioctl_ops =;

static int rkvdec_queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,
			      unsigned int *num_planes, unsigned int sizes[],
			      struct device *alloc_devs[])
{}

static int rkvdec_buf_prepare(struct vb2_buffer *vb)
{}

static void rkvdec_buf_queue(struct vb2_buffer *vb)
{}

static int rkvdec_buf_out_validate(struct vb2_buffer *vb)
{}

static void rkvdec_buf_request_complete(struct vb2_buffer *vb)
{}

static int rkvdec_start_streaming(struct vb2_queue *q, unsigned int count)
{}

static void rkvdec_queue_cleanup(struct vb2_queue *vq, u32 state)
{}

static void rkvdec_stop_streaming(struct vb2_queue *q)
{}

static const struct vb2_ops rkvdec_queue_ops =;

static int rkvdec_request_validate(struct media_request *req)
{}

static const struct media_device_ops rkvdec_media_ops =;

static void rkvdec_job_finish_no_pm(struct rkvdec_ctx *ctx,
				    enum vb2_buffer_state result)
{}

static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
			      enum vb2_buffer_state result)
{}

void rkvdec_run_preamble(struct rkvdec_ctx *ctx, struct rkvdec_run *run)
{}

void rkvdec_run_postamble(struct rkvdec_ctx *ctx, struct rkvdec_run *run)
{}

static void rkvdec_device_run(void *priv)
{}

static const struct v4l2_m2m_ops rkvdec_m2m_ops =;

static int rkvdec_queue_init(void *priv,
			     struct vb2_queue *src_vq,
			     struct vb2_queue *dst_vq)
{}

static int rkvdec_add_ctrls(struct rkvdec_ctx *ctx,
			    const struct rkvdec_ctrls *ctrls)
{}

static int rkvdec_init_ctrls(struct rkvdec_ctx *ctx)
{}

static int rkvdec_open(struct file *filp)
{}

static int rkvdec_release(struct file *filp)
{}

static const struct v4l2_file_operations rkvdec_fops =;

static int rkvdec_v4l2_init(struct rkvdec_dev *rkvdec)
{}

static void rkvdec_v4l2_cleanup(struct rkvdec_dev *rkvdec)
{}

static irqreturn_t rkvdec_irq_handler(int irq, void *priv)
{}

static void rkvdec_watchdog_func(struct work_struct *work)
{}

static const struct of_device_id of_rkvdec_match[] =;
MODULE_DEVICE_TABLE(of, of_rkvdec_match);

static const char * const rkvdec_clk_names[] =;

static int rkvdec_probe(struct platform_device *pdev)
{}

static void rkvdec_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM
static int rkvdec_runtime_resume(struct device *dev)
{}

static int rkvdec_runtime_suspend(struct device *dev)
{}
#endif

static const struct dev_pm_ops rkvdec_pm_ops =;

static struct platform_driver rkvdec_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();