#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-dma-contig.h>
#include "hva.h"
#include "hva-hw.h"
#define MIN_FRAMES …
#define MIN_STREAMS …
#define HVA_MIN_WIDTH …
#define HVA_MAX_WIDTH …
#define HVA_MIN_HEIGHT …
#define HVA_MAX_HEIGHT …
#define HVA_WIDTH_ALIGNMENT …
#define HVA_HEIGHT_ALIGNMENT …
#define HVA_DEFAULT_WIDTH …
#define HVA_DEFAULT_HEIGHT …
#define HVA_DEFAULT_FRAME_NUM …
#define HVA_DEFAULT_FRAME_DEN …
#define to_type_str(type) …
#define fh_to_ctx(f) …
static const struct hva_enc *hva_encoders[] = …;
static inline int frame_size(u32 w, u32 h, u32 fmt)
{ … }
static inline int frame_stride(u32 w, u32 fmt)
{ … }
static inline int frame_alignment(u32 fmt)
{ … }
static inline int estimated_stream_size(u32 w, u32 h)
{ … }
static void set_default_params(struct hva_ctx *ctx)
{ … }
static const struct hva_enc *hva_find_encoder(struct hva_ctx *ctx,
u32 pixelformat,
u32 streamformat)
{ … }
static void register_format(u32 format, u32 formats[], u32 *nb_of_formats)
{ … }
static void register_formats(struct hva_dev *hva)
{ … }
static void register_encoders(struct hva_dev *hva)
{ … }
static int hva_open_encoder(struct hva_ctx *ctx, u32 streamformat,
u32 pixelformat, struct hva_enc **penc)
{ … }
static void hva_dbg_summary(struct hva_ctx *ctx)
{ … }
static int hva_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int hva_enum_fmt_stream(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int hva_enum_fmt_frame(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int hva_g_fmt_stream(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int hva_g_fmt_frame(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int hva_try_fmt_stream(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int hva_try_fmt_frame(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int hva_s_fmt_stream(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int hva_s_fmt_frame(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int hva_g_parm(struct file *file, void *fh, struct v4l2_streamparm *sp)
{ … }
static int hva_s_parm(struct file *file, void *fh, struct v4l2_streamparm *sp)
{ … }
static int hva_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{ … }
static const struct v4l2_ioctl_ops hva_ioctl_ops = …;
static int hva_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops hva_ctrl_ops = …;
static int hva_ctrls_setup(struct hva_ctx *ctx)
{ … }
static void hva_run_work(struct work_struct *work)
{ … }
static void hva_device_run(void *priv)
{ … }
static void hva_job_abort(void *priv)
{ … }
static int hva_job_ready(void *priv)
{ … }
static const struct v4l2_m2m_ops hva_m2m_ops = …;
static int hva_queue_setup(struct vb2_queue *vq,
unsigned int *num_buffers, unsigned int *num_planes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int hva_buf_prepare(struct vb2_buffer *vb)
{ … }
static void hva_buf_queue(struct vb2_buffer *vb)
{ … }
static int hva_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void hva_stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops hva_qops = …;
static int queue_init(struct hva_ctx *ctx, struct vb2_queue *vq)
{ … }
static int hva_queue_init(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq)
{ … }
static int hva_open(struct file *file)
{ … }
static int hva_release(struct file *file)
{ … }
static const struct v4l2_file_operations hva_fops = …;
static int hva_register_device(struct hva_dev *hva)
{ … }
static void hva_unregister_device(struct hva_dev *hva)
{ … }
static int hva_probe(struct platform_device *pdev)
{ … }
static void hva_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops hva_pm_ops = …;
static const struct of_device_id hva_match_types[] = …;
MODULE_DEVICE_TABLE(of, hva_match_types);
static struct platform_driver hva_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;