162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Register definition file for Samsung MFC V6.x Interface (FIMV) driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2012 Samsung Electronics Co., Ltd. 662306a36Sopenharmony_ci * http://www.samsung.com/ 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _REGS_FIMV_V6_H 1062306a36Sopenharmony_ci#define _REGS_FIMV_V6_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include <linux/kernel.h> 1362306a36Sopenharmony_ci#include <linux/sizes.h> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define S5P_FIMV_REG_SIZE_V6 (S5P_FIMV_END_ADDR - S5P_FIMV_START_ADDR) 1662306a36Sopenharmony_ci#define S5P_FIMV_REG_COUNT_V6 ((S5P_FIMV_END_ADDR - S5P_FIMV_START_ADDR) / 4) 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/* Number of bits that the buffer address should be shifted for particular 1962306a36Sopenharmony_ci * MFC buffers. */ 2062306a36Sopenharmony_ci#define S5P_FIMV_MEM_OFFSET_V6 0 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci#define S5P_FIMV_START_ADDR_V6 0x0000 2362306a36Sopenharmony_ci#define S5P_FIMV_END_ADDR_V6 0xfd80 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define S5P_FIMV_REG_CLEAR_BEGIN_V6 0xf000 2662306a36Sopenharmony_ci#define S5P_FIMV_REG_CLEAR_COUNT_V6 1024 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* Codec Common Registers */ 2962306a36Sopenharmony_ci#define S5P_FIMV_RISC_ON_V6 0x0000 3062306a36Sopenharmony_ci#define S5P_FIMV_RISC2HOST_INT_V6 0x003C 3162306a36Sopenharmony_ci#define S5P_FIMV_HOST2RISC_INT_V6 0x0044 3262306a36Sopenharmony_ci#define S5P_FIMV_RISC_BASE_ADDRESS_V6 0x0054 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci#define S5P_FIMV_MFC_RESET_V6 0x1070 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#define S5P_FIMV_HOST2RISC_CMD_V6 0x1100 3762306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_EMPTY_V6 0 3862306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_SYS_INIT_V6 1 3962306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6 2 4062306a36Sopenharmony_ci#define S5P_FIMV_CH_SEQ_HEADER_V6 3 4162306a36Sopenharmony_ci#define S5P_FIMV_CH_INIT_BUFS_V6 4 4262306a36Sopenharmony_ci#define S5P_FIMV_CH_FRAME_START_V6 5 4362306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6 6 4462306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_SLEEP_V6 7 4562306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_WAKEUP_V6 8 4662306a36Sopenharmony_ci#define S5P_FIMV_CH_LAST_FRAME_V6 9 4762306a36Sopenharmony_ci#define S5P_FIMV_H2R_CMD_FLUSH_V6 10 4862306a36Sopenharmony_ci/* RMVME: REALLOC used? */ 4962306a36Sopenharmony_ci#define S5P_FIMV_CH_FRAME_START_REALLOC_V6 5 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define S5P_FIMV_RISC2HOST_CMD_V6 0x1104 5262306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_EMPTY_V6 0 5362306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SYS_INIT_RET_V6 1 5462306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_OPEN_INSTANCE_RET_V6 2 5562306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SEQ_DONE_RET_V6 3 5662306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_INIT_BUFFERS_RET_V6 4 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_CLOSE_INSTANCE_RET_V6 6 5962306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SLEEP_RET_V6 7 6062306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_WAKEUP_RET_V6 8 6162306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_COMPLETE_SEQ_RET_V6 9 6262306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_DPB_FLUSH_RET_V6 10 6362306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_NAL_ABORT_RET_V6 11 6462306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_FW_STATUS_RET_V6 12 6562306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_FRAME_DONE_RET_V6 13 6662306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_FIELD_DONE_RET_V6 14 6762306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SLICE_DONE_RET_V6 15 6862306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_ENC_BUFFER_FUL_RET_V6 16 6962306a36Sopenharmony_ci#define S5P_FIMV_R2H_CMD_ERR_RET_V6 32 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#define S5P_FIMV_MFC_BUS_RESET_CTRL 0x7110 7262306a36Sopenharmony_ci#define S5P_FIMV_FW_VERSION_V6 0xf000 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#define S5P_FIMV_INSTANCE_ID_V6 0xf008 7562306a36Sopenharmony_ci#define S5P_FIMV_CODEC_TYPE_V6 0xf00c 7662306a36Sopenharmony_ci#define S5P_FIMV_CONTEXT_MEM_ADDR_V6 0xf014 7762306a36Sopenharmony_ci#define S5P_FIMV_CONTEXT_MEM_SIZE_V6 0xf018 7862306a36Sopenharmony_ci#define S5P_FIMV_PIXEL_FORMAT_V6 0xf020 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci#define S5P_FIMV_METADATA_ENABLE_V6 0xf024 8162306a36Sopenharmony_ci#define S5P_FIMV_DBG_BUFFER_ADDR_V6 0xf030 8262306a36Sopenharmony_ci#define S5P_FIMV_DBG_BUFFER_SIZE_V6 0xf034 8362306a36Sopenharmony_ci#define S5P_FIMV_RET_INSTANCE_ID_V6 0xf070 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#define S5P_FIMV_ERROR_CODE_V6 0xf074 8662306a36Sopenharmony_ci#define S5P_FIMV_ERR_WARNINGS_START_V6 160 8762306a36Sopenharmony_ci#define S5P_FIMV_ERR_DEC_MASK_V6 0xffff 8862306a36Sopenharmony_ci#define S5P_FIMV_ERR_DEC_SHIFT_V6 0 8962306a36Sopenharmony_ci#define S5P_FIMV_ERR_DSPL_MASK_V6 0xffff0000 9062306a36Sopenharmony_ci#define S5P_FIMV_ERR_DSPL_SHIFT_V6 16 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci#define S5P_FIMV_DBG_BUFFER_OUTPUT_SIZE_V6 0xf078 9362306a36Sopenharmony_ci#define S5P_FIMV_METADATA_STATUS_V6 0xf07C 9462306a36Sopenharmony_ci#define S5P_FIMV_METADATA_ADDR_MB_INFO_V6 0xf080 9562306a36Sopenharmony_ci#define S5P_FIMV_METADATA_SIZE_MB_INFO_V6 0xf084 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci/* Decoder Registers */ 9862306a36Sopenharmony_ci#define S5P_FIMV_D_CRC_CTRL_V6 0xf0b0 9962306a36Sopenharmony_ci#define S5P_FIMV_D_DEC_OPTIONS_V6 0xf0b4 10062306a36Sopenharmony_ci#define S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6 4 10162306a36Sopenharmony_ci#define S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6 3 10262306a36Sopenharmony_ci#define S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6 1 10362306a36Sopenharmony_ci#define S5P_FIMV_D_OPT_LF_CTRL_MASK_V6 0x3 10462306a36Sopenharmony_ci#define S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6 0 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_DELAY_V6 0xf0b8 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci#define S5P_FIMV_D_SET_FRAME_WIDTH_V6 0xf0bc 10962306a36Sopenharmony_ci#define S5P_FIMV_D_SET_FRAME_HEIGHT_V6 0xf0c0 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci#define S5P_FIMV_D_SEI_ENABLE_V6 0xf0c4 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci/* Buffer setting registers */ 11462306a36Sopenharmony_ci#define S5P_FIMV_D_MIN_NUM_DPB_V6 0xf0f0 11562306a36Sopenharmony_ci#define S5P_FIMV_D_MIN_LUMA_DPB_SIZE_V6 0xf0f4 11662306a36Sopenharmony_ci#define S5P_FIMV_D_MIN_CHROMA_DPB_SIZE_V6 0xf0f8 11762306a36Sopenharmony_ci#define S5P_FIMV_D_MVC_NUM_VIEWS_V6 0xf0fc 11862306a36Sopenharmony_ci#define S5P_FIMV_D_MIN_NUM_MV_V6 0xf100 11962306a36Sopenharmony_ci#define S5P_FIMV_D_NUM_DPB_V6 0xf130 12062306a36Sopenharmony_ci#define S5P_FIMV_D_LUMA_DPB_SIZE_V6 0xf134 12162306a36Sopenharmony_ci#define S5P_FIMV_D_CHROMA_DPB_SIZE_V6 0xf138 12262306a36Sopenharmony_ci#define S5P_FIMV_D_MV_BUFFER_SIZE_V6 0xf13c 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci#define S5P_FIMV_D_LUMA_DPB_V6 0xf140 12562306a36Sopenharmony_ci#define S5P_FIMV_D_CHROMA_DPB_V6 0xf240 12662306a36Sopenharmony_ci#define S5P_FIMV_D_MV_BUFFER_V6 0xf340 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci#define S5P_FIMV_D_SCRATCH_BUFFER_ADDR_V6 0xf440 12962306a36Sopenharmony_ci#define S5P_FIMV_D_SCRATCH_BUFFER_SIZE_V6 0xf444 13062306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_BUFFER_ADDR_V6 0xf448 13162306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_BUFFER_SIZE_V6 0xf44c 13262306a36Sopenharmony_ci#define S5P_FIMV_D_NUM_MV_V6 0xf478 13362306a36Sopenharmony_ci#define S5P_FIMV_D_CPB_BUFFER_ADDR_V6 0xf4b0 13462306a36Sopenharmony_ci#define S5P_FIMV_D_CPB_BUFFER_SIZE_V6 0xf4b4 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci#define S5P_FIMV_D_AVAILABLE_DPB_FLAG_UPPER_V6 0xf4b8 13762306a36Sopenharmony_ci#define S5P_FIMV_D_AVAILABLE_DPB_FLAG_LOWER_V6 0xf4bc 13862306a36Sopenharmony_ci#define S5P_FIMV_D_CPB_BUFFER_OFFSET_V6 0xf4c0 13962306a36Sopenharmony_ci#define S5P_FIMV_D_SLICE_IF_ENABLE_V6 0xf4c4 14062306a36Sopenharmony_ci#define S5P_FIMV_D_PICTURE_TAG_V6 0xf4c8 14162306a36Sopenharmony_ci#define S5P_FIMV_D_STREAM_DATA_SIZE_V6 0xf4d0 14262306a36Sopenharmony_ci#define S5P_FIMV_D_INIT_BUFFER_OPTIONS_V6 0xf47c 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ci/* Display information register */ 14562306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_FRAME_WIDTH_V6 0xf500 14662306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_FRAME_HEIGHT_V6 0xf504 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci/* Display status */ 14962306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_STATUS_V6 0xf508 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_LUMA_ADDR_V6 0xf50c 15262306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CHROMA_ADDR_V6 0xf510 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_FRAME_TYPE_V6 0xf514 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CROP_INFO1_V6 0xf518 15762306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CROP_INFO2_V6 0xf51c 15862306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_PICTURE_PROFILE_V6 0xf520 15962306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_LUMA_CRC_TOP_V6 0xf524 16062306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CHROMA_CRC_TOP_V6 0xf528 16162306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_LUMA_CRC_BOT_V6 0xf52c 16262306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CHROMA_CRC_BOT_V6 0xf530 16362306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_ASPECT_RATIO_V6 0xf534 16462306a36Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_EXTENDED_AR_V6 0xf538 16562306a36Sopenharmony_ci 16662306a36Sopenharmony_ci/* Decoded picture information register */ 16762306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_FRAME_WIDTH_V6 0xf53c 16862306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_FRAME_HEIGHT_V6 0xf540 16962306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_STATUS_V6 0xf544 17062306a36Sopenharmony_ci#define S5P_FIMV_DEC_CRC_GEN_MASK_V6 0x1 17162306a36Sopenharmony_ci#define S5P_FIMV_DEC_CRC_GEN_SHIFT_V6 6 17262306a36Sopenharmony_ci 17362306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_LUMA_ADDR_V6 0xf548 17462306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_CHROMA_ADDR_V6 0xf54c 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_FRAME_TYPE_V6 0xf550 17762306a36Sopenharmony_ci#define S5P_FIMV_DECODE_FRAME_MASK_V6 7 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_CROP_INFO1_V6 0xf554 18062306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_CROP_INFO2_V6 0xf558 18162306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_PICTURE_PROFILE_V6 0xf55c 18262306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_NAL_SIZE_V6 0xf560 18362306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_LUMA_CRC_TOP_V6 0xf564 18462306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_CHROMA_CRC_TOP_V6 0xf568 18562306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_LUMA_CRC_BOT_V6 0xf56c 18662306a36Sopenharmony_ci#define S5P_FIMV_D_DECODED_CHROMA_CRC_BOT_V6 0xf570 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci/* Returned value register for specific setting */ 18962306a36Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V6 0xf574 19062306a36Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V6 0xf578 19162306a36Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TIME_TOP_V6 0xf57c 19262306a36Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TIME_BOT_V6 0xf580 19362306a36Sopenharmony_ci#define S5P_FIMV_D_CHROMA_FORMAT_V6 0xf588 19462306a36Sopenharmony_ci#define S5P_FIMV_D_MPEG4_INFO_V6 0xf58c 19562306a36Sopenharmony_ci#define S5P_FIMV_D_H264_INFO_V6 0xf590 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_CONCEALED_MB_V6 0xf594 19862306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_CONCEALED_MB_V6 0xf598 19962306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_VC1_PARAM_V6 0xf59c 20062306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_VC1_PARAM_V6 0xf5a0 20162306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_SEI_NAL_V6 0xf5a4 20262306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_SEI_NAL_V6 0xf5a8 20362306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_VUI_V6 0xf5ac 20462306a36Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_VUI_V6 0xf5b0 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci#define S5P_FIMV_D_MVC_VIEW_ID_V6 0xf5b4 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci/* SEI related information */ 20962306a36Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V6 0xf5f0 21062306a36Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_ARRGMENT_ID_V6 0xf5f4 21162306a36Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_SEI_INFO_V6 0xf5f8 21262306a36Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_GRID_POS_V6 0xf5fc 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci/* Encoder Registers */ 21562306a36Sopenharmony_ci#define S5P_FIMV_E_FRAME_WIDTH_V6 0xf770 21662306a36Sopenharmony_ci#define S5P_FIMV_E_FRAME_HEIGHT_V6 0xf774 21762306a36Sopenharmony_ci#define S5P_FIMV_E_CROPPED_FRAME_WIDTH_V6 0xf778 21862306a36Sopenharmony_ci#define S5P_FIMV_E_CROPPED_FRAME_HEIGHT_V6 0xf77c 21962306a36Sopenharmony_ci#define S5P_FIMV_E_FRAME_CROP_OFFSET_V6 0xf780 22062306a36Sopenharmony_ci#define S5P_FIMV_E_ENC_OPTIONS_V6 0xf784 22162306a36Sopenharmony_ci#define S5P_FIMV_E_PICTURE_PROFILE_V6 0xf788 22262306a36Sopenharmony_ci#define S5P_FIMV_E_FIXED_PICTURE_QP_V6 0xf790 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci#define S5P_FIMV_E_RC_CONFIG_V6 0xf794 22562306a36Sopenharmony_ci#define S5P_FIMV_E_RC_QP_BOUND_V6 0xf798 22662306a36Sopenharmony_ci#define S5P_FIMV_E_RC_RPARAM_V6 0xf79c 22762306a36Sopenharmony_ci#define S5P_FIMV_E_MB_RC_CONFIG_V6 0xf7a0 22862306a36Sopenharmony_ci#define S5P_FIMV_E_PADDING_CTRL_V6 0xf7a4 22962306a36Sopenharmony_ci#define S5P_FIMV_E_MV_HOR_RANGE_V6 0xf7ac 23062306a36Sopenharmony_ci#define S5P_FIMV_E_MV_VER_RANGE_V6 0xf7b0 23162306a36Sopenharmony_ci#define S5P_FIMV_E_MV_RANGE_V6_MASK 0x3fff 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci#define S5P_FIMV_E_VBV_BUFFER_SIZE_V6 0xf84c 23462306a36Sopenharmony_ci#define S5P_FIMV_E_VBV_INIT_DELAY_V6 0xf850 23562306a36Sopenharmony_ci#define S5P_FIMV_E_NUM_DPB_V6 0xf890 23662306a36Sopenharmony_ci#define S5P_FIMV_E_LUMA_DPB_V6 0xf8c0 23762306a36Sopenharmony_ci#define S5P_FIMV_E_CHROMA_DPB_V6 0xf904 23862306a36Sopenharmony_ci#define S5P_FIMV_E_ME_BUFFER_V6 0xf948 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci#define S5P_FIMV_E_SCRATCH_BUFFER_ADDR_V6 0xf98c 24162306a36Sopenharmony_ci#define S5P_FIMV_E_SCRATCH_BUFFER_SIZE_V6 0xf990 24262306a36Sopenharmony_ci#define S5P_FIMV_E_TMV_BUFFER0_V6 0xf994 24362306a36Sopenharmony_ci#define S5P_FIMV_E_TMV_BUFFER1_V6 0xf998 24462306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_LUMA_ADDR_V6 0xf9f0 24562306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_CHROMA_ADDR_V6 0xf9f4 24662306a36Sopenharmony_ci#define S5P_FIMV_E_STREAM_BUFFER_ADDR_V6 0xf9f8 24762306a36Sopenharmony_ci#define S5P_FIMV_E_STREAM_BUFFER_SIZE_V6 0xf9fc 24862306a36Sopenharmony_ci#define S5P_FIMV_E_ROI_BUFFER_ADDR_V6 0xfA00 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_ci#define S5P_FIMV_E_PARAM_CHANGE_V6 0xfa04 25162306a36Sopenharmony_ci#define S5P_FIMV_E_IR_SIZE_V6 0xfa08 25262306a36Sopenharmony_ci#define S5P_FIMV_E_GOP_CONFIG_V6 0xfa0c 25362306a36Sopenharmony_ci#define S5P_FIMV_E_MSLICE_MODE_V6 0xfa10 25462306a36Sopenharmony_ci#define S5P_FIMV_E_MSLICE_SIZE_MB_V6 0xfa14 25562306a36Sopenharmony_ci#define S5P_FIMV_E_MSLICE_SIZE_BITS_V6 0xfa18 25662306a36Sopenharmony_ci#define S5P_FIMV_E_FRAME_INSERTION_V6 0xfa1c 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci#define S5P_FIMV_E_RC_FRAME_RATE_V6 0xfa20 25962306a36Sopenharmony_ci#define S5P_FIMV_E_RC_BIT_RATE_V6 0xfa24 26062306a36Sopenharmony_ci#define S5P_FIMV_E_RC_QP_OFFSET_V6 0xfa28 26162306a36Sopenharmony_ci#define S5P_FIMV_E_RC_ROI_CTRL_V6 0xfa2c 26262306a36Sopenharmony_ci#define S5P_FIMV_E_PICTURE_TAG_V6 0xfa30 26362306a36Sopenharmony_ci#define S5P_FIMV_E_BIT_COUNT_ENABLE_V6 0xfa34 26462306a36Sopenharmony_ci#define S5P_FIMV_E_MAX_BIT_COUNT_V6 0xfa38 26562306a36Sopenharmony_ci#define S5P_FIMV_E_MIN_BIT_COUNT_V6 0xfa3c 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci#define S5P_FIMV_E_METADATA_BUFFER_ADDR_V6 0xfa40 26862306a36Sopenharmony_ci#define S5P_FIMV_E_METADATA_BUFFER_SIZE_V6 0xfa44 26962306a36Sopenharmony_ci#define S5P_FIMV_E_STREAM_SIZE_V6 0xfa80 27062306a36Sopenharmony_ci#define S5P_FIMV_E_SLICE_TYPE_V6 0xfa84 27162306a36Sopenharmony_ci#define S5P_FIMV_E_PICTURE_COUNT_V6 0xfa88 27262306a36Sopenharmony_ci#define S5P_FIMV_E_RET_PICTURE_TAG_V6 0xfa8c 27362306a36Sopenharmony_ci#define S5P_FIMV_E_STREAM_BUFFER_WRITE_POINTER_V6 0xfa90 27462306a36Sopenharmony_ci 27562306a36Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_LUMA_ADDR_V6 0xfa94 27662306a36Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_CHROMA_ADDR_V6 0xfa98 27762306a36Sopenharmony_ci#define S5P_FIMV_E_RECON_LUMA_DPB_ADDR_V6 0xfa9c 27862306a36Sopenharmony_ci#define S5P_FIMV_E_RECON_CHROMA_DPB_ADDR_V6 0xfaa0 27962306a36Sopenharmony_ci#define S5P_FIMV_E_METADATA_ADDR_ENC_SLICE_V6 0xfaa4 28062306a36Sopenharmony_ci#define S5P_FIMV_E_METADATA_SIZE_ENC_SLICE_V6 0xfaa8 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ci#define S5P_FIMV_E_MPEG4_OPTIONS_V6 0xfb10 28362306a36Sopenharmony_ci#define S5P_FIMV_E_MPEG4_HEC_PERIOD_V6 0xfb14 28462306a36Sopenharmony_ci#define S5P_FIMV_E_ASPECT_RATIO_V6 0xfb50 28562306a36Sopenharmony_ci#define S5P_FIMV_E_EXTENDED_SAR_V6 0xfb54 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_ci#define S5P_FIMV_E_H264_OPTIONS_V6 0xfb58 28862306a36Sopenharmony_ci#define S5P_FIMV_E_H264_LF_ALPHA_OFFSET_V6 0xfb5c 28962306a36Sopenharmony_ci#define S5P_FIMV_E_H264_LF_BETA_OFFSET_V6 0xfb60 29062306a36Sopenharmony_ci#define S5P_FIMV_E_H264_I_PERIOD_V6 0xfb64 29162306a36Sopenharmony_ci 29262306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_SLICE_GRP_MAP_TYPE_V6 0xfb68 29362306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_NUM_SLICE_GRP_MINUS1_V6 0xfb6c 29462306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_SLICE_GRP_CHANGE_DIR_V6 0xfb70 29562306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_SLICE_GRP_CHANGE_RATE_MINUS1_V6 0xfb74 29662306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_0_V6 0xfb78 29762306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_1_V6 0xfb7c 29862306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_2_V6 0xfb80 29962306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_3_V6 0xfb84 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_0_V6 0xfb88 30262306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_1_V6 0xfb8c 30362306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_2_V6 0xfb90 30462306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_3_V6 0xfb94 30562306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_4_V6 0xfb98 30662306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_5_V6 0xfb9c 30762306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_6_V6 0xfba0 30862306a36Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_7_V6 0xfba4 30962306a36Sopenharmony_ci 31062306a36Sopenharmony_ci#define S5P_FIMV_E_H264_CHROMA_QP_OFFSET_V6 0xfba8 31162306a36Sopenharmony_ci#define S5P_FIMV_E_H264_NUM_T_LAYER_V6 0xfbac 31262306a36Sopenharmony_ci 31362306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER0_V6 0xfbb0 31462306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER1_V6 0xfbb4 31562306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER2_V6 0xfbb8 31662306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER3_V6 0xfbbc 31762306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER4_V6 0xfbc0 31862306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER5_V6 0xfbc4 31962306a36Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER6_V6 0xfbc8 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci#define S5P_FIMV_E_H264_FRAME_PACKING_SEI_INFO_V6 0xfc4c 32262306a36Sopenharmony_ci#define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE_V6 0 32362306a36Sopenharmony_ci#define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_TOP_BOTTOM_V6 1 32462306a36Sopenharmony_ci#define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_TEMPORAL_V6 2 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_ci#define S5P_FIMV_E_MVC_FRAME_QP_VIEW1_V6 0xfd40 32762306a36Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_FRAME_RATE_VIEW1_V6 0xfd44 32862306a36Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_BIT_RATE_VIEW1_V6 0xfd48 32962306a36Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_QBOUND_VIEW1_V6 0xfd4c 33062306a36Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_RPARA_VIEW1_V6 0xfd50 33162306a36Sopenharmony_ci#define S5P_FIMV_E_MVC_INTER_VIEW_PREDICTION_ON_V6 0xfd80 33262306a36Sopenharmony_ci 33362306a36Sopenharmony_ci/* Codec numbers */ 33462306a36Sopenharmony_ci#define S5P_FIMV_CODEC_NONE_V6 -1 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_ci#define S5P_FIMV_CODEC_H264_DEC_V6 0 33862306a36Sopenharmony_ci#define S5P_FIMV_CODEC_H264_MVC_DEC_V6 1 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci#define S5P_FIMV_CODEC_MPEG4_DEC_V6 3 34162306a36Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV1_DEC_V6 4 34262306a36Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV2_DEC_V6 5 34362306a36Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV3_DEC_V6 6 34462306a36Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV4_DEC_V6 7 34562306a36Sopenharmony_ci#define S5P_FIMV_CODEC_H263_DEC_V6 8 34662306a36Sopenharmony_ci#define S5P_FIMV_CODEC_VC1RCV_DEC_V6 9 34762306a36Sopenharmony_ci#define S5P_FIMV_CODEC_VC1_DEC_V6 10 34862306a36Sopenharmony_ci/* FIXME: Add 11~12 */ 34962306a36Sopenharmony_ci#define S5P_FIMV_CODEC_MPEG2_DEC_V6 13 35062306a36Sopenharmony_ci#define S5P_FIMV_CODEC_VP8_DEC_V6 14 35162306a36Sopenharmony_ci/* FIXME: Add 15~16 */ 35262306a36Sopenharmony_ci#define S5P_FIMV_CODEC_H264_ENC_V6 20 35362306a36Sopenharmony_ci#define S5P_FIMV_CODEC_H264_MVC_ENC_V6 21 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_ci#define S5P_FIMV_CODEC_MPEG4_ENC_V6 23 35662306a36Sopenharmony_ci#define S5P_FIMV_CODEC_H263_ENC_V6 24 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci#define S5P_FIMV_NV12M_HALIGN_V6 16 35962306a36Sopenharmony_ci#define S5P_FIMV_NV12MT_HALIGN_V6 16 36062306a36Sopenharmony_ci#define S5P_FIMV_NV12MT_VALIGN_V6 16 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci#define S5P_FIMV_TMV_BUFFER_ALIGN_V6 16 36362306a36Sopenharmony_ci#define S5P_FIMV_LUMA_DPB_BUFFER_ALIGN_V6 256 36462306a36Sopenharmony_ci#define S5P_FIMV_CHROMA_DPB_BUFFER_ALIGN_V6 256 36562306a36Sopenharmony_ci#define S5P_FIMV_ME_BUFFER_ALIGN_V6 256 36662306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUFFER_ALIGN_V6 256 36762306a36Sopenharmony_ci 36862306a36Sopenharmony_ci#define S5P_FIMV_LUMA_MB_TO_PIXEL_V6 256 36962306a36Sopenharmony_ci#define S5P_FIMV_CHROMA_MB_TO_PIXEL_V6 128 37062306a36Sopenharmony_ci#define S5P_FIMV_NUM_TMV_BUFFERS_V6 2 37162306a36Sopenharmony_ci 37262306a36Sopenharmony_ci#define S5P_FIMV_MAX_FRAME_SIZE_V6 (2 * SZ_1M) 37362306a36Sopenharmony_ci#define S5P_FIMV_NUM_PIXELS_IN_MB_ROW_V6 16 37462306a36Sopenharmony_ci#define S5P_FIMV_NUM_PIXELS_IN_MB_COL_V6 16 37562306a36Sopenharmony_ci 37662306a36Sopenharmony_ci/* Buffer size requirements defined by hardware */ 37762306a36Sopenharmony_ci#define S5P_FIMV_TMV_BUFFER_SIZE_V6(w, h) (((w) + 1) * ((h) + 3) * 8) 37862306a36Sopenharmony_ci#define S5P_FIMV_ME_BUFFER_SIZE_V6(imw, imh, mbw, mbh) \ 37962306a36Sopenharmony_ci (((((imw + 127) / 64) * 16) * DIV_ROUND_UP(imh, 64) * 256) + \ 38062306a36Sopenharmony_ci (DIV_ROUND_UP((mbw) * (mbh), 32) * 16)) 38162306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_H264_DEC_V6(w, h) (((w) * 192) + 64) 38262306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V6(w, h) \ 38362306a36Sopenharmony_ci ((w) * 144 + 8192 * (h) + 49216 + 1048576) 38462306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_VC1_DEC_V6(w, h) \ 38562306a36Sopenharmony_ci (2096 * ((w) + (h) + 1)) 38662306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_H263_DEC_V6(w, h) \ 38762306a36Sopenharmony_ci S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V6(w, h) 38862306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_VP8_DEC_V6(w, h) \ 38962306a36Sopenharmony_ci ((w) * 32 + (h) * 128 + (((w) + 1) / 2) * 64 + 2112) 39062306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_H264_ENC_V6(w, h) \ 39162306a36Sopenharmony_ci (((w) * 64) + (((w) + 1) * 16) + (4096 * 16)) 39262306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_ENC_V6(w, h) \ 39362306a36Sopenharmony_ci (((w) * 16) + (((w) + 1) * 16)) 39462306a36Sopenharmony_ci 39562306a36Sopenharmony_ci/* MFC Context buffer sizes */ 39662306a36Sopenharmony_ci#define MFC_CTX_BUF_SIZE_V6 (28 * SZ_1K) /* 28KB */ 39762306a36Sopenharmony_ci#define MFC_H264_DEC_CTX_BUF_SIZE_V6 (2 * SZ_1M) /* 2MB */ 39862306a36Sopenharmony_ci#define MFC_OTHER_DEC_CTX_BUF_SIZE_V6 (20 * SZ_1K) /* 20KB */ 39962306a36Sopenharmony_ci#define MFC_H264_ENC_CTX_BUF_SIZE_V6 (100 * SZ_1K) /* 100KB */ 40062306a36Sopenharmony_ci#define MFC_OTHER_ENC_CTX_BUF_SIZE_V6 (12 * SZ_1K) /* 12KB */ 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_ci/* MFCv6 variant defines */ 40362306a36Sopenharmony_ci#define MAX_FW_SIZE_V6 (SZ_512K) /* 512KB */ 40462306a36Sopenharmony_ci#define MAX_CPB_SIZE_V6 (3 * SZ_1M) /* 3MB */ 40562306a36Sopenharmony_ci#define MFC_VERSION_V6 0x61 40662306a36Sopenharmony_ci#define MFC_NUM_PORTS_V6 1 40762306a36Sopenharmony_ci 40862306a36Sopenharmony_ci#endif /* _REGS_FIMV_V6_H */ 409