linux/drivers/gpu/drm/exynos/regs-gsc.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* linux/drivers/gpu/drm/exynos/regs-gsc.h
 *
 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * Register definition file for Samsung G-Scaler driver
 */

#ifndef EXYNOS_REGS_GSC_H_
#define EXYNOS_REGS_GSC_H_

/* G-Scaler enable */
#define GSC_ENABLE
#define GSC_ENABLE_PP_UPDATE_TIME_MASK
#define GSC_ENABLE_PP_UPDATE_TIME_CURR
#define GSC_ENABLE_PP_UPDATE_TIME_EOPAS
#define GSC_ENABLE_CLK_GATE_MODE_MASK
#define GSC_ENABLE_CLK_GATE_MODE_FREE
#define GSC_ENABLE_IPC_MODE_MASK
#define GSC_ENABLE_NORM_MODE
#define GSC_ENABLE_IPC_MODE
#define GSC_ENABLE_PP_UPDATE_MODE_MASK
#define GSC_ENABLE_PP_UPDATE_FIRE_MODE
#define GSC_ENABLE_IN_PP_UPDATE
#define GSC_ENABLE_ON_CLEAR_MASK
#define GSC_ENABLE_ON_CLEAR_ONESHOT
#define GSC_ENABLE_QOS_ENABLE
#define GSC_ENABLE_OP_STATUS
#define GSC_ENABLE_SFR_UPDATE
#define GSC_ENABLE_ON

/* G-Scaler S/W reset */
#define GSC_SW_RESET
#define GSC_SW_RESET_SRESET

/* G-Scaler IRQ */
#define GSC_IRQ
#define GSC_IRQ_STATUS_OR_IRQ
#define GSC_IRQ_STATUS_OR_FRM_DONE
#define GSC_IRQ_OR_MASK
#define GSC_IRQ_FRMDONE_MASK
#define GSC_IRQ_ENABLE

/* G-Scaler input control */
#define GSC_IN_CON
#define GSC_IN_CHROM_STRIDE_SEL_MASK
#define GSC_IN_CHROM_STRIDE_SEPAR
#define GSC_IN_RB_SWAP_MASK
#define GSC_IN_RB_SWAP
#define GSC_IN_ROT_MASK
#define GSC_IN_ROT_270
#define GSC_IN_ROT_90_YFLIP
#define GSC_IN_ROT_90_XFLIP
#define GSC_IN_ROT_90
#define GSC_IN_ROT_180
#define GSC_IN_ROT_YFLIP
#define GSC_IN_ROT_XFLIP
#define GSC_IN_RGB_TYPE_MASK
#define GSC_IN_RGB_HD_WIDE
#define GSC_IN_RGB_HD_NARROW
#define GSC_IN_RGB_SD_WIDE
#define GSC_IN_RGB_SD_NARROW
#define GSC_IN_YUV422_1P_ORDER_MASK
#define GSC_IN_YUV422_1P_ORDER_LSB_Y
#define GSC_IN_YUV422_1P_OEDER_LSB_C
#define GSC_IN_CHROMA_ORDER_MASK
#define GSC_IN_CHROMA_ORDER_CBCR
#define GSC_IN_CHROMA_ORDER_CRCB
#define GSC_IN_FORMAT_MASK
#define GSC_IN_XRGB8888
#define GSC_IN_RGB565
#define GSC_IN_YUV420_2P
#define GSC_IN_YUV420_3P
#define GSC_IN_YUV422_1P
#define GSC_IN_YUV422_2P
#define GSC_IN_YUV422_3P
#define GSC_IN_TILE_TYPE_MASK
#define GSC_IN_TILE_C_16x8
#define GSC_IN_TILE_C_16x16
#define GSC_IN_TILE_MODE
#define GSC_IN_LOCAL_SEL_MASK
#define GSC_IN_LOCAL_CAM3
#define GSC_IN_LOCAL_FIMD_WB
#define GSC_IN_LOCAL_CAM1
#define GSC_IN_LOCAL_CAM0
#define GSC_IN_PATH_MASK
#define GSC_IN_PATH_LOCAL
#define GSC_IN_PATH_MEMORY

/* G-Scaler source image size */
#define GSC_SRCIMG_SIZE
#define GSC_SRCIMG_HEIGHT_MASK
#define GSC_SRCIMG_HEIGHT(x)
#define GSC_SRCIMG_WIDTH_MASK
#define GSC_SRCIMG_WIDTH(x)

/* G-Scaler source image offset */
#define GSC_SRCIMG_OFFSET
#define GSC_SRCIMG_OFFSET_Y_MASK
#define GSC_SRCIMG_OFFSET_Y(x)
#define GSC_SRCIMG_OFFSET_X_MASK
#define GSC_SRCIMG_OFFSET_X(x)

/* G-Scaler cropped source image size */
#define GSC_CROPPED_SIZE
#define GSC_CROPPED_HEIGHT_MASK
#define GSC_CROPPED_HEIGHT(x)
#define GSC_CROPPED_WIDTH_MASK
#define GSC_CROPPED_WIDTH(x)

/* G-Scaler output control */
#define GSC_OUT_CON
#define GSC_OUT_GLOBAL_ALPHA_MASK
#define GSC_OUT_GLOBAL_ALPHA(x)
#define GSC_OUT_CHROM_STRIDE_SEL_MASK
#define GSC_OUT_CHROM_STRIDE_SEPAR
#define GSC_OUT_RB_SWAP_MASK
#define GSC_OUT_RB_SWAP
#define GSC_OUT_RGB_TYPE_MASK
#define GSC_OUT_RGB_HD_NARROW
#define GSC_OUT_RGB_HD_WIDE
#define GSC_OUT_RGB_SD_NARROW
#define GSC_OUT_RGB_SD_WIDE
#define GSC_OUT_YUV422_1P_ORDER_MASK
#define GSC_OUT_YUV422_1P_ORDER_LSB_Y
#define GSC_OUT_YUV422_1P_OEDER_LSB_C
#define GSC_OUT_CHROMA_ORDER_MASK
#define GSC_OUT_CHROMA_ORDER_CBCR
#define GSC_OUT_CHROMA_ORDER_CRCB
#define GSC_OUT_FORMAT_MASK
#define GSC_OUT_XRGB8888
#define GSC_OUT_RGB565
#define GSC_OUT_YUV420_2P
#define GSC_OUT_YUV420_3P
#define GSC_OUT_YUV422_1P
#define GSC_OUT_YUV422_2P
#define GSC_OUT_YUV422_3P
#define GSC_OUT_YUV444
#define GSC_OUT_TILE_TYPE_MASK
#define GSC_OUT_TILE_C_16x8
#define GSC_OUT_TILE_C_16x16
#define GSC_OUT_TILE_MODE
#define GSC_OUT_PATH_MASK
#define GSC_OUT_PATH_LOCAL
#define GSC_OUT_PATH_MEMORY

/* G-Scaler scaled destination image size */
#define GSC_SCALED_SIZE
#define GSC_SCALED_HEIGHT_MASK
#define GSC_SCALED_HEIGHT(x)
#define GSC_SCALED_WIDTH_MASK
#define GSC_SCALED_WIDTH(x)

/* G-Scaler pre scale ratio */
#define GSC_PRE_SCALE_RATIO
#define GSC_PRESC_SHFACTOR_MASK
#define GSC_PRESC_SHFACTOR(x)
#define GSC_PRESC_V_RATIO_MASK
#define GSC_PRESC_V_RATIO(x)
#define GSC_PRESC_H_RATIO_MASK
#define GSC_PRESC_H_RATIO(x)

/* G-Scaler main scale horizontal ratio */
#define GSC_MAIN_H_RATIO
#define GSC_MAIN_H_RATIO_MASK
#define GSC_MAIN_H_RATIO_VALUE(x)

/* G-Scaler main scale vertical ratio */
#define GSC_MAIN_V_RATIO
#define GSC_MAIN_V_RATIO_MASK
#define GSC_MAIN_V_RATIO_VALUE(x)

/* G-Scaler input chrominance stride */
#define GSC_IN_CHROM_STRIDE
#define GSC_IN_CHROM_STRIDE_MASK
#define GSC_IN_CHROM_STRIDE_VALUE(x)

/* G-Scaler destination image size */
#define GSC_DSTIMG_SIZE
#define GSC_DSTIMG_HEIGHT_MASK
#define GSC_DSTIMG_HEIGHT(x)
#define GSC_DSTIMG_WIDTH_MASK
#define GSC_DSTIMG_WIDTH(x)

/* G-Scaler destination image offset */
#define GSC_DSTIMG_OFFSET
#define GSC_DSTIMG_OFFSET_Y_MASK
#define GSC_DSTIMG_OFFSET_Y(x)
#define GSC_DSTIMG_OFFSET_X_MASK
#define GSC_DSTIMG_OFFSET_X(x)

/* G-Scaler output chrominance stride */
#define GSC_OUT_CHROM_STRIDE
#define GSC_OUT_CHROM_STRIDE_MASK
#define GSC_OUT_CHROM_STRIDE_VALUE(x)

/* G-Scaler input y address mask */
#define GSC_IN_BASE_ADDR_Y_MASK
/* G-Scaler input y base address */
#define GSC_IN_BASE_ADDR_Y(n)
/* G-Scaler input y base current address */
#define GSC_IN_BASE_ADDR_Y_CUR(n)

/* G-Scaler input cb address mask */
#define GSC_IN_BASE_ADDR_CB_MASK
/* G-Scaler input cb base address */
#define GSC_IN_BASE_ADDR_CB(n)
/* G-Scaler input cb base current address */
#define GSC_IN_BASE_ADDR_CB_CUR(n)

/* G-Scaler input cr address mask */
#define GSC_IN_BASE_ADDR_CR_MASK
/* G-Scaler input cr base address */
#define GSC_IN_BASE_ADDR_CR(n)
/* G-Scaler input cr base current address */
#define GSC_IN_BASE_ADDR_CR_CUR(n)

/* G-Scaler input address mask */
#define GSC_IN_CURR_ADDR_INDEX
#define GSC_IN_CURR_GET_INDEX(x)
#define GSC_IN_BASE_ADDR_PINGPONG(x)
#define GSC_IN_BASE_ADDR_MASK

/* G-Scaler output y address mask */
#define GSC_OUT_BASE_ADDR_Y_MASK
/* G-Scaler output y base address */
#define GSC_OUT_BASE_ADDR_Y(n)

/* G-Scaler output cb address mask */
#define GSC_OUT_BASE_ADDR_CB_MASK
/* G-Scaler output cb base address */
#define GSC_OUT_BASE_ADDR_CB(n)

/* G-Scaler output cr address mask */
#define GSC_OUT_BASE_ADDR_CR_MASK
/* G-Scaler output cr base address */
#define GSC_OUT_BASE_ADDR_CR(n)

/* G-Scaler output address mask */
#define GSC_OUT_CURR_ADDR_INDEX
#define GSC_OUT_CURR_GET_INDEX(x)
#define GSC_OUT_BASE_ADDR_PINGPONG(x)
#define GSC_OUT_BASE_ADDR_MASK

/* G-Scaler horizontal scaling filter */
#define GSC_HCOEF(n, s, x)

/* G-Scaler vertical scaling filter */
#define GSC_VCOEF(n, s, x)

/* G-Scaler BUS control */
#define GSC_BUSCON
#define GSC_BUSCON_INT_TIME_MASK
#define GSC_BUSCON_INT_DATA_TRANS
#define GSC_BUSCON_INT_AXI_RESPONSE
#define GSC_BUSCON_AWCACHE(x)
#define GSC_BUSCON_ARCACHE(x)

/* G-Scaler V position */
#define GSC_VPOSITION
#define GSC_VPOS_F(x)


/* G-Scaler clock initial count */
#define GSC_CLK_INIT_COUNT
#define GSC_CLK_GATE_MODE_INIT_CNT(x)

/* G-Scaler clock snoop count */
#define GSC_CLK_SNOOP_COUNT
#define GSC_CLK_GATE_MODE_SNOOP_CNT(x)

/* SYSCON. GSCBLK_CFG */
#define SYSREG_GSCBLK_CFG1
#define GSC_BLK_DISP1WB_DEST(x)
#define GSC_BLK_SW_RESET_WB_DEST(x)
#define GSC_BLK_PXLASYNC_LO_MASK_WB(x)
#define GSC_BLK_GSCL_WB_IN_SRC_SEL(x)
#define SYSREG_GSCBLK_CFG2
#define PXLASYNC_LO_MASK_CAMIF_GSCL(x)

#endif /* EXYNOS_REGS_GSC_H_ */