18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Register definition file for Samsung MFC V6.x Interface (FIMV) driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2012 Samsung Electronics Co., Ltd. 68c2ecf20Sopenharmony_ci * http://www.samsung.com/ 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef _REGS_FIMV_V6_H 108c2ecf20Sopenharmony_ci#define _REGS_FIMV_V6_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/kernel.h> 138c2ecf20Sopenharmony_ci#include <linux/sizes.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define S5P_FIMV_REG_SIZE_V6 (S5P_FIMV_END_ADDR - S5P_FIMV_START_ADDR) 168c2ecf20Sopenharmony_ci#define S5P_FIMV_REG_COUNT_V6 ((S5P_FIMV_END_ADDR - S5P_FIMV_START_ADDR) / 4) 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* Number of bits that the buffer address should be shifted for particular 198c2ecf20Sopenharmony_ci * MFC buffers. */ 208c2ecf20Sopenharmony_ci#define S5P_FIMV_MEM_OFFSET_V6 0 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define S5P_FIMV_START_ADDR_V6 0x0000 238c2ecf20Sopenharmony_ci#define S5P_FIMV_END_ADDR_V6 0xfd80 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define S5P_FIMV_REG_CLEAR_BEGIN_V6 0xf000 268c2ecf20Sopenharmony_ci#define S5P_FIMV_REG_CLEAR_COUNT_V6 1024 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* Codec Common Registers */ 298c2ecf20Sopenharmony_ci#define S5P_FIMV_RISC_ON_V6 0x0000 308c2ecf20Sopenharmony_ci#define S5P_FIMV_RISC2HOST_INT_V6 0x003C 318c2ecf20Sopenharmony_ci#define S5P_FIMV_HOST2RISC_INT_V6 0x0044 328c2ecf20Sopenharmony_ci#define S5P_FIMV_RISC_BASE_ADDRESS_V6 0x0054 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#define S5P_FIMV_MFC_RESET_V6 0x1070 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define S5P_FIMV_HOST2RISC_CMD_V6 0x1100 378c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_EMPTY_V6 0 388c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_SYS_INIT_V6 1 398c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6 2 408c2ecf20Sopenharmony_ci#define S5P_FIMV_CH_SEQ_HEADER_V6 3 418c2ecf20Sopenharmony_ci#define S5P_FIMV_CH_INIT_BUFS_V6 4 428c2ecf20Sopenharmony_ci#define S5P_FIMV_CH_FRAME_START_V6 5 438c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6 6 448c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_SLEEP_V6 7 458c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_WAKEUP_V6 8 468c2ecf20Sopenharmony_ci#define S5P_FIMV_CH_LAST_FRAME_V6 9 478c2ecf20Sopenharmony_ci#define S5P_FIMV_H2R_CMD_FLUSH_V6 10 488c2ecf20Sopenharmony_ci/* RMVME: REALLOC used? */ 498c2ecf20Sopenharmony_ci#define S5P_FIMV_CH_FRAME_START_REALLOC_V6 5 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define S5P_FIMV_RISC2HOST_CMD_V6 0x1104 528c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_EMPTY_V6 0 538c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SYS_INIT_RET_V6 1 548c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_OPEN_INSTANCE_RET_V6 2 558c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SEQ_DONE_RET_V6 3 568c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_INIT_BUFFERS_RET_V6 4 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_CLOSE_INSTANCE_RET_V6 6 598c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SLEEP_RET_V6 7 608c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_WAKEUP_RET_V6 8 618c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_COMPLETE_SEQ_RET_V6 9 628c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_DPB_FLUSH_RET_V6 10 638c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_NAL_ABORT_RET_V6 11 648c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_FW_STATUS_RET_V6 12 658c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_FRAME_DONE_RET_V6 13 668c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_FIELD_DONE_RET_V6 14 678c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_SLICE_DONE_RET_V6 15 688c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_ENC_BUFFER_FUL_RET_V6 16 698c2ecf20Sopenharmony_ci#define S5P_FIMV_R2H_CMD_ERR_RET_V6 32 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define S5P_FIMV_MFC_BUS_RESET_CTRL 0x7110 728c2ecf20Sopenharmony_ci#define S5P_FIMV_FW_VERSION_V6 0xf000 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#define S5P_FIMV_INSTANCE_ID_V6 0xf008 758c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_TYPE_V6 0xf00c 768c2ecf20Sopenharmony_ci#define S5P_FIMV_CONTEXT_MEM_ADDR_V6 0xf014 778c2ecf20Sopenharmony_ci#define S5P_FIMV_CONTEXT_MEM_SIZE_V6 0xf018 788c2ecf20Sopenharmony_ci#define S5P_FIMV_PIXEL_FORMAT_V6 0xf020 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci#define S5P_FIMV_METADATA_ENABLE_V6 0xf024 818c2ecf20Sopenharmony_ci#define S5P_FIMV_DBG_BUFFER_ADDR_V6 0xf030 828c2ecf20Sopenharmony_ci#define S5P_FIMV_DBG_BUFFER_SIZE_V6 0xf034 838c2ecf20Sopenharmony_ci#define S5P_FIMV_RET_INSTANCE_ID_V6 0xf070 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#define S5P_FIMV_ERROR_CODE_V6 0xf074 868c2ecf20Sopenharmony_ci#define S5P_FIMV_ERR_WARNINGS_START_V6 160 878c2ecf20Sopenharmony_ci#define S5P_FIMV_ERR_DEC_MASK_V6 0xffff 888c2ecf20Sopenharmony_ci#define S5P_FIMV_ERR_DEC_SHIFT_V6 0 898c2ecf20Sopenharmony_ci#define S5P_FIMV_ERR_DSPL_MASK_V6 0xffff0000 908c2ecf20Sopenharmony_ci#define S5P_FIMV_ERR_DSPL_SHIFT_V6 16 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define S5P_FIMV_DBG_BUFFER_OUTPUT_SIZE_V6 0xf078 938c2ecf20Sopenharmony_ci#define S5P_FIMV_METADATA_STATUS_V6 0xf07C 948c2ecf20Sopenharmony_ci#define S5P_FIMV_METADATA_ADDR_MB_INFO_V6 0xf080 958c2ecf20Sopenharmony_ci#define S5P_FIMV_METADATA_SIZE_MB_INFO_V6 0xf084 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci/* Decoder Registers */ 988c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CRC_CTRL_V6 0xf0b0 998c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DEC_OPTIONS_V6 0xf0b4 1008c2ecf20Sopenharmony_ci#define S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6 4 1018c2ecf20Sopenharmony_ci#define S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6 3 1028c2ecf20Sopenharmony_ci#define S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6 1 1038c2ecf20Sopenharmony_ci#define S5P_FIMV_D_OPT_LF_CTRL_MASK_V6 0x3 1048c2ecf20Sopenharmony_ci#define S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6 0 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_DELAY_V6 0xf0b8 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci#define S5P_FIMV_D_SET_FRAME_WIDTH_V6 0xf0bc 1098c2ecf20Sopenharmony_ci#define S5P_FIMV_D_SET_FRAME_HEIGHT_V6 0xf0c0 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#define S5P_FIMV_D_SEI_ENABLE_V6 0xf0c4 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci/* Buffer setting registers */ 1148c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MIN_NUM_DPB_V6 0xf0f0 1158c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MIN_LUMA_DPB_SIZE_V6 0xf0f4 1168c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MIN_CHROMA_DPB_SIZE_V6 0xf0f8 1178c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MVC_NUM_VIEWS_V6 0xf0fc 1188c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MIN_NUM_MV_V6 0xf100 1198c2ecf20Sopenharmony_ci#define S5P_FIMV_D_NUM_DPB_V6 0xf130 1208c2ecf20Sopenharmony_ci#define S5P_FIMV_D_LUMA_DPB_SIZE_V6 0xf134 1218c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CHROMA_DPB_SIZE_V6 0xf138 1228c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MV_BUFFER_SIZE_V6 0xf13c 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci#define S5P_FIMV_D_LUMA_DPB_V6 0xf140 1258c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CHROMA_DPB_V6 0xf240 1268c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MV_BUFFER_V6 0xf340 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci#define S5P_FIMV_D_SCRATCH_BUFFER_ADDR_V6 0xf440 1298c2ecf20Sopenharmony_ci#define S5P_FIMV_D_SCRATCH_BUFFER_SIZE_V6 0xf444 1308c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_BUFFER_ADDR_V6 0xf448 1318c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_BUFFER_SIZE_V6 0xf44c 1328c2ecf20Sopenharmony_ci#define S5P_FIMV_D_NUM_MV_V6 0xf478 1338c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CPB_BUFFER_ADDR_V6 0xf4b0 1348c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CPB_BUFFER_SIZE_V6 0xf4b4 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci#define S5P_FIMV_D_AVAILABLE_DPB_FLAG_UPPER_V6 0xf4b8 1378c2ecf20Sopenharmony_ci#define S5P_FIMV_D_AVAILABLE_DPB_FLAG_LOWER_V6 0xf4bc 1388c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CPB_BUFFER_OFFSET_V6 0xf4c0 1398c2ecf20Sopenharmony_ci#define S5P_FIMV_D_SLICE_IF_ENABLE_V6 0xf4c4 1408c2ecf20Sopenharmony_ci#define S5P_FIMV_D_PICTURE_TAG_V6 0xf4c8 1418c2ecf20Sopenharmony_ci#define S5P_FIMV_D_STREAM_DATA_SIZE_V6 0xf4d0 1428c2ecf20Sopenharmony_ci#define S5P_FIMV_D_INIT_BUFFER_OPTIONS_V6 0xf47c 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/* Display information register */ 1458c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_FRAME_WIDTH_V6 0xf500 1468c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_FRAME_HEIGHT_V6 0xf504 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci/* Display status */ 1498c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_STATUS_V6 0xf508 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_LUMA_ADDR_V6 0xf50c 1528c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CHROMA_ADDR_V6 0xf510 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_FRAME_TYPE_V6 0xf514 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CROP_INFO1_V6 0xf518 1578c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CROP_INFO2_V6 0xf51c 1588c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_PICTURE_PROFILE_V6 0xf520 1598c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_LUMA_CRC_TOP_V6 0xf524 1608c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CHROMA_CRC_TOP_V6 0xf528 1618c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_LUMA_CRC_BOT_V6 0xf52c 1628c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_CHROMA_CRC_BOT_V6 0xf530 1638c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_ASPECT_RATIO_V6 0xf534 1648c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DISPLAY_EXTENDED_AR_V6 0xf538 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci/* Decoded picture information register */ 1678c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_FRAME_WIDTH_V6 0xf53c 1688c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_FRAME_HEIGHT_V6 0xf540 1698c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_STATUS_V6 0xf544 1708c2ecf20Sopenharmony_ci#define S5P_FIMV_DEC_CRC_GEN_MASK_V6 0x1 1718c2ecf20Sopenharmony_ci#define S5P_FIMV_DEC_CRC_GEN_SHIFT_V6 6 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_LUMA_ADDR_V6 0xf548 1748c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_CHROMA_ADDR_V6 0xf54c 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_FRAME_TYPE_V6 0xf550 1778c2ecf20Sopenharmony_ci#define S5P_FIMV_DECODE_FRAME_MASK_V6 7 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_CROP_INFO1_V6 0xf554 1808c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_CROP_INFO2_V6 0xf558 1818c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_PICTURE_PROFILE_V6 0xf55c 1828c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_NAL_SIZE_V6 0xf560 1838c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_LUMA_CRC_TOP_V6 0xf564 1848c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_CHROMA_CRC_TOP_V6 0xf568 1858c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_LUMA_CRC_BOT_V6 0xf56c 1868c2ecf20Sopenharmony_ci#define S5P_FIMV_D_DECODED_CHROMA_CRC_BOT_V6 0xf570 1878c2ecf20Sopenharmony_ci 1888c2ecf20Sopenharmony_ci/* Returned value register for specific setting */ 1898c2ecf20Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V6 0xf574 1908c2ecf20Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V6 0xf578 1918c2ecf20Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TIME_TOP_V6 0xf57c 1928c2ecf20Sopenharmony_ci#define S5P_FIMV_D_RET_PICTURE_TIME_BOT_V6 0xf580 1938c2ecf20Sopenharmony_ci#define S5P_FIMV_D_CHROMA_FORMAT_V6 0xf588 1948c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MPEG4_INFO_V6 0xf58c 1958c2ecf20Sopenharmony_ci#define S5P_FIMV_D_H264_INFO_V6 0xf590 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_CONCEALED_MB_V6 0xf594 1988c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_CONCEALED_MB_V6 0xf598 1998c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_VC1_PARAM_V6 0xf59c 2008c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_VC1_PARAM_V6 0xf5a0 2018c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_SEI_NAL_V6 0xf5a4 2028c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_SEI_NAL_V6 0xf5a8 2038c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_ADDR_VUI_V6 0xf5ac 2048c2ecf20Sopenharmony_ci#define S5P_FIMV_D_METADATA_SIZE_VUI_V6 0xf5b0 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci#define S5P_FIMV_D_MVC_VIEW_ID_V6 0xf5b4 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ci/* SEI related information */ 2098c2ecf20Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V6 0xf5f0 2108c2ecf20Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_ARRGMENT_ID_V6 0xf5f4 2118c2ecf20Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_SEI_INFO_V6 0xf5f8 2128c2ecf20Sopenharmony_ci#define S5P_FIMV_D_FRAME_PACK_GRID_POS_V6 0xf5fc 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci/* Encoder Registers */ 2158c2ecf20Sopenharmony_ci#define S5P_FIMV_E_FRAME_WIDTH_V6 0xf770 2168c2ecf20Sopenharmony_ci#define S5P_FIMV_E_FRAME_HEIGHT_V6 0xf774 2178c2ecf20Sopenharmony_ci#define S5P_FIMV_E_CROPPED_FRAME_WIDTH_V6 0xf778 2188c2ecf20Sopenharmony_ci#define S5P_FIMV_E_CROPPED_FRAME_HEIGHT_V6 0xf77c 2198c2ecf20Sopenharmony_ci#define S5P_FIMV_E_FRAME_CROP_OFFSET_V6 0xf780 2208c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ENC_OPTIONS_V6 0xf784 2218c2ecf20Sopenharmony_ci#define S5P_FIMV_E_PICTURE_PROFILE_V6 0xf788 2228c2ecf20Sopenharmony_ci#define S5P_FIMV_E_FIXED_PICTURE_QP_V6 0xf790 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_CONFIG_V6 0xf794 2258c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_QP_BOUND_V6 0xf798 2268c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_RPARAM_V6 0xf79c 2278c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MB_RC_CONFIG_V6 0xf7a0 2288c2ecf20Sopenharmony_ci#define S5P_FIMV_E_PADDING_CTRL_V6 0xf7a4 2298c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MV_HOR_RANGE_V6 0xf7ac 2308c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MV_VER_RANGE_V6 0xf7b0 2318c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MV_RANGE_V6_MASK 0x3fff 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci#define S5P_FIMV_E_VBV_BUFFER_SIZE_V6 0xf84c 2348c2ecf20Sopenharmony_ci#define S5P_FIMV_E_VBV_INIT_DELAY_V6 0xf850 2358c2ecf20Sopenharmony_ci#define S5P_FIMV_E_NUM_DPB_V6 0xf890 2368c2ecf20Sopenharmony_ci#define S5P_FIMV_E_LUMA_DPB_V6 0xf8c0 2378c2ecf20Sopenharmony_ci#define S5P_FIMV_E_CHROMA_DPB_V6 0xf904 2388c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ME_BUFFER_V6 0xf948 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SCRATCH_BUFFER_ADDR_V6 0xf98c 2418c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SCRATCH_BUFFER_SIZE_V6 0xf990 2428c2ecf20Sopenharmony_ci#define S5P_FIMV_E_TMV_BUFFER0_V6 0xf994 2438c2ecf20Sopenharmony_ci#define S5P_FIMV_E_TMV_BUFFER1_V6 0xf998 2448c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_LUMA_ADDR_V6 0xf9f0 2458c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_CHROMA_ADDR_V6 0xf9f4 2468c2ecf20Sopenharmony_ci#define S5P_FIMV_E_STREAM_BUFFER_ADDR_V6 0xf9f8 2478c2ecf20Sopenharmony_ci#define S5P_FIMV_E_STREAM_BUFFER_SIZE_V6 0xf9fc 2488c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ROI_BUFFER_ADDR_V6 0xfA00 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci#define S5P_FIMV_E_PARAM_CHANGE_V6 0xfa04 2518c2ecf20Sopenharmony_ci#define S5P_FIMV_E_IR_SIZE_V6 0xfa08 2528c2ecf20Sopenharmony_ci#define S5P_FIMV_E_GOP_CONFIG_V6 0xfa0c 2538c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MSLICE_MODE_V6 0xfa10 2548c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MSLICE_SIZE_MB_V6 0xfa14 2558c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MSLICE_SIZE_BITS_V6 0xfa18 2568c2ecf20Sopenharmony_ci#define S5P_FIMV_E_FRAME_INSERTION_V6 0xfa1c 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_FRAME_RATE_V6 0xfa20 2598c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_BIT_RATE_V6 0xfa24 2608c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_QP_OFFSET_V6 0xfa28 2618c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RC_ROI_CTRL_V6 0xfa2c 2628c2ecf20Sopenharmony_ci#define S5P_FIMV_E_PICTURE_TAG_V6 0xfa30 2638c2ecf20Sopenharmony_ci#define S5P_FIMV_E_BIT_COUNT_ENABLE_V6 0xfa34 2648c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MAX_BIT_COUNT_V6 0xfa38 2658c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MIN_BIT_COUNT_V6 0xfa3c 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci#define S5P_FIMV_E_METADATA_BUFFER_ADDR_V6 0xfa40 2688c2ecf20Sopenharmony_ci#define S5P_FIMV_E_METADATA_BUFFER_SIZE_V6 0xfa44 2698c2ecf20Sopenharmony_ci#define S5P_FIMV_E_STREAM_SIZE_V6 0xfa80 2708c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SLICE_TYPE_V6 0xfa84 2718c2ecf20Sopenharmony_ci#define S5P_FIMV_E_PICTURE_COUNT_V6 0xfa88 2728c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RET_PICTURE_TAG_V6 0xfa8c 2738c2ecf20Sopenharmony_ci#define S5P_FIMV_E_STREAM_BUFFER_WRITE_POINTER_V6 0xfa90 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_LUMA_ADDR_V6 0xfa94 2768c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_CHROMA_ADDR_V6 0xfa98 2778c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RECON_LUMA_DPB_ADDR_V6 0xfa9c 2788c2ecf20Sopenharmony_ci#define S5P_FIMV_E_RECON_CHROMA_DPB_ADDR_V6 0xfaa0 2798c2ecf20Sopenharmony_ci#define S5P_FIMV_E_METADATA_ADDR_ENC_SLICE_V6 0xfaa4 2808c2ecf20Sopenharmony_ci#define S5P_FIMV_E_METADATA_SIZE_ENC_SLICE_V6 0xfaa8 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MPEG4_OPTIONS_V6 0xfb10 2838c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MPEG4_HEC_PERIOD_V6 0xfb14 2848c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ASPECT_RATIO_V6 0xfb50 2858c2ecf20Sopenharmony_ci#define S5P_FIMV_E_EXTENDED_SAR_V6 0xfb54 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_OPTIONS_V6 0xfb58 2888c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_LF_ALPHA_OFFSET_V6 0xfb5c 2898c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_LF_BETA_OFFSET_V6 0xfb60 2908c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_I_PERIOD_V6 0xfb64 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_SLICE_GRP_MAP_TYPE_V6 0xfb68 2938c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_NUM_SLICE_GRP_MINUS1_V6 0xfb6c 2948c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_SLICE_GRP_CHANGE_DIR_V6 0xfb70 2958c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_SLICE_GRP_CHANGE_RATE_MINUS1_V6 0xfb74 2968c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_0_V6 0xfb78 2978c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_1_V6 0xfb7c 2988c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_2_V6 0xfb80 2998c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_3_V6 0xfb84 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_0_V6 0xfb88 3028c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_1_V6 0xfb8c 3038c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_2_V6 0xfb90 3048c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_3_V6 0xfb94 3058c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_4_V6 0xfb98 3068c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_5_V6 0xfb9c 3078c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_6_V6 0xfba0 3088c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_ASO_SLICE_ORDER_7_V6 0xfba4 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_CHROMA_QP_OFFSET_V6 0xfba8 3118c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_NUM_T_LAYER_V6 0xfbac 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER0_V6 0xfbb0 3148c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER1_V6 0xfbb4 3158c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER2_V6 0xfbb8 3168c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER3_V6 0xfbbc 3178c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER4_V6 0xfbc0 3188c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER5_V6 0xfbc4 3198c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER6_V6 0xfbc8 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci#define S5P_FIMV_E_H264_FRAME_PACKING_SEI_INFO_V6 0xfc4c 3228c2ecf20Sopenharmony_ci#define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE_V6 0 3238c2ecf20Sopenharmony_ci#define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_TOP_BOTTOM_V6 1 3248c2ecf20Sopenharmony_ci#define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_TEMPORAL_V6 2 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MVC_FRAME_QP_VIEW1_V6 0xfd40 3278c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_FRAME_RATE_VIEW1_V6 0xfd44 3288c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_BIT_RATE_VIEW1_V6 0xfd48 3298c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_QBOUND_VIEW1_V6 0xfd4c 3308c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MVC_RC_RPARA_VIEW1_V6 0xfd50 3318c2ecf20Sopenharmony_ci#define S5P_FIMV_E_MVC_INTER_VIEW_PREDICTION_ON_V6 0xfd80 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci/* Codec numbers */ 3348c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_NONE_V6 -1 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_H264_DEC_V6 0 3388c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_H264_MVC_DEC_V6 1 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_MPEG4_DEC_V6 3 3418c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV1_DEC_V6 4 3428c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV2_DEC_V6 5 3438c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV3_DEC_V6 6 3448c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_FIMV4_DEC_V6 7 3458c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_H263_DEC_V6 8 3468c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_VC1RCV_DEC_V6 9 3478c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_VC1_DEC_V6 10 3488c2ecf20Sopenharmony_ci/* FIXME: Add 11~12 */ 3498c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_MPEG2_DEC_V6 13 3508c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_VP8_DEC_V6 14 3518c2ecf20Sopenharmony_ci/* FIXME: Add 15~16 */ 3528c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_H264_ENC_V6 20 3538c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_H264_MVC_ENC_V6 21 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_MPEG4_ENC_V6 23 3568c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_H263_ENC_V6 24 3578c2ecf20Sopenharmony_ci 3588c2ecf20Sopenharmony_ci#define S5P_FIMV_NV12M_HALIGN_V6 16 3598c2ecf20Sopenharmony_ci#define S5P_FIMV_NV12MT_HALIGN_V6 16 3608c2ecf20Sopenharmony_ci#define S5P_FIMV_NV12MT_VALIGN_V6 16 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_ci#define S5P_FIMV_TMV_BUFFER_ALIGN_V6 16 3638c2ecf20Sopenharmony_ci#define S5P_FIMV_LUMA_DPB_BUFFER_ALIGN_V6 256 3648c2ecf20Sopenharmony_ci#define S5P_FIMV_CHROMA_DPB_BUFFER_ALIGN_V6 256 3658c2ecf20Sopenharmony_ci#define S5P_FIMV_ME_BUFFER_ALIGN_V6 256 3668c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUFFER_ALIGN_V6 256 3678c2ecf20Sopenharmony_ci 3688c2ecf20Sopenharmony_ci#define S5P_FIMV_LUMA_MB_TO_PIXEL_V6 256 3698c2ecf20Sopenharmony_ci#define S5P_FIMV_CHROMA_MB_TO_PIXEL_V6 128 3708c2ecf20Sopenharmony_ci#define S5P_FIMV_NUM_TMV_BUFFERS_V6 2 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_ci#define S5P_FIMV_MAX_FRAME_SIZE_V6 (2 * SZ_1M) 3738c2ecf20Sopenharmony_ci#define S5P_FIMV_NUM_PIXELS_IN_MB_ROW_V6 16 3748c2ecf20Sopenharmony_ci#define S5P_FIMV_NUM_PIXELS_IN_MB_COL_V6 16 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci/* Buffer size requirements defined by hardware */ 3778c2ecf20Sopenharmony_ci#define S5P_FIMV_TMV_BUFFER_SIZE_V6(w, h) (((w) + 1) * ((h) + 3) * 8) 3788c2ecf20Sopenharmony_ci#define S5P_FIMV_ME_BUFFER_SIZE_V6(imw, imh, mbw, mbh) \ 3798c2ecf20Sopenharmony_ci (((((imw + 127) / 64) * 16) * DIV_ROUND_UP(imh, 64) * 256) + \ 3808c2ecf20Sopenharmony_ci (DIV_ROUND_UP((mbw) * (mbh), 32) * 16)) 3818c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_H264_DEC_V6(w, h) (((w) * 192) + 64) 3828c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V6(w, h) \ 3838c2ecf20Sopenharmony_ci ((w) * 144 + 8192 * (h) + 49216 + 1048576) 3848c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_VC1_DEC_V6(w, h) \ 3858c2ecf20Sopenharmony_ci (2096 * ((w) + (h) + 1)) 3868c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_H263_DEC_V6(w, h) \ 3878c2ecf20Sopenharmony_ci S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V6(w, h) 3888c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_VP8_DEC_V6(w, h) \ 3898c2ecf20Sopenharmony_ci ((w) * 32 + (h) * 128 + (((w) + 1) / 2) * 64 + 2112) 3908c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_H264_ENC_V6(w, h) \ 3918c2ecf20Sopenharmony_ci (((w) * 64) + (((w) + 1) * 16) + (4096 * 16)) 3928c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_ENC_V6(w, h) \ 3938c2ecf20Sopenharmony_ci (((w) * 16) + (((w) + 1) * 16)) 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ci/* MFC Context buffer sizes */ 3968c2ecf20Sopenharmony_ci#define MFC_CTX_BUF_SIZE_V6 (28 * SZ_1K) /* 28KB */ 3978c2ecf20Sopenharmony_ci#define MFC_H264_DEC_CTX_BUF_SIZE_V6 (2 * SZ_1M) /* 2MB */ 3988c2ecf20Sopenharmony_ci#define MFC_OTHER_DEC_CTX_BUF_SIZE_V6 (20 * SZ_1K) /* 20KB */ 3998c2ecf20Sopenharmony_ci#define MFC_H264_ENC_CTX_BUF_SIZE_V6 (100 * SZ_1K) /* 100KB */ 4008c2ecf20Sopenharmony_ci#define MFC_OTHER_ENC_CTX_BUF_SIZE_V6 (12 * SZ_1K) /* 12KB */ 4018c2ecf20Sopenharmony_ci 4028c2ecf20Sopenharmony_ci/* MFCv6 variant defines */ 4038c2ecf20Sopenharmony_ci#define MAX_FW_SIZE_V6 (SZ_512K) /* 512KB */ 4048c2ecf20Sopenharmony_ci#define MAX_CPB_SIZE_V6 (3 * SZ_1M) /* 3MB */ 4058c2ecf20Sopenharmony_ci#define MFC_VERSION_V6 0x61 4068c2ecf20Sopenharmony_ci#define MFC_NUM_PORTS_V6 1 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_ci#endif /* _REGS_FIMV_V6_H */ 409