#include <linux/delay.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/types.h>
#include "imx8-isi-core.h"
#include "imx8-isi-regs.h"
#define ISI_DOWNSCALE_THRESHOLD …
static inline u32 mxc_isi_read(struct mxc_isi_pipe *pipe, u32 reg)
{ … }
static inline void mxc_isi_write(struct mxc_isi_pipe *pipe, u32 reg, u32 val)
{ … }
void mxc_isi_channel_set_inbuf(struct mxc_isi_pipe *pipe, dma_addr_t dma_addr)
{ … }
void mxc_isi_channel_set_outbuf(struct mxc_isi_pipe *pipe,
const dma_addr_t dma_addrs[3],
enum mxc_isi_buf_id buf_id)
{ … }
void mxc_isi_channel_m2m_start(struct mxc_isi_pipe *pipe)
{ … }
static u32 mxc_isi_channel_scaling_ratio(unsigned int from, unsigned int to,
u32 *dec)
{ … }
static void mxc_isi_channel_set_scaling(struct mxc_isi_pipe *pipe,
enum mxc_isi_encoding encoding,
const struct v4l2_area *in_size,
const struct v4l2_area *out_size,
bool *bypass)
{ … }
static void mxc_isi_channel_set_crop(struct mxc_isi_pipe *pipe,
const struct v4l2_area *src,
const struct v4l2_rect *dst)
{ … }
static const u32 mxc_isi_yuv2rgb_coeffs[6] = …;
static const u32 mxc_isi_rgb2yuv_coeffs[6] = …;
static void mxc_isi_channel_set_csc(struct mxc_isi_pipe *pipe,
enum mxc_isi_encoding in_encoding,
enum mxc_isi_encoding out_encoding,
bool *bypass)
{ … }
void mxc_isi_channel_set_alpha(struct mxc_isi_pipe *pipe, u8 alpha)
{ … }
void mxc_isi_channel_set_flip(struct mxc_isi_pipe *pipe, bool hflip, bool vflip)
{ … }
static void mxc_isi_channel_set_panic_threshold(struct mxc_isi_pipe *pipe)
{ … }
static void mxc_isi_channel_set_control(struct mxc_isi_pipe *pipe,
enum mxc_isi_input_id input,
bool bypass)
{ … }
void mxc_isi_channel_config(struct mxc_isi_pipe *pipe,
enum mxc_isi_input_id input,
const struct v4l2_area *in_size,
const struct v4l2_area *scale,
const struct v4l2_rect *crop,
enum mxc_isi_encoding in_encoding,
enum mxc_isi_encoding out_encoding)
{ … }
void mxc_isi_channel_set_input_format(struct mxc_isi_pipe *pipe,
const struct mxc_isi_format_info *info,
const struct v4l2_pix_format_mplane *format)
{ … }
void mxc_isi_channel_set_output_format(struct mxc_isi_pipe *pipe,
const struct mxc_isi_format_info *info,
struct v4l2_pix_format_mplane *format)
{ … }
u32 mxc_isi_channel_irq_status(struct mxc_isi_pipe *pipe, bool clear)
{ … }
void mxc_isi_channel_irq_clear(struct mxc_isi_pipe *pipe)
{ … }
static void mxc_isi_channel_irq_enable(struct mxc_isi_pipe *pipe)
{ … }
static void mxc_isi_channel_irq_disable(struct mxc_isi_pipe *pipe)
{ … }
static void mxc_isi_channel_sw_reset(struct mxc_isi_pipe *pipe, bool enable_clk)
{ … }
static void __mxc_isi_channel_get(struct mxc_isi_pipe *pipe)
{ … }
void mxc_isi_channel_get(struct mxc_isi_pipe *pipe)
{ … }
static void __mxc_isi_channel_put(struct mxc_isi_pipe *pipe)
{ … }
void mxc_isi_channel_put(struct mxc_isi_pipe *pipe)
{ … }
void mxc_isi_channel_enable(struct mxc_isi_pipe *pipe)
{ … }
void mxc_isi_channel_disable(struct mxc_isi_pipe *pipe)
{ … }
int mxc_isi_channel_acquire(struct mxc_isi_pipe *pipe,
mxc_isi_pipe_irq_t irq_handler, bool bypass)
{ … }
void mxc_isi_channel_release(struct mxc_isi_pipe *pipe)
{ … }
int mxc_isi_channel_chain(struct mxc_isi_pipe *pipe, bool bypass)
{ … }
void mxc_isi_channel_unchain(struct mxc_isi_pipe *pipe)
{ … }