linux/drivers/media/platform/amlogic/meson-ge2d/ge2d.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2020 BayLibre, SAS
 * Author: Neil Armstrong <[email protected]>
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/reset.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/regmap.h>

#include <linux/platform_device.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mem2mem.h>
#include <media/v4l2-ctrls.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>

#include "ge2d-regs.h"

#define GE2D_NAME

#define DEFAULT_WIDTH
#define DEFAULT_HEIGHT
#define DEFAULT_STRIDE

#define MAX_WIDTH
#define MAX_HEIGHT

/*
 * Missing features:
 * - Scaling
 * - Simple 1/2 vertical scaling
 * - YUV input support
 * - Source global alpha
 * - Colorspace conversion
 */

struct ge2d_fmt {};

struct ge2d_frame {};

struct ge2d_ctx {};

struct meson_ge2d {};

#define FMT(_fourcc, _alpha, _depth, _map)

/* TOFIX Handle the YUV input formats */
static const struct ge2d_fmt formats[] =;

#define NUM_FORMATS

static const struct ge2d_fmt *find_fmt(struct v4l2_format *f)
{}

static struct ge2d_frame *get_frame(struct ge2d_ctx *ctx,
				    enum v4l2_buf_type type)
{}

static void ge2d_hw_start(struct meson_ge2d *ge2d)
{}

static void device_run(void *priv)
{}

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

static const struct v4l2_m2m_ops ge2d_m2m_ops =;

static int ge2d_queue_setup(struct vb2_queue *vq,
			    unsigned int *nbuffers, unsigned int *nplanes,
			    unsigned int sizes[], struct device *alloc_devs[])
{}

static int ge2d_buf_prepare(struct vb2_buffer *vb)
{}

static void ge2d_buf_queue(struct vb2_buffer *vb)
{}

static int ge2d_start_streaming(struct vb2_queue *vq, unsigned int count)
{}

static void ge2d_stop_streaming(struct vb2_queue *vq)
{}

static const struct vb2_ops ge2d_qops =;

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

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

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

static int vidioc_g_selection(struct file *file, void *priv,
			      struct v4l2_selection *s)
{}

static int vidioc_s_selection(struct file *file, void *priv,
			      struct v4l2_selection *s)
{}

static void vidioc_setup_cap_fmt(struct ge2d_ctx *ctx, struct v4l2_pix_format *f)
{}

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

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

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

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

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

static const struct v4l2_ioctl_ops ge2d_ioctl_ops =;

static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops ge2d_ctrl_ops =;

static int ge2d_setup_ctrls(struct ge2d_ctx *ctx)
{}

static const struct ge2d_frame def_frame =;

static int ge2d_open(struct file *file)
{}

static int ge2d_release(struct file *file)
{}

static const struct v4l2_file_operations ge2d_fops =;

static const struct video_device ge2d_videodev =;

static const struct regmap_config meson_ge2d_regmap_conf =;

static int ge2d_probe(struct platform_device *pdev)
{}

static void ge2d_remove(struct platform_device *pdev)
{}

static const struct of_device_id meson_ge2d_match[] =;

MODULE_DEVICE_TABLE(of, meson_ge2d_match);

static struct platform_driver ge2d_drv =;

module_platform_driver();

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