#include <linux/device.h>
#include <linux/iopoll.h>
#include <linux/slab.h>
#include "ipu3.h"
#include "ipu3-css.h"
#include "ipu3-css-fw.h"
#include "ipu3-css-params.h"
#include "ipu3-dmamap.h"
#include "ipu3-tables.h"
#define IMGU_IRQCTRL_IRQ_MASK …
#define IPU3_CSS_FORMAT_BPP_DEN …
#define IPU3_CSS_MIN_RES …
#define IPU3_CSS_MAX_H …
#define IPU3_CSS_MAX_W …
#define MIN_ENVELOPE …
#define CSS_ABI_SIZE …
#define CSS_BDS_SIZE …
#define CSS_GDC_SIZE …
#define IPU3_CSS_QUEUE_TO_FLAGS(q) …
#define IPU3_CSS_FORMAT_FL_IN …
#define IPU3_CSS_FORMAT_FL_OUT …
#define IPU3_CSS_FORMAT_FL_VF …
static const struct imgu_css_format imgu_css_formats[] = …;
static const struct { … } imgu_css_queues[IPU3_CSS_QUEUES] = …;
static int imgu_css_queue_init(struct imgu_css_queue *queue,
struct v4l2_pix_format_mplane *fmt, u32 flags)
{ … }
static bool imgu_css_queue_enabled(struct imgu_css_queue *q)
{ … }
static inline void writes(const void *mem, ssize_t count, void __iomem *addr)
{ … }
static int imgu_hw_wait(void __iomem *base, int reg, u32 mask, u32 cmp)
{ … }
int imgu_css_set_powerup(struct device *dev, void __iomem *base,
unsigned int freq)
{ … }
void imgu_css_set_powerdown(struct device *dev, void __iomem *base)
{ … }
static void imgu_css_hw_enable_irq(struct imgu_css *css)
{ … }
static int imgu_css_hw_init(struct imgu_css *css)
{ … }
static int imgu_css_hw_start_sp(struct imgu_css *css, int sp)
{ … }
static int imgu_css_hw_start(struct imgu_css *css)
{ … }
static void imgu_css_hw_stop(struct imgu_css *css)
{ … }
static void imgu_css_hw_cleanup(struct imgu_css *css)
{ … }
static void imgu_css_pipeline_cleanup(struct imgu_css *css, unsigned int pipe)
{ … }
static int imgu_css_pipeline_init(struct imgu_css *css, unsigned int pipe)
{ … }
static u8 imgu_css_queue_pos(struct imgu_css *css, int queue, int thread)
{ … }
static int imgu_css_queue_data(struct imgu_css *css,
int queue, int thread, u32 data)
{ … }
static int imgu_css_dequeue_data(struct imgu_css *css, int queue, u32 *data)
{ … }
static void imgu_css_binary_cleanup(struct imgu_css *css, unsigned int pipe)
{ … }
static int imgu_css_binary_preallocate(struct imgu_css *css, unsigned int pipe)
{ … }
static int imgu_css_binary_setup(struct imgu_css *css, unsigned int pipe)
{ … }
int imgu_css_start_streaming(struct imgu_css *css)
{ … }
void imgu_css_stop_streaming(struct imgu_css *css)
{ … }
bool imgu_css_pipe_queue_empty(struct imgu_css *css, unsigned int pipe)
{ … }
bool imgu_css_queue_empty(struct imgu_css *css)
{ … }
bool imgu_css_is_streaming(struct imgu_css *css)
{ … }
static int imgu_css_map_init(struct imgu_css *css, unsigned int pipe)
{ … }
static void imgu_css_pipe_cleanup(struct imgu_css *css, unsigned int pipe)
{ … }
void imgu_css_cleanup(struct imgu_css *css)
{ … }
int imgu_css_init(struct device *dev, struct imgu_css *css,
void __iomem *base, int length)
{ … }
static u32 imgu_css_adjust(u32 res, u32 align)
{ … }
static int imgu_css_find_binary(struct imgu_css *css,
unsigned int pipe,
struct imgu_css_queue queue[IPU3_CSS_QUEUES],
struct v4l2_rect rects[IPU3_CSS_RECTS])
{ … }
int imgu_css_fmt_try(struct imgu_css *css,
struct v4l2_pix_format_mplane *fmts[IPU3_CSS_QUEUES],
struct v4l2_rect *rects[IPU3_CSS_RECTS],
unsigned int pipe)
{ … }
int imgu_css_fmt_set(struct imgu_css *css,
struct v4l2_pix_format_mplane *fmts[IPU3_CSS_QUEUES],
struct v4l2_rect *rects[IPU3_CSS_RECTS],
unsigned int pipe)
{ … }
int imgu_css_meta_fmt_set(struct v4l2_meta_format *fmt)
{ … }
int imgu_css_buf_queue(struct imgu_css *css, unsigned int pipe,
struct imgu_css_buffer *b)
{ … }
struct imgu_css_buffer *imgu_css_buf_dequeue(struct imgu_css *css)
{ … }
int imgu_css_set_parameters(struct imgu_css *css, unsigned int pipe,
struct ipu3_uapi_params *set_params)
{ … }
int imgu_css_irq_ack(struct imgu_css *css)
{ … }