linux/drivers/gpu/ipu-v3/ipu-ic.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2012-2014 Mentor Graphics Inc.
 * Copyright 2005-2012 Freescale Semiconductor, Inc. All Rights Reserved.
 */

#include <linux/types.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/spinlock.h>
#include <linux/bitrev.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/sizes.h>
#include "ipu-prv.h"

/* IC Register Offsets */
#define IC_CONF
#define IC_PRP_ENC_RSC
#define IC_PRP_VF_RSC
#define IC_PP_RSC
#define IC_CMBP_1
#define IC_CMBP_2
#define IC_IDMAC_1
#define IC_IDMAC_2
#define IC_IDMAC_3
#define IC_IDMAC_4

/* IC Register Fields */
#define IC_CONF_PRPENC_EN
#define IC_CONF_PRPENC_CSC1
#define IC_CONF_PRPENC_ROT_EN
#define IC_CONF_PRPVF_EN
#define IC_CONF_PRPVF_CSC1
#define IC_CONF_PRPVF_CSC2
#define IC_CONF_PRPVF_CMB
#define IC_CONF_PRPVF_ROT_EN
#define IC_CONF_PP_EN
#define IC_CONF_PP_CSC1
#define IC_CONF_PP_CSC2
#define IC_CONF_PP_CMB
#define IC_CONF_PP_ROT_EN
#define IC_CONF_IC_GLB_LOC_A
#define IC_CONF_KEY_COLOR_EN
#define IC_CONF_RWS_EN
#define IC_CONF_CSI_MEM_WR_EN

#define IC_IDMAC_1_CB0_BURST_16
#define IC_IDMAC_1_CB1_BURST_16
#define IC_IDMAC_1_CB2_BURST_16
#define IC_IDMAC_1_CB3_BURST_16
#define IC_IDMAC_1_CB4_BURST_16
#define IC_IDMAC_1_CB5_BURST_16
#define IC_IDMAC_1_CB6_BURST_16
#define IC_IDMAC_1_CB7_BURST_16
#define IC_IDMAC_1_PRPENC_ROT_MASK
#define IC_IDMAC_1_PRPENC_ROT_OFFSET
#define IC_IDMAC_1_PRPVF_ROT_MASK
#define IC_IDMAC_1_PRPVF_ROT_OFFSET
#define IC_IDMAC_1_PP_ROT_MASK
#define IC_IDMAC_1_PP_ROT_OFFSET
#define IC_IDMAC_1_PP_FLIP_RS
#define IC_IDMAC_1_PRPVF_FLIP_RS
#define IC_IDMAC_1_PRPENC_FLIP_RS

#define IC_IDMAC_2_PRPENC_HEIGHT_MASK
#define IC_IDMAC_2_PRPENC_HEIGHT_OFFSET
#define IC_IDMAC_2_PRPVF_HEIGHT_MASK
#define IC_IDMAC_2_PRPVF_HEIGHT_OFFSET
#define IC_IDMAC_2_PP_HEIGHT_MASK
#define IC_IDMAC_2_PP_HEIGHT_OFFSET

#define IC_IDMAC_3_PRPENC_WIDTH_MASK
#define IC_IDMAC_3_PRPENC_WIDTH_OFFSET
#define IC_IDMAC_3_PRPVF_WIDTH_MASK
#define IC_IDMAC_3_PRPVF_WIDTH_OFFSET
#define IC_IDMAC_3_PP_WIDTH_MASK
#define IC_IDMAC_3_PP_WIDTH_OFFSET

struct ic_task_regoffs {};

struct ic_task_bitfields {};

static const struct ic_task_regoffs ic_task_reg[IC_NUM_TASKS] =;

static const struct ic_task_bitfields ic_task_bit[IC_NUM_TASKS] =;

struct ipu_ic_priv;

struct ipu_ic {};

struct ipu_ic_priv {};

static inline u32 ipu_ic_read(struct ipu_ic *ic, unsigned offset)
{}

static inline void ipu_ic_write(struct ipu_ic *ic, u32 value, unsigned offset)
{}

static int init_csc(struct ipu_ic *ic,
		    const struct ipu_ic_csc *csc,
		    int csc_index)
{}

static int calc_resize_coeffs(struct ipu_ic *ic,
			      u32 in_size, u32 out_size,
			      u32 *resize_coeff,
			      u32 *downsize_coeff)
{}

void ipu_ic_task_enable(struct ipu_ic *ic)
{}
EXPORT_SYMBOL_GPL();

void ipu_ic_task_disable(struct ipu_ic *ic)
{}
EXPORT_SYMBOL_GPL();

int ipu_ic_task_graphics_init(struct ipu_ic *ic,
			      const struct ipu_ic_colorspace *g_in_cs,
			      bool galpha_en, u32 galpha,
			      bool colorkey_en, u32 colorkey)
{}
EXPORT_SYMBOL_GPL();

int ipu_ic_task_init_rsc(struct ipu_ic *ic,
			 const struct ipu_ic_csc *csc,
			 int in_width, int in_height,
			 int out_width, int out_height,
			 u32 rsc)
{}

int ipu_ic_task_init(struct ipu_ic *ic,
		     const struct ipu_ic_csc *csc,
		     int in_width, int in_height,
		     int out_width, int out_height)
{}
EXPORT_SYMBOL_GPL();

int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel,
			  u32 width, u32 height, int burst_size,
			  enum ipu_rotate_mode rot)
{}
EXPORT_SYMBOL_GPL();

static void ipu_irt_enable(struct ipu_ic *ic)
{}

static void ipu_irt_disable(struct ipu_ic *ic)
{}

int ipu_ic_enable(struct ipu_ic *ic)
{}
EXPORT_SYMBOL_GPL();

int ipu_ic_disable(struct ipu_ic *ic)
{}
EXPORT_SYMBOL_GPL();

struct ipu_ic *ipu_ic_get(struct ipu_soc *ipu, enum ipu_ic_task task)
{}
EXPORT_SYMBOL_GPL();

void ipu_ic_put(struct ipu_ic *ic)
{}
EXPORT_SYMBOL_GPL();

int ipu_ic_init(struct ipu_soc *ipu, struct device *dev,
		unsigned long base, unsigned long tpmem_base)
{}

void ipu_ic_exit(struct ipu_soc *ipu)
{}

void ipu_ic_dump(struct ipu_ic *ic)
{}
EXPORT_SYMBOL_GPL();