linux/drivers/media/platform/amlogic/meson-ge2d/ge2d-regs.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2020 BayLibre, SAS
 * Author: Neil Armstrong <[email protected]>
 * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
 */

#ifndef __GE2D_REGS__
#define __GE2D_REGS__

/* Registers starts at (GE2D_REG(0x8a0 * 4) */
#define GE2D_REG(x)

#define GE2D_GEN_CTRL0

#define GE2D_DST_BYTEMASK_ONLY
#define GE2D_DST_BITMASK_EN
#define GE2D_SRC2_KEY_EN
#define GE2D_SRC2_KEY_MODE
#define GE2D_SRC1_KEY_EN
#define GE2D_SRC1_KEY_MODE
#define GE2D_DST1_8B_MODE_SEL
#define GE2D_DST_CLIP_MODE
#define GE2D_SRC2_8B_MODE_SEL
#define GE2D_SRC2_FILL_MODE
#define GE2D_SRC2_PIC_STRUCT
#define GE2D_SRC2_X_YC_RATIO
#define GE2D_SRC1_8B_MODE_SEL
#define GE2D_SRC1_FILL_MODE
#define GE2D_SRC1_LUT_EN
#define GE2D_SRC1_PIC_STRUCT

#define GE2D_GEN_CTRL1

#define GE2D_SOFT_RST
#define GE2D_DST_WRITE_RESP_CNT_RST
#define GE2D_DST_WRITE_RESP_CNT_ADD_DIS
#define GE2D_COLOR_CONVERSION_MODE1
#define GE2D_INTERRUPT_CTRL
#define GE2D_SRC2_BURST_SIZE_CTRL
#define GE2D_SRC1_BURST_SIZE_CTRL
#define GE2D_DST1_PIC_STRUCT
#define GE2D_SRC_RD_CTRL
#define GE2D_DST2_URGENT_EN
#define GE2D_SRC1_URGENT_EN
#define GE2D_SRC2_URGENT_EN
#define GE2D_DST1_URGENT_EN
#define GE2D_SRC1_GB_ALPHA

#define GE2D_GEN_CTRL2

#define GE2D_ALPHA_CONVERSION_MODE0
#define GE2D_COLOR_CONVERSION_MODE0
#define GE2D_SRC1_GB_ALPHA_EN
#define GE2D_DST1_COLOR_ROUND_MODE
#define GE2D_SRC2_COLOR_EXPAND_MODE
#define GE2D_SRC2_ALPHA_EXPAND_MODE
#define GE2D_SRC1_COLOR_EXPAND_MODE
#define GE2D_SRC1_ALPHA_EXPAND_MODE
#define GE2D_DST_LITTLE_ENDIAN
#define GE2D_DST1_COLOR_MAP
#define GE2D_ALU_MULT_MODE
#define GE2D_DST1_FORMAT
#define GE2D_SRC2_LITTLE_ENDIAN
#define GE2D_SRC2_COLOR_MAP
#define GE2D_ALPHA_CONVERSION_MODE1
#define GE2D_SRC2_FORMAT
#define GE2D_SRC1_LITTLE_ENDIAN
#define GE2D_SRC1_COLOR_MAP
#define GE2D_SRC1_DEEPCOLOR
#define GE2D_SRC1_FORMAT

#define GE2D_FORMAT_8BIT
#define GE2D_FORMAT_16BIT
#define GE2D_FORMAT_24BIT
#define GE2D_FORMAT_32BIT

/* 16 bit */
#define GE2D_COLOR_MAP_YUV422
#define GE2D_COLOR_MAP_RGB655
#define GE2D_COLOR_MAP_YUV655
#define GE2D_COLOR_MAP_RGB844
#define GE2D_COLOR_MAP_YUV844
#define GE2D_COLOR_MAP_RGBA6442
#define GE2D_COLOR_MAP_YUVA6442
#define GE2D_COLOR_MAP_RGBA4444
#define GE2D_COLOR_MAP_YUVA4444
#define GE2D_COLOR_MAP_RGB565
#define GE2D_COLOR_MAP_YUV565
#define GE2D_COLOR_MAP_ARGB4444
#define GE2D_COLOR_MAP_AYUV4444
#define GE2D_COLOR_MAP_ARGB1555
#define GE2D_COLOR_MAP_AYUV1555
#define GE2D_COLOR_MAP_RGBA4642
#define GE2D_COLOR_MAP_YUVA4642

/* 24 bit */
#define GE2D_COLOR_MAP_RGB888
#define GE2D_COLOR_MAP_YUV444
#define GE2D_COLOR_MAP_RGBA5658
#define GE2D_COLOR_MAP_YUVA5658
#define GE2D_COLOR_MAP_ARGB8565
#define GE2D_COLOR_MAP_AYUV8565
#define GE2D_COLOR_MAP_RGBA6666
#define GE2D_COLOR_MAP_YUVA6666
#define GE2D_COLOR_MAP_ARGB6666
#define GE2D_COLOR_MAP_AYUV6666
#define GE2D_COLOR_MAP_BGR888
#define GE2D_COLOR_MAP_VUY888

/* 32 bit */
#define GE2D_COLOR_MAP_RGBA8888
#define GE2D_COLOR_MAP_YUVA8888
#define GE2D_COLOR_MAP_ARGB8888
#define GE2D_COLOR_MAP_AYUV8888
#define GE2D_COLOR_MAP_ABGR8888
#define GE2D_COLOR_MAP_AVUY8888
#define GE2D_COLOR_MAP_BGRA8888
#define GE2D_COLOR_MAP_VUYA8888

#define GE2D_CMD_CTRL

#define GE2D_SRC2_FILL_COLOR_EN
#define GE2D_SRC1_FILL_COLOR_EN
#define GE2D_DST_XY_SWAP
#define GE2D_DST_X_REV
#define GE2D_DST_Y_REV
#define GE2D_SRC2_X_REV
#define GE2D_SRC2_Y_REV
#define GE2D_SRC1_X_REV
#define GE2D_SRC1_Y_REV
#define GE2D_CBUS_CMD_WR

#define GE2D_STATUS0

#define GE2D_DST_WRITE_RSP_CNT
#define GE2D_DP_STATUS
#define GE2D_R1CMD_RDY
#define GE2D_R2CMD_RDY
#define GE2D_PDPCMD_VALID
#define GE2D_DPCMD_RDY
#define GE2D_BUF_CMD_VALID
#define GE2D_CURR_CMD_VALID
#define GE2D_GE2D_BUSY

#define GE2D_STATUS1

#define GE2D_WR_DST1_STATUS
#define GE2D_RD_SRC2_FIFO_EMPTY
#define GE2D_RD_SRC2_FIFO_OVERFLOW
#define GE2D_RD_SRC2_STATE_Y
#define GE2D_RD_SRC2_WIN_ERR
#define GE2D_RD_SRC2_CMD_BUSY
#define GE2D_RD_SRC1_FIFO_EMPTY
#define GE2D_RD_SRC1_FIFO_OVERFLOW
#define GE2D_RD_SRC1_STATE_CR
#define GE2D_RD_SRC1_STATE_CB
#define GE2D_RD_SRC1_STATE_Y
#define GE2D_RD_SRC1_WIN_ERR
#define GE2D_RD_SRC1_CMD_BUSY

#define GE2D_SRC1_DEF_COLOR

#define GE2D_COLOR_R_Y
#define GE2D_COLOR_B_CB
#define GE2D_COLOR_B_CR
#define GE2D_COLOR_ALPHA

#define GE2D_SRC1_CLIPX_START_END

#define GE2D_START_EXTRA
#define GE2D_START_EXTRA0
#define GE2D_START
#define GE2D_END_EXTRA
#define GE2D_END_EXTRA0
#define GE2D_END

#define GE2D_SRC1_CLIPY_START_END
#define GE2D_SRC1_CANVAS

#define GE2D_SRC1_CANVAS_ADDR

#define GE2D_SRC1_X_START_END
#define GE2D_SRC1_Y_START_END
#define GE2D_SRC1_LUT_ADDR

#define GE2D_LUT_READ
#define GE2D_LUT_ADDR

#define GE2D_SRC1_LUT_DAT
#define GE2D_SRC1_FMT_CTRL
#define GE2D_SRC2_DEF_COLOR
#define GE2D_SRC2_CLIPX_START_END
#define GE2D_SRC2_CLIPY_START_END
#define GE2D_SRC2_X_START_END
#define GE2D_SRC2_Y_START_END
#define GE2D_DST_CLIPX_START_END
#define GE2D_DST_CLIPY_START_END
#define GE2D_DST_X_START_END
#define GE2D_DST_Y_START_END
#define GE2D_SRC2_DST_CANVAS

#define GE2D_DST2_CANVAS_ADDR
#define GE2D_SRC2_CANVAS_ADDR
#define GE2D_DST1_CANVAS_ADDR

#define GE2D_VSC_START_PHASE_STEP
#define GE2D_VSC_PHASE_SLOPE
#define GE2D_VSC_INI_CTRL
#define GE2D_HSC_START_PHASE_STEP
#define GE2D_HSC_PHASE_SLOPE
#define GE2D_HSC_INI_CTRL
#define GE2D_HSC_ADV_CTRL
#define GE2D_SC_MISC_CTRL
#define GE2D_VSC_NRND_POINT
#define GE2D_VSC_NRND_PHASE
#define GE2D_HSC_NRND_POINT
#define GE2D_HSC_NRND_PHASE
#define GE2D_MATRIX_PRE_OFFSET
#define GE2D_MATRIX_COEF00_01
#define GE2D_MATRIX_COEF02_10
#define GE2D_MATRIX_COEF11_12
#define GE2D_MATRIX_COEF20_21
#define GE2D_MATRIX_COEF22_CTRL
#define GE2D_MATRIX_OFFSET
#define GE2D_ALU_OP_CTRL

#define GE2D_SRC1_COLOR_MULT_ALPHA_SEL
#define GE2D_SRC2_COLOR_MULT_ALPHA_SEL
#define GE2D_ALU_BLEND_MODE

#define OPERATION_ADD
#define OPERATION_SUB
#define OPERATION_REVERSE_SUB
#define OPERATION_MIN
#define OPERATION_MAX
#define OPERATION_LOGIC

#define GE2D_ALU_SRC_COLOR_BLEND_FACTOR
#define GE2D_ALU_DST_COLOR_BLEND_FACTOR

#define COLOR_FACTOR_ZERO
#define COLOR_FACTOR_ONE
#define COLOR_FACTOR_SRC_COLOR
#define COLOR_FACTOR_ONE_MINUS_SRC_COLOR
#define COLOR_FACTOR_DST_COLOR
#define COLOR_FACTOR_ONE_MINUS_DST_COLOR
#define COLOR_FACTOR_SRC_ALPHA
#define COLOR_FACTOR_ONE_MINUS_SRC_ALPHA
#define COLOR_FACTOR_DST_ALPHA
#define COLOR_FACTOR_ONE_MINUS_DST_ALPHA
#define COLOR_FACTOR_CONST_COLOR
#define COLOR_FACTOR_ONE_MINUS_CONST_COLOR
#define COLOR_FACTOR_CONST_ALPHA
#define COLOR_FACTOR_ONE_MINUS_CONST_ALPHA
#define COLOR_FACTOR_SRC_ALPHA_SATURATE

#define GE2D_ALU_OPERATION_LOGIC

#define LOGIC_OPERATION_CLEAR
#define LOGIC_OPERATION_COPY
#define LOGIC_OPERATION_NOOP
#define LOGIC_OPERATION_SET
#define LOGIC_OPERATION_COPY_INVERT
#define LOGIC_OPERATION_INVERT
#define LOGIC_OPERATION_AND_REVERSE
#define LOGIC_OPERATION_OR_REVERSE
#define LOGIC_OPERATION_AND
#define LOGIC_OPERATION_OR
#define LOGIC_OPERATION_NAND
#define LOGIC_OPERATION_NOR
#define LOGIC_OPERATION_XOR
#define LOGIC_OPERATION_EQUIV
#define LOGIC_OPERATION_AND_INVERT
#define LOGIC_OPERATION_OR_INVERT

#define GE2D_ALU_ALPHA_BLEND_MODE
#define GE2D_ALU_SRC_ALPHA_BLEND_FACTOR
#define GE2D_ALU_DST_ALPHA_BLEND_FACTOR

#define ALPHA_FACTOR_ZERO
#define ALPHA_FACTOR_ONE
#define ALPHA_FACTOR_SRC_ALPHA
#define ALPHA_FACTOR_ONE_MINUS_SRC_ALPHA
#define ALPHA_FACTOR_DST_ALPHA
#define ALPHA_FACTOR_ONE_MINUS_DST_ALPHA
#define ALPHA_FACTOR_CONST_ALPHA
#define ALPHA_FACTOR_ONE_MINUS_CONST_ALPHA

#define GE2D_ALU_ALPHA_OPERATION_LOGIC

#define GE2D_ALU_COLOR_OP(__op, __src_factor, __dst_factor)

#define GE2D_ALU_DO_COLOR_OPERATION_LOGIC(__op, __src_factor)

#define GE2D_ALU_ALPHA_OP(__op, __src_factor, __dst_factor)

#define GE2D_ALU_DO_ALPHA_OPERATION_LOGIC(__op, __src_factor)

#define GE2D_ALU_CONST_COLOR
#define GE2D_SRC1_KEY
#define GE2D_SRC1_KEY_MASK
#define GE2D_SRC2_KEY
#define GE2D_SRC2_KEY_MASK
#define GE2D_DST_BITMASK
#define GE2D_DP_ONOFF_CTRL
#define GE2D_SCALE_COEF_IDX
#define GE2D_SCALE_COEF
#define GE2D_SRC_OUTSIDE_ALPHA
#define GE2D_ANTIFLICK_CTRL0
#define GE2D_ANTIFLICK_CTRL1
#define GE2D_ANTIFLICK_COLOR_FILT0
#define GE2D_ANTIFLICK_COLOR_FILT1
#define GE2D_ANTIFLICK_COLOR_FILT2
#define GE2D_ANTIFLICK_COLOR_FILT3
#define GE2D_ANTIFLICK_ALPHA_FILT0
#define GE2D_ANTIFLICK_ALPHA_FILT1
#define GE2D_ANTIFLICK_ALPHA_FILT2
#define GE2D_ANTIFLICK_ALPHA_FILT3
#define GE2D_SRC1_RANGE_MAP_Y_CTRL
#define GE2D_SRC1_RANGE_MAP_CB_CTRL
#define GE2D_SRC1_RANGE_MAP_CR_CTRL
#define GE2D_ARB_BURST_NUM
#define GE2D_TID_TOKEN
#define GE2D_GEN_CTRL3

#define GE2D_DST2_BYTEMASK_VAL
#define GE2D_DST2_PIC_STRUCT
#define GE2D_DST2_8B_MODE_SEL
#define GE2D_DST2_COLOR_MAP
#define GE2D_DST2_FORMAT
#define GE2D_DST2_COLOR_ROUND_MODE
#define GE2D_DST2_X_DISCARD_MODE
#define GE2D_DST2_Y_DISCARD_MODE
#define GE2D_DST2_ENABLE
#define GE2D_DST1_X_DISCARD_MODE
#define GE2D_DST1_Y_DISCARD_MODE
#define GE2D_DST1_ENABLE

#define GE2D_STATUS2
#define GE2D_GEN_CTRL4
#define GE2D_DST1_BADDR_CTRL
#define GE2D_DST1_STRIDE_CTRL

#define GE2D_STRIDE_SIZE

#define GE2D_SRC1_BADDR_CTRL
#define GE2D_SRC1_STRIDE_CTRL
#define GE2D_SRC2_BADDR_CTRL
#define GE2D_SRC2_STRIDE_CTRL

#endif /* __GE2D_REGS__ */