linux/drivers/media/platform/st/sti/delta/delta-v4l2.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) STMicroelectronics SA 2015
 * Authors: Hugues Fruchet <[email protected]>
 *          Jean-Christophe Trotin <[email protected]>
 *          for STMicroelectronics.
 */

#include <linux/clk.h>
#include <linux/module.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/videobuf2-dma-contig.h>

#include "delta.h"
#include "delta-debug.h"
#include "delta-ipc.h"

#define DELTA_NAME

#define DELTA_PREFIX

#define to_ctx(__fh)
#define to_au(__vbuf)
#define to_frame(__vbuf)

#define call_dec_op(dec, op, args...)

/* registry of available decoders */
static const struct delta_dec *delta_decoders[] =;

static inline int frame_size(u32 w, u32 h, u32 fmt)
{}

static inline int frame_stride(u32 w, u32 fmt)
{}

static void dump_au(struct delta_ctx *ctx, struct delta_au *au)
{}

static void dump_frame(struct delta_ctx *ctx, struct delta_frame *frame)
{}

static void delta_au_done(struct delta_ctx *ctx, struct delta_au *au, int err)
{}

static void delta_frame_done(struct delta_ctx *ctx, struct delta_frame *frame,
			     int err)
{}

static void requeue_free_frames(struct delta_ctx *ctx)
{}

static int delta_recycle(struct delta_ctx *ctx, struct delta_frame *frame)
{}

static void delta_push_dts(struct delta_ctx *ctx, u64 val)
{}

static void delta_pop_dts(struct delta_ctx *ctx, u64 *val)
{}

static void delta_flush_dts(struct delta_ctx *ctx)
{}

static inline int frame_alignment(u32 fmt)
{}

static inline int estimated_au_size(u32 w, u32 h)
{}

static void set_default_params(struct delta_ctx *ctx)
{}

static const struct delta_dec *delta_find_decoder(struct delta_ctx *ctx,
						  u32 streamformat,
						  u32 pixelformat)
{}

static void register_format(u32 format, u32 formats[], u32 *nb_of_formats)
{}

static void register_formats(struct delta_dev *delta)
{}

static void register_decoders(struct delta_dev *delta)
{}

static int delta_open_decoder(struct delta_ctx *ctx, u32 streamformat,
			      u32 pixelformat, const struct delta_dec **pdec)
{}

/*
 * V4L2 ioctl operations
 */

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

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

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

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

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

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

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

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

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

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

static void delta_complete_eos(struct delta_ctx *ctx,
			       struct delta_frame *frame)
{}

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

static int delta_decoder_stop_cmd(struct delta_ctx *ctx, void *fh)
{}

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

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

/* v4l2 ioctl ops */
static const struct v4l2_ioctl_ops delta_ioctl_ops =;

/*
 * mem-to-mem operations
 */

static void delta_run_work(struct work_struct *work)
{}

static void delta_device_run(void *priv)
{}

static void delta_job_abort(void *priv)
{}

static int delta_job_ready(void *priv)
{}

/* mem-to-mem ops */
static const struct v4l2_m2m_ops delta_m2m_ops =;

/*
 * VB2 queue operations
 */

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

static int delta_vb2_au_prepare(struct vb2_buffer *vb)
{}

static int delta_setup_frame(struct delta_ctx *ctx,
			     struct delta_frame *frame)
{}

/*
 * default implementation of get_frameinfo decoder ops
 * matching frame information from stream information
 * & with default pixel format & default alignment.
 */
int delta_get_frameinfo_default(struct delta_ctx *ctx,
				struct delta_frameinfo *frameinfo)
{}

/*
 * default implementation of recycle decoder ops
 * consisting to relax the "decoded" frame state
 */
int delta_recycle_default(struct delta_ctx *pctx,
			  struct delta_frame *frame)
{}

static void dump_frames_status(struct delta_ctx *ctx)
{}

int delta_get_free_frame(struct delta_ctx *ctx,
			 struct delta_frame **pframe)
{}

int delta_get_sync(struct delta_ctx *ctx)
{}

void delta_put_autosuspend(struct delta_ctx *ctx)
{}

static void delta_vb2_au_queue(struct vb2_buffer *vb)
{}

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

static void delta_vb2_au_stop_streaming(struct vb2_queue *q)
{}

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

static int delta_vb2_frame_prepare(struct vb2_buffer *vb)
{}

static void delta_vb2_frame_finish(struct vb2_buffer *vb)
{}

static void delta_vb2_frame_queue(struct vb2_buffer *vb)
{}

static void delta_vb2_frame_stop_streaming(struct vb2_queue *q)
{}

/* VB2 queue ops */
static const struct vb2_ops delta_vb2_au_ops =;

static const struct vb2_ops delta_vb2_frame_ops =;

/*
 * V4L2 file operations
 */

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

static int delta_open(struct file *file)
{}

static int delta_release(struct file *file)
{}

/* V4L2 file ops */
static const struct v4l2_file_operations delta_fops =;

/*
 * Platform device operations
 */

static int delta_register_device(struct delta_dev *delta)
{}

static void delta_unregister_device(struct delta_dev *delta)
{}

static int delta_probe(struct platform_device *pdev)
{}

static void delta_remove(struct platform_device *pdev)
{}

static int delta_runtime_suspend(struct device *dev)
{}

static int delta_runtime_resume(struct device *dev)
{}

/* PM ops */
static const struct dev_pm_ops delta_pm_ops =;

static const struct of_device_id delta_match_types[] =;

MODULE_DEVICE_TABLE(of, delta_match_types);

static struct platform_driver delta_driver =;

module_platform_driver();

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