#ifndef __IPU3_CSS_H
#define __IPU3_CSS_H
#include <linux/videodev2.h>
#include <linux/types.h>
#include "ipu3-abi.h"
#include "ipu3-css-pool.h"
#define IMGU_NUM_SP …
#define IMGU_MAX_PIPELINE_NUM …
#define IMGU_MAX_PIPE_NUM …
#define IPU3_CSS_AUX_FRAME_REF …
#define IPU3_CSS_AUX_FRAME_TNR …
#define IPU3_CSS_AUX_FRAME_TYPES …
#define IPU3_CSS_AUX_FRAMES …
#define IPU3_CSS_QUEUE_IN …
#define IPU3_CSS_QUEUE_PARAMS …
#define IPU3_CSS_QUEUE_OUT …
#define IPU3_CSS_QUEUE_VF …
#define IPU3_CSS_QUEUE_STAT_3A …
#define IPU3_CSS_QUEUES …
#define IPU3_CSS_RECT_EFFECTIVE …
#define IPU3_CSS_RECT_BDS …
#define IPU3_CSS_RECT_ENVELOPE …
#define IPU3_CSS_RECT_GDC …
#define IPU3_CSS_RECTS …
#define IA_CSS_BINARY_MODE_PRIMARY …
#define IA_CSS_BINARY_MODE_VIDEO …
#define IPU3_CSS_DEFAULT_BINARY …
enum imgu_css_pipe_id { … };
struct imgu_css_resolution { … };
enum imgu_css_buffer_state { … };
struct imgu_css_buffer { … };
struct imgu_css_format { … };
struct imgu_css_queue { … };
struct imgu_css_pipe { … };
struct imgu_css { … };
int imgu_css_init(struct device *dev, struct imgu_css *css,
void __iomem *base, int length);
void imgu_css_cleanup(struct imgu_css *css);
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_start_streaming(struct imgu_css *css);
void imgu_css_stop_streaming(struct imgu_css *css);
bool imgu_css_queue_empty(struct imgu_css *css);
bool imgu_css_is_streaming(struct imgu_css *css);
bool imgu_css_pipe_queue_empty(struct imgu_css *css, unsigned int pipe);
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);
int imgu_css_irq_ack(struct imgu_css *css);
int imgu_css_set_parameters(struct imgu_css *css, unsigned int pipe,
struct ipu3_uapi_params *set_params);
static inline enum imgu_css_buffer_state
imgu_css_buf_state(struct imgu_css_buffer *b)
{ … }
static inline void imgu_css_buf_init(struct imgu_css_buffer *b,
unsigned int queue, dma_addr_t daddr)
{ … }
#endif