18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Register definition file for Samsung MFC V7.x Interface (FIMV) driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2013 Samsung Electronics Co., Ltd. 68c2ecf20Sopenharmony_ci * http://www.samsung.com/ 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef _REGS_MFC_V7_H 108c2ecf20Sopenharmony_ci#define _REGS_MFC_V7_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include "regs-mfc-v6.h" 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/* Additional features of v7 */ 158c2ecf20Sopenharmony_ci#define S5P_FIMV_CODEC_VP8_ENC_V7 25 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* Additional registers for v7 */ 188c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_FIRST_ADDR_V7 0xf9e0 198c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_SECOND_ADDR_V7 0xf9e4 208c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_THIRD_ADDR_V7 0xf9e8 218c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_FIRST_STRIDE_V7 0xf9ec 228c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_SECOND_STRIDE_V7 0xf9f0 238c2ecf20Sopenharmony_ci#define S5P_FIMV_E_SOURCE_THIRD_STRIDE_V7 0xf9f4 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_FIRST_ADDR_V7 0xfa70 268c2ecf20Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_SECOND_ADDR_V7 0xfa74 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define S5P_FIMV_E_VP8_OPTIONS_V7 0xfdb0 298c2ecf20Sopenharmony_ci#define S5P_FIMV_E_VP8_FILTER_OPTIONS_V7 0xfdb4 308c2ecf20Sopenharmony_ci#define S5P_FIMV_E_VP8_GOLDEN_FRAME_OPTION_V7 0xfdb8 318c2ecf20Sopenharmony_ci#define S5P_FIMV_E_VP8_NUM_T_LAYER_V7 0xfdc4 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* MFCv7 variant defines */ 348c2ecf20Sopenharmony_ci#define MAX_FW_SIZE_V7 (SZ_512K) /* 512KB */ 358c2ecf20Sopenharmony_ci#define MAX_CPB_SIZE_V7 (3 * SZ_1M) /* 3MB */ 368c2ecf20Sopenharmony_ci#define MFC_VERSION_V7 0x72 378c2ecf20Sopenharmony_ci#define MFC_NUM_PORTS_V7 1 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define MFC_LUMA_PAD_BYTES_V7 256 408c2ecf20Sopenharmony_ci#define MFC_CHROMA_PAD_BYTES_V7 128 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci/* MFCv7 Context buffer sizes */ 438c2ecf20Sopenharmony_ci#define MFC_CTX_BUF_SIZE_V7 (30 * SZ_1K) /* 30KB */ 448c2ecf20Sopenharmony_ci#define MFC_H264_DEC_CTX_BUF_SIZE_V7 (2 * SZ_1M) /* 2MB */ 458c2ecf20Sopenharmony_ci#define MFC_OTHER_DEC_CTX_BUF_SIZE_V7 (20 * SZ_1K) /* 20KB */ 468c2ecf20Sopenharmony_ci#define MFC_H264_ENC_CTX_BUF_SIZE_V7 (100 * SZ_1K) /* 100KB */ 478c2ecf20Sopenharmony_ci#define MFC_OTHER_ENC_CTX_BUF_SIZE_V7 (10 * SZ_1K) /* 10KB */ 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* Buffer size defines */ 508c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V7(w, h) \ 518c2ecf20Sopenharmony_ci (SZ_1M + ((w) * 144) + (8192 * (h)) + 49216) 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_VP8_ENC_V7(w, h) \ 548c2ecf20Sopenharmony_ci (((w) * 48) + 8192 + ((((w) + 1) / 2) * 128) + 144 + \ 558c2ecf20Sopenharmony_ci ((((((w) * 16) * ((h) * 16)) * 3) / 2) * 4)) 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /*_REGS_MFC_V7_H*/ 58