linux/drivers/media/platform/qcom/venus/vdec.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 * Copyright (C) 2017 Linaro Ltd.
 */
#include <linux/clk.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-mem2mem.h>
#include <media/videobuf2-dma-contig.h>

#include "hfi_venus_io.h"
#include "hfi_parser.h"
#include "core.h"
#include "helpers.h"
#include "vdec.h"
#include "pm_helpers.h"

/*
 * Three resons to keep MPLANE formats (despite that the number of planes
 * currently is one):
 * - the MPLANE formats allow only one plane to be used
 * - the downstream driver use MPLANE formats too
 * - future firmware versions could add support for >1 planes
 */
static const struct venus_format vdec_formats[] =;

static const struct venus_format *
find_format(struct venus_inst *inst, u32 pixfmt, u32 type)
{}

static const struct venus_format *
find_format_by_index(struct venus_inst *inst, unsigned int index, u32 type)
{}

static const struct venus_format *
vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
{}

static int vdec_try_fmt(struct file *file, void *fh, struct v4l2_format *f)
{}

static int vdec_check_src_change(struct venus_inst *inst)
{}

static int vdec_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
{}

static int vdec_s_fmt(struct file *file, void *fh, struct v4l2_format *f)
{}

static int
vdec_g_selection(struct file *file, void *fh, struct v4l2_selection *s)
{}

static int
vdec_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
{}

static int vdec_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{}

static int vdec_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{}

static int vdec_enum_framesizes(struct file *file, void *fh,
				struct v4l2_frmsizeenum *fsize)
{}

static int vdec_subscribe_event(struct v4l2_fh *fh,
				const struct v4l2_event_subscription *sub)
{}

static int
vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *cmd)
{}

static const struct v4l2_ioctl_ops vdec_ioctl_ops =;

static int vdec_pm_get(struct venus_inst *inst)
{}

static int vdec_pm_put(struct venus_inst *inst, bool autosuspend)
{}

static int vdec_pm_get_put(struct venus_inst *inst)
{}

static void vdec_pm_touch(struct venus_inst *inst)
{}

static int vdec_set_properties(struct venus_inst *inst)
{}

static int vdec_set_work_route(struct venus_inst *inst)
{}

#define is_ubwc_fmt(fmt)
#define is_10bit_ubwc_fmt(fmt)


static int vdec_output_conf(struct venus_inst *inst)
{}

static int vdec_session_init(struct venus_inst *inst)
{}

static int vdec_num_buffers(struct venus_inst *inst, unsigned int *in_num,
			    unsigned int *out_num)
{}

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

static int vdec_verify_conf(struct venus_inst *inst)
{}

static int vdec_start_capture(struct venus_inst *inst)
{}

static int vdec_start_output(struct venus_inst *inst)
{}

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

static void vdec_cancel_dst_buffers(struct venus_inst *inst)
{}

static int vdec_stop_capture(struct venus_inst *inst)
{}

static int vdec_stop_output(struct venus_inst *inst)
{}

static void vdec_stop_streaming(struct vb2_queue *q)
{}

static void vdec_session_release(struct venus_inst *inst)
{}

static int vdec_buf_init(struct vb2_buffer *vb)
{}

static void vdec_buf_cleanup(struct vb2_buffer *vb)
{}

static void vdec_vb2_buf_queue(struct vb2_buffer *vb)
{}

static const struct vb2_ops vdec_vb2_ops =;

static void vdec_buf_done(struct venus_inst *inst, unsigned int buf_type,
			  u32 tag, u32 bytesused, u32 data_offset, u32 flags,
			  u32 hfi_flags, u64 timestamp_us)
{}

static void vdec_event_change(struct venus_inst *inst,
			      struct hfi_event_data *ev_data, bool sufficient)
{}

static void vdec_event_notify(struct venus_inst *inst, u32 event,
			      struct hfi_event_data *data)
{}

static void vdec_flush_done(struct venus_inst *inst)
{}

static const struct hfi_inst_ops vdec_hfi_ops =;

static void vdec_inst_init(struct venus_inst *inst)
{}

static void vdec_m2m_device_run(void *priv)
{}

static const struct v4l2_m2m_ops vdec_m2m_ops =;

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

static int vdec_open(struct file *file)
{}

static int vdec_close(struct file *file)
{}

static const struct v4l2_file_operations vdec_fops =;

static int vdec_probe(struct platform_device *pdev)
{}

static void vdec_remove(struct platform_device *pdev)
{}

static __maybe_unused int vdec_runtime_suspend(struct device *dev)
{}

static __maybe_unused int vdec_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops vdec_pm_ops =;

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

static struct platform_driver qcom_venus_dec_driver =;
module_platform_driver();

MODULE_ALIAS();
MODULE_DESCRIPTION();
MODULE_LICENSE();