#include <drm/drm_fourcc.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/genalloc.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"
#define IPU_PRE_MAX_WIDTH …
#define IPU_PRE_NUM_SCANLINES …
#define IPU_PRE_CTRL …
#define IPU_PRE_CTRL_SET …
#define IPU_PRE_CTRL_ENABLE …
#define IPU_PRE_CTRL_BLOCK_EN …
#define IPU_PRE_CTRL_BLOCK_16 …
#define IPU_PRE_CTRL_SDW_UPDATE …
#define IPU_PRE_CTRL_VFLIP …
#define IPU_PRE_CTRL_SO …
#define IPU_PRE_CTRL_INTERLACED_FIELD …
#define IPU_PRE_CTRL_HANDSHAKE_EN …
#define IPU_PRE_CTRL_HANDSHAKE_LINE_NUM(v) …
#define IPU_PRE_CTRL_HANDSHAKE_ABORT_SKIP_EN …
#define IPU_PRE_CTRL_EN_REPEAT …
#define IPU_PRE_CTRL_TPR_REST_SEL …
#define IPU_PRE_CTRL_CLKGATE …
#define IPU_PRE_CTRL_SFTRST …
#define IPU_PRE_CUR_BUF …
#define IPU_PRE_NEXT_BUF …
#define IPU_PRE_TPR_CTRL …
#define IPU_PRE_TPR_CTRL_TILE_FORMAT(v) …
#define IPU_PRE_TPR_CTRL_TILE_FORMAT_MASK …
#define IPU_PRE_TPR_CTRL_TILE_FORMAT_16_BIT …
#define IPU_PRE_TPR_CTRL_TILE_FORMAT_SPLIT_BUF …
#define IPU_PRE_TPR_CTRL_TILE_FORMAT_SINGLE_BUF …
#define IPU_PRE_TPR_CTRL_TILE_FORMAT_SUPER_TILED …
#define IPU_PRE_PREFETCH_ENG_CTRL …
#define IPU_PRE_PREF_ENG_CTRL_PREFETCH_EN …
#define IPU_PRE_PREF_ENG_CTRL_RD_NUM_BYTES(v) …
#define IPU_PRE_PREF_ENG_CTRL_INPUT_ACTIVE_BPP(v) …
#define IPU_PRE_PREF_ENG_CTRL_INPUT_PIXEL_FORMAT(v) …
#define IPU_PRE_PREF_ENG_CTRL_SHIFT_BYPASS …
#define IPU_PRE_PREF_ENG_CTRL_FIELD_INVERSE …
#define IPU_PRE_PREF_ENG_CTRL_PARTIAL_UV_SWAP …
#define IPU_PRE_PREF_ENG_CTRL_TPR_COOR_OFFSET_EN …
#define IPU_PRE_PREFETCH_ENG_INPUT_SIZE …
#define IPU_PRE_PREFETCH_ENG_INPUT_SIZE_WIDTH(v) …
#define IPU_PRE_PREFETCH_ENG_INPUT_SIZE_HEIGHT(v) …
#define IPU_PRE_PREFETCH_ENG_PITCH …
#define IPU_PRE_PREFETCH_ENG_PITCH_Y(v) …
#define IPU_PRE_PREFETCH_ENG_PITCH_UV(v) …
#define IPU_PRE_STORE_ENG_CTRL …
#define IPU_PRE_STORE_ENG_CTRL_STORE_EN …
#define IPU_PRE_STORE_ENG_CTRL_WR_NUM_BYTES(v) …
#define IPU_PRE_STORE_ENG_CTRL_OUTPUT_ACTIVE_BPP(v) …
#define IPU_PRE_STORE_ENG_STATUS …
#define IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_X_MASK …
#define IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_X_SHIFT …
#define IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK …
#define IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT …
#define IPU_PRE_STORE_ENG_STATUS_STORE_FIFO_FULL …
#define IPU_PRE_STORE_ENG_STATUS_STORE_FIELD …
#define IPU_PRE_STORE_ENG_SIZE …
#define IPU_PRE_STORE_ENG_SIZE_INPUT_WIDTH(v) …
#define IPU_PRE_STORE_ENG_SIZE_INPUT_HEIGHT(v) …
#define IPU_PRE_STORE_ENG_PITCH …
#define IPU_PRE_STORE_ENG_PITCH_OUT_PITCH(v) …
#define IPU_PRE_STORE_ENG_ADDR …
struct ipu_pre { … };
static DEFINE_MUTEX(ipu_pre_list_mutex);
static LIST_HEAD(ipu_pre_list);
static int available_pres;
int ipu_pre_get_available_count(void)
{ … }
struct ipu_pre *
ipu_pre_lookup_by_phandle(struct device *dev, const char *name, int index)
{ … }
int ipu_pre_get(struct ipu_pre *pre)
{ … }
void ipu_pre_put(struct ipu_pre *pre)
{ … }
static inline void
ipu_pre_update_safe_window(struct ipu_pre *pre)
{ … }
static void
ipu_pre_configure_modifier(struct ipu_pre *pre, uint64_t modifier)
{ … }
void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,
unsigned int height, unsigned int stride, u32 format,
uint64_t modifier, unsigned int bufaddr)
{ … }
void ipu_pre_update(struct ipu_pre *pre, uint64_t modifier, unsigned int bufaddr)
{ … }
bool ipu_pre_update_pending(struct ipu_pre *pre)
{ … }
u32 ipu_pre_get_baddr(struct ipu_pre *pre)
{ … }
static int ipu_pre_probe(struct platform_device *pdev)
{ … }
static void ipu_pre_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id ipu_pre_dt_ids[] = …;
struct platform_driver ipu_pre_drv = …;