regs-mfc-v6.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. /*
  2. * Register definition file for Samsung MFC V6.x Interface (FIMV) driver
  3. *
  4. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  5. * http://www.samsung.com/
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef _REGS_FIMV_V6_H
  12. #define _REGS_FIMV_V6_H
  13. #include <linux/kernel.h>
  14. #include <linux/sizes.h>
  15. #define S5P_FIMV_REG_SIZE_V6 (S5P_FIMV_END_ADDR - S5P_FIMV_START_ADDR)
  16. #define S5P_FIMV_REG_COUNT_V6 ((S5P_FIMV_END_ADDR - S5P_FIMV_START_ADDR) / 4)
  17. /* Number of bits that the buffer address should be shifted for particular
  18. * MFC buffers. */
  19. #define S5P_FIMV_MEM_OFFSET_V6 0
  20. #define S5P_FIMV_START_ADDR_V6 0x0000
  21. #define S5P_FIMV_END_ADDR_V6 0xfd80
  22. #define S5P_FIMV_REG_CLEAR_BEGIN_V6 0xf000
  23. #define S5P_FIMV_REG_CLEAR_COUNT_V6 1024
  24. /* Codec Common Registers */
  25. #define S5P_FIMV_RISC_ON_V6 0x0000
  26. #define S5P_FIMV_RISC2HOST_INT_V6 0x003C
  27. #define S5P_FIMV_HOST2RISC_INT_V6 0x0044
  28. #define S5P_FIMV_RISC_BASE_ADDRESS_V6 0x0054
  29. #define S5P_FIMV_MFC_RESET_V6 0x1070
  30. #define S5P_FIMV_HOST2RISC_CMD_V6 0x1100
  31. #define S5P_FIMV_H2R_CMD_EMPTY_V6 0
  32. #define S5P_FIMV_H2R_CMD_SYS_INIT_V6 1
  33. #define S5P_FIMV_H2R_CMD_OPEN_INSTANCE_V6 2
  34. #define S5P_FIMV_CH_SEQ_HEADER_V6 3
  35. #define S5P_FIMV_CH_INIT_BUFS_V6 4
  36. #define S5P_FIMV_CH_FRAME_START_V6 5
  37. #define S5P_FIMV_H2R_CMD_CLOSE_INSTANCE_V6 6
  38. #define S5P_FIMV_H2R_CMD_SLEEP_V6 7
  39. #define S5P_FIMV_H2R_CMD_WAKEUP_V6 8
  40. #define S5P_FIMV_CH_LAST_FRAME_V6 9
  41. #define S5P_FIMV_H2R_CMD_FLUSH_V6 10
  42. /* RMVME: REALLOC used? */
  43. #define S5P_FIMV_CH_FRAME_START_REALLOC_V6 5
  44. #define S5P_FIMV_RISC2HOST_CMD_V6 0x1104
  45. #define S5P_FIMV_R2H_CMD_EMPTY_V6 0
  46. #define S5P_FIMV_R2H_CMD_SYS_INIT_RET_V6 1
  47. #define S5P_FIMV_R2H_CMD_OPEN_INSTANCE_RET_V6 2
  48. #define S5P_FIMV_R2H_CMD_SEQ_DONE_RET_V6 3
  49. #define S5P_FIMV_R2H_CMD_INIT_BUFFERS_RET_V6 4
  50. #define S5P_FIMV_R2H_CMD_CLOSE_INSTANCE_RET_V6 6
  51. #define S5P_FIMV_R2H_CMD_SLEEP_RET_V6 7
  52. #define S5P_FIMV_R2H_CMD_WAKEUP_RET_V6 8
  53. #define S5P_FIMV_R2H_CMD_COMPLETE_SEQ_RET_V6 9
  54. #define S5P_FIMV_R2H_CMD_DPB_FLUSH_RET_V6 10
  55. #define S5P_FIMV_R2H_CMD_NAL_ABORT_RET_V6 11
  56. #define S5P_FIMV_R2H_CMD_FW_STATUS_RET_V6 12
  57. #define S5P_FIMV_R2H_CMD_FRAME_DONE_RET_V6 13
  58. #define S5P_FIMV_R2H_CMD_FIELD_DONE_RET_V6 14
  59. #define S5P_FIMV_R2H_CMD_SLICE_DONE_RET_V6 15
  60. #define S5P_FIMV_R2H_CMD_ENC_BUFFER_FUL_RET_V6 16
  61. #define S5P_FIMV_R2H_CMD_ERR_RET_V6 32
  62. #define S5P_FIMV_MFC_BUS_RESET_CTRL 0x7110
  63. #define S5P_FIMV_FW_VERSION_V6 0xf000
  64. #define S5P_FIMV_INSTANCE_ID_V6 0xf008
  65. #define S5P_FIMV_CODEC_TYPE_V6 0xf00c
  66. #define S5P_FIMV_CONTEXT_MEM_ADDR_V6 0xf014
  67. #define S5P_FIMV_CONTEXT_MEM_SIZE_V6 0xf018
  68. #define S5P_FIMV_PIXEL_FORMAT_V6 0xf020
  69. #define S5P_FIMV_METADATA_ENABLE_V6 0xf024
  70. #define S5P_FIMV_DBG_BUFFER_ADDR_V6 0xf030
  71. #define S5P_FIMV_DBG_BUFFER_SIZE_V6 0xf034
  72. #define S5P_FIMV_RET_INSTANCE_ID_V6 0xf070
  73. #define S5P_FIMV_ERROR_CODE_V6 0xf074
  74. #define S5P_FIMV_ERR_WARNINGS_START_V6 160
  75. #define S5P_FIMV_ERR_DEC_MASK_V6 0xffff
  76. #define S5P_FIMV_ERR_DEC_SHIFT_V6 0
  77. #define S5P_FIMV_ERR_DSPL_MASK_V6 0xffff0000
  78. #define S5P_FIMV_ERR_DSPL_SHIFT_V6 16
  79. #define S5P_FIMV_DBG_BUFFER_OUTPUT_SIZE_V6 0xf078
  80. #define S5P_FIMV_METADATA_STATUS_V6 0xf07C
  81. #define S5P_FIMV_METADATA_ADDR_MB_INFO_V6 0xf080
  82. #define S5P_FIMV_METADATA_SIZE_MB_INFO_V6 0xf084
  83. /* Decoder Registers */
  84. #define S5P_FIMV_D_CRC_CTRL_V6 0xf0b0
  85. #define S5P_FIMV_D_DEC_OPTIONS_V6 0xf0b4
  86. #define S5P_FIMV_D_OPT_FMO_ASO_CTRL_MASK_V6 4
  87. #define S5P_FIMV_D_OPT_DDELAY_EN_SHIFT_V6 3
  88. #define S5P_FIMV_D_OPT_LF_CTRL_SHIFT_V6 1
  89. #define S5P_FIMV_D_OPT_LF_CTRL_MASK_V6 0x3
  90. #define S5P_FIMV_D_OPT_TILE_MODE_SHIFT_V6 0
  91. #define S5P_FIMV_D_DISPLAY_DELAY_V6 0xf0b8
  92. #define S5P_FIMV_D_SET_FRAME_WIDTH_V6 0xf0bc
  93. #define S5P_FIMV_D_SET_FRAME_HEIGHT_V6 0xf0c0
  94. #define S5P_FIMV_D_SEI_ENABLE_V6 0xf0c4
  95. /* Buffer setting registers */
  96. #define S5P_FIMV_D_MIN_NUM_DPB_V6 0xf0f0
  97. #define S5P_FIMV_D_MIN_LUMA_DPB_SIZE_V6 0xf0f4
  98. #define S5P_FIMV_D_MIN_CHROMA_DPB_SIZE_V6 0xf0f8
  99. #define S5P_FIMV_D_MVC_NUM_VIEWS_V6 0xf0fc
  100. #define S5P_FIMV_D_MIN_NUM_MV_V6 0xf100
  101. #define S5P_FIMV_D_NUM_DPB_V6 0xf130
  102. #define S5P_FIMV_D_LUMA_DPB_SIZE_V6 0xf134
  103. #define S5P_FIMV_D_CHROMA_DPB_SIZE_V6 0xf138
  104. #define S5P_FIMV_D_MV_BUFFER_SIZE_V6 0xf13c
  105. #define S5P_FIMV_D_LUMA_DPB_V6 0xf140
  106. #define S5P_FIMV_D_CHROMA_DPB_V6 0xf240
  107. #define S5P_FIMV_D_MV_BUFFER_V6 0xf340
  108. #define S5P_FIMV_D_SCRATCH_BUFFER_ADDR_V6 0xf440
  109. #define S5P_FIMV_D_SCRATCH_BUFFER_SIZE_V6 0xf444
  110. #define S5P_FIMV_D_METADATA_BUFFER_ADDR_V6 0xf448
  111. #define S5P_FIMV_D_METADATA_BUFFER_SIZE_V6 0xf44c
  112. #define S5P_FIMV_D_NUM_MV_V6 0xf478
  113. #define S5P_FIMV_D_CPB_BUFFER_ADDR_V6 0xf4b0
  114. #define S5P_FIMV_D_CPB_BUFFER_SIZE_V6 0xf4b4
  115. #define S5P_FIMV_D_AVAILABLE_DPB_FLAG_UPPER_V6 0xf4b8
  116. #define S5P_FIMV_D_AVAILABLE_DPB_FLAG_LOWER_V6 0xf4bc
  117. #define S5P_FIMV_D_CPB_BUFFER_OFFSET_V6 0xf4c0
  118. #define S5P_FIMV_D_SLICE_IF_ENABLE_V6 0xf4c4
  119. #define S5P_FIMV_D_PICTURE_TAG_V6 0xf4c8
  120. #define S5P_FIMV_D_STREAM_DATA_SIZE_V6 0xf4d0
  121. #define S5P_FIMV_D_INIT_BUFFER_OPTIONS_V6 0xf47c
  122. /* Display information register */
  123. #define S5P_FIMV_D_DISPLAY_FRAME_WIDTH_V6 0xf500
  124. #define S5P_FIMV_D_DISPLAY_FRAME_HEIGHT_V6 0xf504
  125. /* Display status */
  126. #define S5P_FIMV_D_DISPLAY_STATUS_V6 0xf508
  127. #define S5P_FIMV_D_DISPLAY_LUMA_ADDR_V6 0xf50c
  128. #define S5P_FIMV_D_DISPLAY_CHROMA_ADDR_V6 0xf510
  129. #define S5P_FIMV_D_DISPLAY_FRAME_TYPE_V6 0xf514
  130. #define S5P_FIMV_D_DISPLAY_CROP_INFO1_V6 0xf518
  131. #define S5P_FIMV_D_DISPLAY_CROP_INFO2_V6 0xf51c
  132. #define S5P_FIMV_D_DISPLAY_PICTURE_PROFILE_V6 0xf520
  133. #define S5P_FIMV_D_DISPLAY_LUMA_CRC_TOP_V6 0xf524
  134. #define S5P_FIMV_D_DISPLAY_CHROMA_CRC_TOP_V6 0xf528
  135. #define S5P_FIMV_D_DISPLAY_LUMA_CRC_BOT_V6 0xf52c
  136. #define S5P_FIMV_D_DISPLAY_CHROMA_CRC_BOT_V6 0xf530
  137. #define S5P_FIMV_D_DISPLAY_ASPECT_RATIO_V6 0xf534
  138. #define S5P_FIMV_D_DISPLAY_EXTENDED_AR_V6 0xf538
  139. /* Decoded picture information register */
  140. #define S5P_FIMV_D_DECODED_FRAME_WIDTH_V6 0xf53c
  141. #define S5P_FIMV_D_DECODED_FRAME_HEIGHT_V6 0xf540
  142. #define S5P_FIMV_D_DECODED_STATUS_V6 0xf544
  143. #define S5P_FIMV_DEC_CRC_GEN_MASK_V6 0x1
  144. #define S5P_FIMV_DEC_CRC_GEN_SHIFT_V6 6
  145. #define S5P_FIMV_D_DECODED_LUMA_ADDR_V6 0xf548
  146. #define S5P_FIMV_D_DECODED_CHROMA_ADDR_V6 0xf54c
  147. #define S5P_FIMV_D_DECODED_FRAME_TYPE_V6 0xf550
  148. #define S5P_FIMV_DECODE_FRAME_MASK_V6 7
  149. #define S5P_FIMV_D_DECODED_CROP_INFO1_V6 0xf554
  150. #define S5P_FIMV_D_DECODED_CROP_INFO2_V6 0xf558
  151. #define S5P_FIMV_D_DECODED_PICTURE_PROFILE_V6 0xf55c
  152. #define S5P_FIMV_D_DECODED_NAL_SIZE_V6 0xf560
  153. #define S5P_FIMV_D_DECODED_LUMA_CRC_TOP_V6 0xf564
  154. #define S5P_FIMV_D_DECODED_CHROMA_CRC_TOP_V6 0xf568
  155. #define S5P_FIMV_D_DECODED_LUMA_CRC_BOT_V6 0xf56c
  156. #define S5P_FIMV_D_DECODED_CHROMA_CRC_BOT_V6 0xf570
  157. /* Returned value register for specific setting */
  158. #define S5P_FIMV_D_RET_PICTURE_TAG_TOP_V6 0xf574
  159. #define S5P_FIMV_D_RET_PICTURE_TAG_BOT_V6 0xf578
  160. #define S5P_FIMV_D_RET_PICTURE_TIME_TOP_V6 0xf57c
  161. #define S5P_FIMV_D_RET_PICTURE_TIME_BOT_V6 0xf580
  162. #define S5P_FIMV_D_CHROMA_FORMAT_V6 0xf588
  163. #define S5P_FIMV_D_MPEG4_INFO_V6 0xf58c
  164. #define S5P_FIMV_D_H264_INFO_V6 0xf590
  165. #define S5P_FIMV_D_METADATA_ADDR_CONCEALED_MB_V6 0xf594
  166. #define S5P_FIMV_D_METADATA_SIZE_CONCEALED_MB_V6 0xf598
  167. #define S5P_FIMV_D_METADATA_ADDR_VC1_PARAM_V6 0xf59c
  168. #define S5P_FIMV_D_METADATA_SIZE_VC1_PARAM_V6 0xf5a0
  169. #define S5P_FIMV_D_METADATA_ADDR_SEI_NAL_V6 0xf5a4
  170. #define S5P_FIMV_D_METADATA_SIZE_SEI_NAL_V6 0xf5a8
  171. #define S5P_FIMV_D_METADATA_ADDR_VUI_V6 0xf5ac
  172. #define S5P_FIMV_D_METADATA_SIZE_VUI_V6 0xf5b0
  173. #define S5P_FIMV_D_MVC_VIEW_ID_V6 0xf5b4
  174. /* SEI related information */
  175. #define S5P_FIMV_D_FRAME_PACK_SEI_AVAIL_V6 0xf5f0
  176. #define S5P_FIMV_D_FRAME_PACK_ARRGMENT_ID_V6 0xf5f4
  177. #define S5P_FIMV_D_FRAME_PACK_SEI_INFO_V6 0xf5f8
  178. #define S5P_FIMV_D_FRAME_PACK_GRID_POS_V6 0xf5fc
  179. /* Encoder Registers */
  180. #define S5P_FIMV_E_FRAME_WIDTH_V6 0xf770
  181. #define S5P_FIMV_E_FRAME_HEIGHT_V6 0xf774
  182. #define S5P_FIMV_E_CROPPED_FRAME_WIDTH_V6 0xf778
  183. #define S5P_FIMV_E_CROPPED_FRAME_HEIGHT_V6 0xf77c
  184. #define S5P_FIMV_E_FRAME_CROP_OFFSET_V6 0xf780
  185. #define S5P_FIMV_E_ENC_OPTIONS_V6 0xf784
  186. #define S5P_FIMV_E_PICTURE_PROFILE_V6 0xf788
  187. #define S5P_FIMV_E_FIXED_PICTURE_QP_V6 0xf790
  188. #define S5P_FIMV_E_RC_CONFIG_V6 0xf794
  189. #define S5P_FIMV_E_RC_QP_BOUND_V6 0xf798
  190. #define S5P_FIMV_E_RC_RPARAM_V6 0xf79c
  191. #define S5P_FIMV_E_MB_RC_CONFIG_V6 0xf7a0
  192. #define S5P_FIMV_E_PADDING_CTRL_V6 0xf7a4
  193. #define S5P_FIMV_E_MV_HOR_RANGE_V6 0xf7ac
  194. #define S5P_FIMV_E_MV_VER_RANGE_V6 0xf7b0
  195. #define S5P_FIMV_E_MV_RANGE_V6_MASK 0x3fff
  196. #define S5P_FIMV_E_VBV_BUFFER_SIZE_V6 0xf84c
  197. #define S5P_FIMV_E_VBV_INIT_DELAY_V6 0xf850
  198. #define S5P_FIMV_E_NUM_DPB_V6 0xf890
  199. #define S5P_FIMV_E_LUMA_DPB_V6 0xf8c0
  200. #define S5P_FIMV_E_CHROMA_DPB_V6 0xf904
  201. #define S5P_FIMV_E_ME_BUFFER_V6 0xf948
  202. #define S5P_FIMV_E_SCRATCH_BUFFER_ADDR_V6 0xf98c
  203. #define S5P_FIMV_E_SCRATCH_BUFFER_SIZE_V6 0xf990
  204. #define S5P_FIMV_E_TMV_BUFFER0_V6 0xf994
  205. #define S5P_FIMV_E_TMV_BUFFER1_V6 0xf998
  206. #define S5P_FIMV_E_SOURCE_LUMA_ADDR_V6 0xf9f0
  207. #define S5P_FIMV_E_SOURCE_CHROMA_ADDR_V6 0xf9f4
  208. #define S5P_FIMV_E_STREAM_BUFFER_ADDR_V6 0xf9f8
  209. #define S5P_FIMV_E_STREAM_BUFFER_SIZE_V6 0xf9fc
  210. #define S5P_FIMV_E_ROI_BUFFER_ADDR_V6 0xfA00
  211. #define S5P_FIMV_E_PARAM_CHANGE_V6 0xfa04
  212. #define S5P_FIMV_E_IR_SIZE_V6 0xfa08
  213. #define S5P_FIMV_E_GOP_CONFIG_V6 0xfa0c
  214. #define S5P_FIMV_E_MSLICE_MODE_V6 0xfa10
  215. #define S5P_FIMV_E_MSLICE_SIZE_MB_V6 0xfa14
  216. #define S5P_FIMV_E_MSLICE_SIZE_BITS_V6 0xfa18
  217. #define S5P_FIMV_E_FRAME_INSERTION_V6 0xfa1c
  218. #define S5P_FIMV_E_RC_FRAME_RATE_V6 0xfa20
  219. #define S5P_FIMV_E_RC_BIT_RATE_V6 0xfa24
  220. #define S5P_FIMV_E_RC_QP_OFFSET_V6 0xfa28
  221. #define S5P_FIMV_E_RC_ROI_CTRL_V6 0xfa2c
  222. #define S5P_FIMV_E_PICTURE_TAG_V6 0xfa30
  223. #define S5P_FIMV_E_BIT_COUNT_ENABLE_V6 0xfa34
  224. #define S5P_FIMV_E_MAX_BIT_COUNT_V6 0xfa38
  225. #define S5P_FIMV_E_MIN_BIT_COUNT_V6 0xfa3c
  226. #define S5P_FIMV_E_METADATA_BUFFER_ADDR_V6 0xfa40
  227. #define S5P_FIMV_E_METADATA_BUFFER_SIZE_V6 0xfa44
  228. #define S5P_FIMV_E_STREAM_SIZE_V6 0xfa80
  229. #define S5P_FIMV_E_SLICE_TYPE_V6 0xfa84
  230. #define S5P_FIMV_E_PICTURE_COUNT_V6 0xfa88
  231. #define S5P_FIMV_E_RET_PICTURE_TAG_V6 0xfa8c
  232. #define S5P_FIMV_E_STREAM_BUFFER_WRITE_POINTER_V6 0xfa90
  233. #define S5P_FIMV_E_ENCODED_SOURCE_LUMA_ADDR_V6 0xfa94
  234. #define S5P_FIMV_E_ENCODED_SOURCE_CHROMA_ADDR_V6 0xfa98
  235. #define S5P_FIMV_E_RECON_LUMA_DPB_ADDR_V6 0xfa9c
  236. #define S5P_FIMV_E_RECON_CHROMA_DPB_ADDR_V6 0xfaa0
  237. #define S5P_FIMV_E_METADATA_ADDR_ENC_SLICE_V6 0xfaa4
  238. #define S5P_FIMV_E_METADATA_SIZE_ENC_SLICE_V6 0xfaa8
  239. #define S5P_FIMV_E_MPEG4_OPTIONS_V6 0xfb10
  240. #define S5P_FIMV_E_MPEG4_HEC_PERIOD_V6 0xfb14
  241. #define S5P_FIMV_E_ASPECT_RATIO_V6 0xfb50
  242. #define S5P_FIMV_E_EXTENDED_SAR_V6 0xfb54
  243. #define S5P_FIMV_E_H264_OPTIONS_V6 0xfb58
  244. #define S5P_FIMV_E_H264_LF_ALPHA_OFFSET_V6 0xfb5c
  245. #define S5P_FIMV_E_H264_LF_BETA_OFFSET_V6 0xfb60
  246. #define S5P_FIMV_E_H264_I_PERIOD_V6 0xfb64
  247. #define S5P_FIMV_E_H264_FMO_SLICE_GRP_MAP_TYPE_V6 0xfb68
  248. #define S5P_FIMV_E_H264_FMO_NUM_SLICE_GRP_MINUS1_V6 0xfb6c
  249. #define S5P_FIMV_E_H264_FMO_SLICE_GRP_CHANGE_DIR_V6 0xfb70
  250. #define S5P_FIMV_E_H264_FMO_SLICE_GRP_CHANGE_RATE_MINUS1_V6 0xfb74
  251. #define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_0_V6 0xfb78
  252. #define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_1_V6 0xfb7c
  253. #define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_2_V6 0xfb80
  254. #define S5P_FIMV_E_H264_FMO_RUN_LENGTH_MINUS1_3_V6 0xfb84
  255. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_0_V6 0xfb88
  256. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_1_V6 0xfb8c
  257. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_2_V6 0xfb90
  258. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_3_V6 0xfb94
  259. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_4_V6 0xfb98
  260. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_5_V6 0xfb9c
  261. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_6_V6 0xfba0
  262. #define S5P_FIMV_E_H264_ASO_SLICE_ORDER_7_V6 0xfba4
  263. #define S5P_FIMV_E_H264_CHROMA_QP_OFFSET_V6 0xfba8
  264. #define S5P_FIMV_E_H264_NUM_T_LAYER_V6 0xfbac
  265. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER0_V6 0xfbb0
  266. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER1_V6 0xfbb4
  267. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER2_V6 0xfbb8
  268. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER3_V6 0xfbbc
  269. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER4_V6 0xfbc0
  270. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER5_V6 0xfbc4
  271. #define S5P_FIMV_E_H264_HIERARCHICAL_QP_LAYER6_V6 0xfbc8
  272. #define S5P_FIMV_E_H264_FRAME_PACKING_SEI_INFO_V6 0xfc4c
  273. #define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE_V6 0
  274. #define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_TOP_BOTTOM_V6 1
  275. #define S5P_FIMV_ENC_FP_ARRANGEMENT_TYPE_TEMPORAL_V6 2
  276. #define S5P_FIMV_E_MVC_FRAME_QP_VIEW1_V6 0xfd40
  277. #define S5P_FIMV_E_MVC_RC_FRAME_RATE_VIEW1_V6 0xfd44
  278. #define S5P_FIMV_E_MVC_RC_BIT_RATE_VIEW1_V6 0xfd48
  279. #define S5P_FIMV_E_MVC_RC_QBOUND_VIEW1_V6 0xfd4c
  280. #define S5P_FIMV_E_MVC_RC_RPARA_VIEW1_V6 0xfd50
  281. #define S5P_FIMV_E_MVC_INTER_VIEW_PREDICTION_ON_V6 0xfd80
  282. /* Codec numbers */
  283. #define S5P_FIMV_CODEC_NONE_V6 -1
  284. #define S5P_FIMV_CODEC_H264_DEC_V6 0
  285. #define S5P_FIMV_CODEC_H264_MVC_DEC_V6 1
  286. #define S5P_FIMV_CODEC_MPEG4_DEC_V6 3
  287. #define S5P_FIMV_CODEC_FIMV1_DEC_V6 4
  288. #define S5P_FIMV_CODEC_FIMV2_DEC_V6 5
  289. #define S5P_FIMV_CODEC_FIMV3_DEC_V6 6
  290. #define S5P_FIMV_CODEC_FIMV4_DEC_V6 7
  291. #define S5P_FIMV_CODEC_H263_DEC_V6 8
  292. #define S5P_FIMV_CODEC_VC1RCV_DEC_V6 9
  293. #define S5P_FIMV_CODEC_VC1_DEC_V6 10
  294. /* FIXME: Add 11~12 */
  295. #define S5P_FIMV_CODEC_MPEG2_DEC_V6 13
  296. #define S5P_FIMV_CODEC_VP8_DEC_V6 14
  297. /* FIXME: Add 15~16 */
  298. #define S5P_FIMV_CODEC_H264_ENC_V6 20
  299. #define S5P_FIMV_CODEC_H264_MVC_ENC_V6 21
  300. #define S5P_FIMV_CODEC_MPEG4_ENC_V6 23
  301. #define S5P_FIMV_CODEC_H263_ENC_V6 24
  302. #define S5P_FIMV_NV12M_HALIGN_V6 16
  303. #define S5P_FIMV_NV12MT_HALIGN_V6 16
  304. #define S5P_FIMV_NV12MT_VALIGN_V6 16
  305. #define S5P_FIMV_TMV_BUFFER_ALIGN_V6 16
  306. #define S5P_FIMV_LUMA_DPB_BUFFER_ALIGN_V6 256
  307. #define S5P_FIMV_CHROMA_DPB_BUFFER_ALIGN_V6 256
  308. #define S5P_FIMV_ME_BUFFER_ALIGN_V6 256
  309. #define S5P_FIMV_SCRATCH_BUFFER_ALIGN_V6 256
  310. #define S5P_FIMV_LUMA_MB_TO_PIXEL_V6 256
  311. #define S5P_FIMV_CHROMA_MB_TO_PIXEL_V6 128
  312. #define S5P_FIMV_NUM_TMV_BUFFERS_V6 2
  313. #define S5P_FIMV_MAX_FRAME_SIZE_V6 (2 * SZ_1M)
  314. #define S5P_FIMV_NUM_PIXELS_IN_MB_ROW_V6 16
  315. #define S5P_FIMV_NUM_PIXELS_IN_MB_COL_V6 16
  316. /* Buffer size requirements defined by hardware */
  317. #define S5P_FIMV_TMV_BUFFER_SIZE_V6(w, h) (((w) + 1) * ((h) + 3) * 8)
  318. #define S5P_FIMV_ME_BUFFER_SIZE_V6(imw, imh, mbw, mbh) \
  319. (((((imw + 127) / 64) * 16) * DIV_ROUND_UP(imh, 64) * 256) + \
  320. (DIV_ROUND_UP((mbw) * (mbh), 32) * 16))
  321. #define S5P_FIMV_SCRATCH_BUF_SIZE_H264_DEC_V6(w, h) (((w) * 192) + 64)
  322. #define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V6(w, h) \
  323. ((w) * 144 + 8192 * (h) + 49216 + 1048576)
  324. #define S5P_FIMV_SCRATCH_BUF_SIZE_VC1_DEC_V6(w, h) \
  325. (2096 * ((w) + (h) + 1))
  326. #define S5P_FIMV_SCRATCH_BUF_SIZE_H263_DEC_V6(w, h) ((w) * 400)
  327. #define S5P_FIMV_SCRATCH_BUF_SIZE_VP8_DEC_V6(w, h) \
  328. ((w) * 32 + (h) * 128 + (((w) + 1) / 2) * 64 + 2112)
  329. #define S5P_FIMV_SCRATCH_BUF_SIZE_H264_ENC_V6(w, h) \
  330. (((w) * 64) + (((w) + 1) * 16) + (4096 * 16))
  331. #define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_ENC_V6(w, h) \
  332. (((w) * 16) + (((w) + 1) * 16))
  333. /* MFC Context buffer sizes */
  334. #define MFC_CTX_BUF_SIZE_V6 (28 * SZ_1K) /* 28KB */
  335. #define MFC_H264_DEC_CTX_BUF_SIZE_V6 (2 * SZ_1M) /* 2MB */
  336. #define MFC_OTHER_DEC_CTX_BUF_SIZE_V6 (20 * SZ_1K) /* 20KB */
  337. #define MFC_H264_ENC_CTX_BUF_SIZE_V6 (100 * SZ_1K) /* 100KB */
  338. #define MFC_OTHER_ENC_CTX_BUF_SIZE_V6 (12 * SZ_1K) /* 12KB */
  339. /* MFCv6 variant defines */
  340. #define MAX_FW_SIZE_V6 (SZ_1M) /* 1MB */
  341. #define MAX_CPB_SIZE_V6 (3 * SZ_1M) /* 3MB */
  342. #define MFC_VERSION_V6 0x61
  343. #define MFC_NUM_PORTS_V6 1
  344. #endif /* _REGS_FIMV_V6_H */