162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Register definition file for Samsung MFC V7.x Interface (FIMV) driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2013 Samsung Electronics Co., Ltd. 662306a36Sopenharmony_ci * http://www.samsung.com/ 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _REGS_MFC_V7_H 1062306a36Sopenharmony_ci#define _REGS_MFC_V7_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include "regs-mfc-v6.h" 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci/* Additional features of v7 */ 1562306a36Sopenharmony_ci#define S5P_FIMV_CODEC_VP8_ENC_V7 25 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci/* Additional registers for v7 */ 1862306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_FIRST_ADDR_V7 0xf9e0 1962306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_SECOND_ADDR_V7 0xf9e4 2062306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_THIRD_ADDR_V7 0xf9e8 2162306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_FIRST_STRIDE_V7 0xf9ec 2262306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_SECOND_STRIDE_V7 0xf9f0 2362306a36Sopenharmony_ci#define S5P_FIMV_E_SOURCE_THIRD_STRIDE_V7 0xf9f4 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_FIRST_ADDR_V7 0xfa70 2662306a36Sopenharmony_ci#define S5P_FIMV_E_ENCODED_SOURCE_SECOND_ADDR_V7 0xfa74 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#define S5P_FIMV_E_VP8_OPTIONS_V7 0xfdb0 2962306a36Sopenharmony_ci#define S5P_FIMV_E_VP8_FILTER_OPTIONS_V7 0xfdb4 3062306a36Sopenharmony_ci#define S5P_FIMV_E_VP8_GOLDEN_FRAME_OPTION_V7 0xfdb8 3162306a36Sopenharmony_ci#define S5P_FIMV_E_VP8_NUM_T_LAYER_V7 0xfdc4 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci/* MFCv7 variant defines */ 3462306a36Sopenharmony_ci#define MAX_FW_SIZE_V7 (SZ_512K) /* 512KB */ 3562306a36Sopenharmony_ci#define MAX_CPB_SIZE_V7 (3 * SZ_1M) /* 3MB */ 3662306a36Sopenharmony_ci#define MFC_VERSION_V7 0x72 3762306a36Sopenharmony_ci#define MFC_NUM_PORTS_V7 1 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define MFC_LUMA_PAD_BYTES_V7 256 4062306a36Sopenharmony_ci#define MFC_CHROMA_PAD_BYTES_V7 128 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci/* MFCv7 Context buffer sizes */ 4362306a36Sopenharmony_ci#define MFC_CTX_BUF_SIZE_V7 (30 * SZ_1K) /* 30KB */ 4462306a36Sopenharmony_ci#define MFC_H264_DEC_CTX_BUF_SIZE_V7 (2 * SZ_1M) /* 2MB */ 4562306a36Sopenharmony_ci#define MFC_OTHER_DEC_CTX_BUF_SIZE_V7 (20 * SZ_1K) /* 20KB */ 4662306a36Sopenharmony_ci#define MFC_H264_ENC_CTX_BUF_SIZE_V7 (100 * SZ_1K) /* 100KB */ 4762306a36Sopenharmony_ci#define MFC_OTHER_ENC_CTX_BUF_SIZE_V7 (10 * SZ_1K) /* 10KB */ 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci/* Buffer size defines */ 5062306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V7(w, h) \ 5162306a36Sopenharmony_ci (SZ_1M + ((w) * 144) + (8192 * (h)) + 49216) 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#define S5P_FIMV_SCRATCH_BUF_SIZE_VP8_ENC_V7(w, h) \ 5462306a36Sopenharmony_ci (((w) * 48) + 8192 + ((((w) + 1) / 2) * 128) + 144 + \ 5562306a36Sopenharmony_ci ((((((w) * 16) * ((h) * 16)) * 3) / 2) * 4)) 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#endif /*_REGS_MFC_V7_H*/ 58