regs-mfc-v7.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Register definition file for Samsung MFC V7.x Interface (FIMV) driver
  3. *
  4. * Copyright (c) 2013 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_MFC_V7_H
  12. #define _REGS_MFC_V7_H
  13. #include "regs-mfc-v6.h"
  14. /* Additional features of v7 */
  15. #define S5P_FIMV_CODEC_VP8_ENC_V7 25
  16. /* Additional registers for v7 */
  17. #define S5P_FIMV_E_SOURCE_FIRST_ADDR_V7 0xf9e0
  18. #define S5P_FIMV_E_SOURCE_SECOND_ADDR_V7 0xf9e4
  19. #define S5P_FIMV_E_SOURCE_THIRD_ADDR_V7 0xf9e8
  20. #define S5P_FIMV_E_SOURCE_FIRST_STRIDE_V7 0xf9ec
  21. #define S5P_FIMV_E_SOURCE_SECOND_STRIDE_V7 0xf9f0
  22. #define S5P_FIMV_E_SOURCE_THIRD_STRIDE_V7 0xf9f4
  23. #define S5P_FIMV_E_ENCODED_SOURCE_FIRST_ADDR_V7 0xfa70
  24. #define S5P_FIMV_E_ENCODED_SOURCE_SECOND_ADDR_V7 0xfa74
  25. #define S5P_FIMV_E_VP8_OPTIONS_V7 0xfdb0
  26. #define S5P_FIMV_E_VP8_FILTER_OPTIONS_V7 0xfdb4
  27. #define S5P_FIMV_E_VP8_GOLDEN_FRAME_OPTION_V7 0xfdb8
  28. #define S5P_FIMV_E_VP8_NUM_T_LAYER_V7 0xfdc4
  29. /* MFCv7 variant defines */
  30. #define MAX_FW_SIZE_V7 (SZ_1M) /* 1MB */
  31. #define MAX_CPB_SIZE_V7 (3 * SZ_1M) /* 3MB */
  32. #define MFC_VERSION_V7 0x72
  33. #define MFC_NUM_PORTS_V7 1
  34. #define MFC_LUMA_PAD_BYTES_V7 256
  35. #define MFC_CHROMA_PAD_BYTES_V7 128
  36. /* MFCv7 Context buffer sizes */
  37. #define MFC_CTX_BUF_SIZE_V7 (30 * SZ_1K) /* 30KB */
  38. #define MFC_H264_DEC_CTX_BUF_SIZE_V7 (2 * SZ_1M) /* 2MB */
  39. #define MFC_OTHER_DEC_CTX_BUF_SIZE_V7 (20 * SZ_1K) /* 20KB */
  40. #define MFC_H264_ENC_CTX_BUF_SIZE_V7 (100 * SZ_1K) /* 100KB */
  41. #define MFC_OTHER_ENC_CTX_BUF_SIZE_V7 (10 * SZ_1K) /* 10KB */
  42. /* Buffer size defines */
  43. #define S5P_FIMV_SCRATCH_BUF_SIZE_MPEG4_DEC_V7(w, h) \
  44. (SZ_1M + ((w) * 144) + (8192 * (h)) + 49216)
  45. #define S5P_FIMV_SCRATCH_BUF_SIZE_VP8_ENC_V7(w, h) \
  46. (((w) * 48) + 8192 + ((((w) + 1) / 2) * 128) + 144 + \
  47. ((((((w) * 16) * ((h) * 16)) * 3) / 2) * 4))
  48. #endif /*_REGS_MFC_V7_H*/