ddp_reg_pq.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. /* Copyright Statement:
  2. *
  3. * This software/firmware and related documentation ("MediaTek Software") are
  4. * protected under relevant copyright laws. The information contained herein
  5. * is confidential and proprietary to MediaTek Inc. and/or its licensors.
  6. * Without the prior written permission of MediaTek inc. and/or its licensors,
  7. * any reproduction, modification, use or disclosure of MediaTek Software,
  8. * and information contained herein, in whole or in part, shall be strictly prohibited.
  9. */
  10. /* MediaTek Inc. (C) 2015. All rights reserved.
  11. *
  12. * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  13. * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  14. * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
  15. * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  18. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  19. * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  20. * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
  21. * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
  22. * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
  23. * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
  24. * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
  25. * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
  26. * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  27. * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  28. * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
  29. * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
  30. */
  31. #ifndef _DDP_REG_PQ_H_
  32. #define _DDP_REG_PQ_H_
  33. /*******************************/
  34. /* field definition */
  35. /* ------------------------------------------------------------- */
  36. /* AAL */
  37. #define DISP_AAL_EN (DISPSYS_AAL0_BASE + 0x000)
  38. #define DISP_AAL_RESET (DISPSYS_AAL0_BASE + 0x004)
  39. #define DISP_AAL_INTEN (DISPSYS_AAL0_BASE + 0x008)
  40. #define DISP_AAL_INTSTA (DISPSYS_AAL0_BASE + 0x00c)
  41. #define DISP_AAL_STATUS (DISPSYS_AAL0_BASE + 0x010)
  42. #define DISP_AAL_CFG (DISPSYS_AAL0_BASE + 0x020)
  43. #define DISP_AAL_IN_CNT (DISPSYS_AAL0_BASE + 0x024)
  44. #define DISP_AAL_OUT_CNT (DISPSYS_AAL0_BASE + 0x028)
  45. #define DISP_AAL_CHKSUM (DISPSYS_AAL0_BASE + 0x02c)
  46. #define DISP_AAL_SIZE (DISPSYS_AAL0_BASE + 0x030)
  47. #define DISP_AAL_SHADOW_CTL (DISPSYS_AAL0_BASE + 0x0B0)
  48. #define DISP_AAL_DUMMY_REG (DISPSYS_AAL0_BASE + 0x0c0)
  49. #define DISP_AAL_MAX_HIST_CONFIG_00 (DISPSYS_AAL0_BASE + 0x204)
  50. #define DISP_AAL_CABC_00 (DISPSYS_AAL0_BASE + 0x20c)
  51. #define DISP_AAL_CABC_02 (DISPSYS_AAL0_BASE + 0x214)
  52. #define DISP_AAL_CABC_04 (DISPSYS_AAL0_BASE + 0x21c)
  53. #define DISP_AAL_STATUS_00 (DISPSYS_AAL0_BASE + 0x224)
  54. /* 00 ~ 32: max histogram */
  55. #define DISP_AAL_STATUS_32 (DISPSYS_AAL0_BASE + 0x2a4)
  56. /* bit 8: dre_gain_force_en */
  57. #define DISP_AAL_DRE_GAIN_FILTER_00 (DISPSYS_AAL0_BASE + 0x354)
  58. #define DISP_AAL_DRE_FLT_FORCE(idx) (DISPSYS_AAL0_BASE + 0x358 + (idx) * 4)
  59. #define DISP_AAL_DRE_CRV_CAL_00 (DISPSYS_AAL0_BASE + 0x344)
  60. #define DISP_AAL_DRE_MAPPING_00 (DISPSYS_AAL0_BASE + 0x3b0)
  61. #define DISP_AAL_CABC_GAINLMT_TBL(idx) (DISPSYS_AAL0_BASE + 0x40c + (idx) * 4)
  62. /* DRE 3.0 */
  63. #define DISP_AAL_OUTPUT_SIZE (DISPSYS_AAL0_BASE + 0x4d8)
  64. #define DISP_PWM_EN_OFF (0x00)
  65. #define DISP_PWM_RST_RX (0x04)
  66. #define DISP_PWM_COMMIT_OFF (0x0C)
  67. #define DISP_PWM_CON_0_OFF (0x18)
  68. #define DISP_PWM_CON_1_OFF (0x1C)
  69. #define DISP_PWM_DEBUG (0x80)
  70. /* field definition */
  71. /* ------------------------------------------------------------- */
  72. /* COLOR */
  73. #define CFG_MAIN_FLD_M_REG_RESET REG_FLD(1, 31)
  74. #define CFG_MAIN_FLD_M_DISP_RESET REG_FLD(1, 30)
  75. #define CFG_MAIN_FLD_COLOR_DBUF_EN REG_FLD(1, 29)
  76. #define CFG_MAIN_FLD_C_PP_CM_DBG_SEL REG_FLD(4, 16)
  77. #define CFG_MAIN_FLD_SEQ_SEL REG_FLD(1, 13)
  78. #define CFG_MAIN_FLD_ALLBP REG_FLD(1, 7)
  79. #define CFG_MAIN_FLD_HEBP REG_FLD(1, 4)
  80. #define CFG_MAIN_FLD_SEBP REG_FLD(1, 3)
  81. #define CFG_MAIN_FLD_YEBP REG_FLD(1, 2)
  82. #define CFG_MAIN_FLD_P2CBP REG_FLD(1, 1)
  83. #define CFG_MAIN_FLD_C2PBP REG_FLD(1, 0)
  84. #define START_FLD_DISP_COLOR_START REG_FLD(1, 0)
  85. #define DISP_COLOR_CFG_MAIN (DISPSYS_COLOR0_BASE+0x400)
  86. #define DISP_COLOR_PXL_CNT_MAIN (DISPSYS_COLOR0_BASE+0x404)
  87. #define DISP_COLOR_LINE_CNT_MAIN (DISPSYS_COLOR0_BASE+0x408)
  88. #define DISP_COLOR_WIN_X_MAIN (DISPSYS_COLOR0_BASE+0x40C)
  89. #define DISP_COLOR_WIN_Y_MAIN (DISPSYS_COLOR0_BASE+0x410)
  90. #define DISP_COLOR_TIMING_DETECTION_0 (DISPSYS_COLOR0_BASE+0x418)
  91. #define DISP_COLOR_TIMING_DETECTION_1 (DISPSYS_COLOR0_BASE+0x41c)
  92. #define DISP_COLOR_DBG_CFG_MAIN (DISPSYS_COLOR0_BASE+0x420)
  93. #define DISP_COLOR_C_BOOST_MAIN (DISPSYS_COLOR0_BASE+0x428)
  94. #define DISP_COLOR_C_BOOST_MAIN_2 (DISPSYS_COLOR0_BASE+0x42C)
  95. #define DISP_COLOR_LUMA_ADJ (DISPSYS_COLOR0_BASE+0x430)
  96. #define DISP_COLOR_G_PIC_ADJ_MAIN_1 (DISPSYS_COLOR0_BASE+0x434)
  97. #define DISP_COLOR_G_PIC_ADJ_MAIN_2 (DISPSYS_COLOR0_BASE+0x438)
  98. #define DISP_COLOR_POS_MAIN (DISPSYS_COLOR0_BASE+0x484)
  99. #define DISP_COLOR_INK_DATA_MAIN (DISPSYS_COLOR0_BASE+0x488)
  100. #define DISP_COLOR_INK_DATA_MAIN_CR (DISPSYS_COLOR0_BASE+0x48c)
  101. #define DISP_COLOR_CAP_IN_DATA_MAIN (DISPSYS_COLOR0_BASE+0x490)
  102. #define DISP_COLOR_CAP_IN_DATA_MAIN_CR (DISPSYS_COLOR0_BASE+0x494)
  103. #define DISP_COLOR_CAP_OUT_DATA_MAIN (DISPSYS_COLOR0_BASE+0x498)
  104. #define DISP_COLOR_CAP_OUT_DATA_MAIN_CR (DISPSYS_COLOR0_BASE+0x49c)
  105. #define DISP_COLOR_Y_SLOPE_1_0_MAIN (DISPSYS_COLOR0_BASE+0x4A0)
  106. #define DISP_COLOR_LOCAL_HUE_CD_0 (DISPSYS_COLOR0_BASE+0x620)
  107. #define DISP_COLOR_TWO_D_WINDOW_1 (DISPSYS_COLOR0_BASE+0x740)
  108. #define DISP_COLOR_TWO_D_W1_RESULT (DISPSYS_COLOR0_BASE+0x74C)
  109. #define DISP_COLOR_SAT_HIST_X_CFG_MAIN (DISPSYS_COLOR0_BASE+0x768)
  110. #define DISP_COLOR_SAT_HIST_Y_CFG_MAIN (DISPSYS_COLOR0_BASE+0x76c)
  111. #define DISP_COLOR_BWS_2 (DISPSYS_COLOR0_BASE+0x79c)
  112. #define DISP_COLOR_CRC_0 (DISPSYS_COLOR0_BASE+0x7e0)
  113. #define DISP_COLOR_PART_SAT_GAIN1_0 (DISPSYS_COLOR0_BASE+0x7FC)
  114. #define DISP_COLOR_PART_SAT_GAIN1_1 (DISPSYS_COLOR0_BASE+0x800)
  115. #define DISP_COLOR_PART_SAT_GAIN1_2 (DISPSYS_COLOR0_BASE+0x804)
  116. #define DISP_COLOR_PART_SAT_GAIN1_3 (DISPSYS_COLOR0_BASE+0x808)
  117. #define DISP_COLOR_PART_SAT_GAIN1_4 (DISPSYS_COLOR0_BASE+0x80C)
  118. #define DISP_COLOR_PART_SAT_GAIN2_0 (DISPSYS_COLOR0_BASE+0x810)
  119. #define DISP_COLOR_PART_SAT_GAIN2_1 (DISPSYS_COLOR0_BASE+0x814)
  120. #define DISP_COLOR_PART_SAT_GAIN2_2 (DISPSYS_COLOR0_BASE+0x818)
  121. #define DISP_COLOR_PART_SAT_GAIN2_3 (DISPSYS_COLOR0_BASE+0x81C)
  122. #define DISP_COLOR_PART_SAT_GAIN2_4 (DISPSYS_COLOR0_BASE+0x820)
  123. #define DISP_COLOR_PART_SAT_GAIN3_0 (DISPSYS_COLOR0_BASE+0x824)
  124. #define DISP_COLOR_PART_SAT_GAIN3_1 (DISPSYS_COLOR0_BASE+0x828)
  125. #define DISP_COLOR_PART_SAT_GAIN3_2 (DISPSYS_COLOR0_BASE+0x82C)
  126. #define DISP_COLOR_PART_SAT_GAIN3_3 (DISPSYS_COLOR0_BASE+0x830)
  127. #define DISP_COLOR_PART_SAT_GAIN3_4 (DISPSYS_COLOR0_BASE+0x834)
  128. #define DISP_COLOR_PART_SAT_POINT1_0 (DISPSYS_COLOR0_BASE+0x838)
  129. #define DISP_COLOR_PART_SAT_POINT1_1 (DISPSYS_COLOR0_BASE+0x83C)
  130. #define DISP_COLOR_PART_SAT_POINT1_2 (DISPSYS_COLOR0_BASE+0x840)
  131. #define DISP_COLOR_PART_SAT_POINT1_3 (DISPSYS_COLOR0_BASE+0x844)
  132. #define DISP_COLOR_PART_SAT_POINT1_4 (DISPSYS_COLOR0_BASE+0x848)
  133. #define DISP_COLOR_PART_SAT_POINT2_0 (DISPSYS_COLOR0_BASE+0x84C)
  134. #define DISP_COLOR_PART_SAT_POINT2_1 (DISPSYS_COLOR0_BASE+0x850)
  135. #define DISP_COLOR_PART_SAT_POINT2_2 (DISPSYS_COLOR0_BASE+0x854)
  136. #define DISP_COLOR_PART_SAT_POINT2_3 (DISPSYS_COLOR0_BASE+0x858)
  137. #define DISP_COLOR_PART_SAT_POINT2_4 (DISPSYS_COLOR0_BASE+0x85C)
  138. #define DISP_COLOR_START (DISPSYS_COLOR0_BASE+0xC00)
  139. #define DISP_COLOR_INTEN (DISPSYS_COLOR0_BASE+0xC04)
  140. #define DISP_COLOR_OUT_SEL (DISPSYS_COLOR0_BASE+0xC08)
  141. #define DISP_COLOR_FRAME_DONE_DEL (DISPSYS_COLOR0_BASE+0xC10)
  142. #define DISP_COLOR_CRC (DISPSYS_COLOR0_BASE+0xC14)
  143. #define DISP_COLOR_SW_SCRATCH (DISPSYS_COLOR0_BASE+0xC18)
  144. #define DISP_COLOR_CK_ON (DISPSYS_COLOR0_BASE+0xC28)
  145. #define DISP_COLOR_INTERNAL_IP_WIDTH (DISPSYS_COLOR0_BASE+0xC50)
  146. #define DISP_COLOR_INTERNAL_IP_HEIGHT (DISPSYS_COLOR0_BASE+0xC54)
  147. #define DISP_COLOR_CM1_EN (DISPSYS_COLOR0_BASE+0xC60)
  148. #define DISP_COLOR_CM2_EN (DISPSYS_COLOR0_BASE+0xCA0)
  149. #define DISP_COLOR_SHADOW_CTRL (DISPSYS_COLOR0_BASE+0xCB0)
  150. #define DISP_COLOR_R0_CRC (DISPSYS_COLOR0_BASE+0xCF0)
  151. #define DISP_COLOR_S_GAIN_BY_Y0_0 (DISPSYS_COLOR0_BASE+0xCF4)
  152. #define DISP_COLOR_S_GAIN_BY_Y0_1 (DISPSYS_COLOR0_BASE+0xCF8)
  153. #define DISP_COLOR_S_GAIN_BY_Y0_2 (DISPSYS_COLOR0_BASE+0xCFC)
  154. #define DISP_COLOR_S_GAIN_BY_Y0_3 (DISPSYS_COLOR0_BASE+0xD00)
  155. #define DISP_COLOR_S_GAIN_BY_Y0_4 (DISPSYS_COLOR0_BASE+0xD04)
  156. #define DISP_COLOR_S_GAIN_BY_Y64_0 (DISPSYS_COLOR0_BASE+0xD08)
  157. #define DISP_COLOR_S_GAIN_BY_Y64_1 (DISPSYS_COLOR0_BASE+0xD0C)
  158. #define DISP_COLOR_S_GAIN_BY_Y64_2 (DISPSYS_COLOR0_BASE+0xD10)
  159. #define DISP_COLOR_S_GAIN_BY_Y64_3 (DISPSYS_COLOR0_BASE+0xD14)
  160. #define DISP_COLOR_S_GAIN_BY_Y64_4 (DISPSYS_COLOR0_BASE+0xD18)
  161. #define DISP_COLOR_S_GAIN_BY_Y128_0 (DISPSYS_COLOR0_BASE+0xD1C)
  162. #define DISP_COLOR_S_GAIN_BY_Y128_1 (DISPSYS_COLOR0_BASE+0xD20)
  163. #define DISP_COLOR_S_GAIN_BY_Y128_2 (DISPSYS_COLOR0_BASE+0xD24)
  164. #define DISP_COLOR_S_GAIN_BY_Y128_3 (DISPSYS_COLOR0_BASE+0xD28)
  165. #define DISP_COLOR_S_GAIN_BY_Y128_4 (DISPSYS_COLOR0_BASE+0xD2C)
  166. #define DISP_COLOR_S_GAIN_BY_Y192_0 (DISPSYS_COLOR0_BASE+0xD30)
  167. #define DISP_COLOR_S_GAIN_BY_Y192_1 (DISPSYS_COLOR0_BASE+0xD34)
  168. #define DISP_COLOR_S_GAIN_BY_Y192_2 (DISPSYS_COLOR0_BASE+0xD38)
  169. #define DISP_COLOR_S_GAIN_BY_Y192_3 (DISPSYS_COLOR0_BASE+0xD3C)
  170. #define DISP_COLOR_S_GAIN_BY_Y192_4 (DISPSYS_COLOR0_BASE+0xD40)
  171. #define DISP_COLOR_S_GAIN_BY_Y256_0 (DISPSYS_COLOR0_BASE+0xD44)
  172. #define DISP_COLOR_S_GAIN_BY_Y256_1 (DISPSYS_COLOR0_BASE+0xD48)
  173. #define DISP_COLOR_S_GAIN_BY_Y256_2 (DISPSYS_COLOR0_BASE+0xD4C)
  174. #define DISP_COLOR_S_GAIN_BY_Y256_3 (DISPSYS_COLOR0_BASE+0xD50)
  175. #define DISP_COLOR_S_GAIN_BY_Y256_4 (DISPSYS_COLOR0_BASE+0xD54)
  176. #define DISP_COLOR_LSP_1 (DISPSYS_COLOR0_BASE+0xD58)
  177. #define DISP_COLOR_LSP_2 (DISPSYS_COLOR0_BASE+0xD5C)
  178. /* SMI_LARB0 */
  179. #define DISP_REG_SMI_LARB0_NON_SEC_CON (DISPSYS_SMI_LARB0_BASE+0x380)
  180. #define DISP_REG_SMI_LARB0_SEC_CON (DISPSYS_SMI_LARB0_BASE+0xf80)
  181. /* SMI_LARB1 */
  182. #define DISP_REG_SMI_LARB1_NON_SEC_CON (DISPSYS_SMI_LARB1_BASE+0x380)
  183. #define DISP_REG_SMI_LARB1_SEC_CON (DISPSYS_SMI_LARB1_BASE+0xf80)
  184. #define REG_FLD_MMU_EN REG_FLD(1, 0)
  185. /* field definition */
  186. /* ------------------------------------------------------------- */
  187. /* CCORR */
  188. #define DISP_REG_CCORR_EN (DISPSYS_CCORR0_BASE + 0x000)
  189. #define DISP_REG_CCORR_RESET (DISPSYS_CCORR0_BASE + 0x004)
  190. #define DISP_REG_CCORR_INTEN (DISPSYS_CCORR0_BASE + 0x008)
  191. #define DISP_REG_CCORR_INTSTA (DISPSYS_CCORR0_BASE + 0x00c)
  192. #define DISP_REG_CCORR_STATUS (DISPSYS_CCORR0_BASE + 0x010)
  193. #define DISP_REG_CCORR_CFG (DISPSYS_CCORR0_BASE + 0x020)
  194. #define DISP_REG_CCORR_IN_CNT (DISPSYS_CCORR0_BASE + 0x024)
  195. #define DISP_REG_CCORR_OUT_CNT (DISPSYS_CCORR0_BASE + 0x028)
  196. #define DISP_REG_CCORR_CHKSUM (DISPSYS_CCORR0_BASE + 0x02c)
  197. #define DISP_REG_CCORR_SIZE (DISPSYS_CCORR0_BASE + 0x030)
  198. #define DISP_REG_CCORR_COEF_0 (DISPSYS_CCORR0_BASE + 0x080)
  199. #define DISP_REG_CCORR_SHADOW (DISPSYS_CCORR0_BASE + 0x0a0)
  200. #define DISP_REG_CCORR_DUMMY_REG (DISPSYS_CCORR0_BASE + 0x0c0)
  201. #define CCORR_SIZE_FLD_HSIZE REG_FLD(13, 16)
  202. #define CCORR_SIZE_FLD_VSIZE REG_FLD(13, 0)
  203. #define CCORR_CFG_FLD_CHKSUM_SEL REG_FLD(3, 29)
  204. #define CCORR_CFG_FLD_CHKSUM_EN REG_FLD(1, 28)
  205. #define CCORR_CFG_FLD_CCORR_GAMMA_OFF REG_FLD(1, 2)
  206. #define CCORR_CFG_FLD_CCORR_ENGINE_EN REG_FLD(1, 1)
  207. /* field definition */
  208. /* ------------------------------------------------------------- */
  209. /* GAMMA */
  210. #define DISP_REG_GAMMA_EN (DISPSYS_GAMMA0_BASE + 0x000)
  211. #define DISP_REG_GAMMA_RESET (DISPSYS_GAMMA0_BASE + 0x004)
  212. #define DISP_REG_GAMMA_INTEN (DISPSYS_GAMMA0_BASE + 0x008)
  213. #define DISP_REG_GAMMA_INTSTA (DISPSYS_GAMMA0_BASE + 0x00c)
  214. #define DISP_REG_GAMMA_STATUS (DISPSYS_GAMMA0_BASE + 0x010)
  215. #define DISP_REG_GAMMA_CFG (DISPSYS_GAMMA0_BASE + 0x020)
  216. #define DISP_REG_GAMMA_INPUT_COUNT (DISPSYS_GAMMA0_BASE + 0x024)
  217. #define DISP_REG_GAMMA_OUTPUT_COUNT (DISPSYS_GAMMA0_BASE + 0x028)
  218. #define DISP_REG_GAMMA_CHKSUM (DISPSYS_GAMMA0_BASE + 0x02c)
  219. #define DISP_REG_GAMMA_SIZE (DISPSYS_GAMMA0_BASE + 0x030)
  220. #define DISP_REG_GAMMA_DEBUG (DISPSYS_GAMMA0_BASE + 0x034)
  221. #define DISP_REG_GAMMA_DUMMY_REG (DISPSYS_GAMMA0_BASE + 0x0c0)
  222. #define DISP_REG_GAMMA_LUT (DISPSYS_GAMMA0_BASE + 0x700)
  223. #define EN_FLD_GAMMA_EN REG_FLD(1, 0)
  224. #define RESET_FLD_GAMMA_RESET REG_FLD(1, 0)
  225. #define INTEN_FLD_OF_END_INT_EN REG_FLD(1, 1)
  226. #define INTEN_FLD_IF_END_INT_EN REG_FLD(1, 0)
  227. #define INTSTA_FLD_OF_END_INT REG_FLD(1, 1)
  228. #define INTSTA_FLD_IF_END_INT REG_FLD(1, 0)
  229. #define STATUS_FLD_IN_VALID REG_FLD(1, 7)
  230. #define STATUS_FLD_IN_READY REG_FLD(1, 6)
  231. #define STATUS_FLD_OUT_VALID REG_FLD(1, 5)
  232. #define STATUS_FLD_OUT_READY REG_FLD(1, 4)
  233. #define STATUS_FLD_OF_UNFINISH REG_FLD(1, 1)
  234. #define STATUS_FLD_IF_UNFINISH REG_FLD(1, 0)
  235. #define CFG_FLD_CHKSUM_SEL REG_FLD(2, 29)
  236. #define CFG_FLD_CHKSUM_EN REG_FLD(1, 28)
  237. #define CFG_FLD_CCORR_GAMMA_OFF REG_FLD(1, 5)
  238. #define CFG_FLD_CCORR_EN REG_FLD(1, 4)
  239. #define CFG_FLD_DITHER_EN REG_FLD(1, 2)
  240. #define CFG_FLD_GAMMA_LUT_EN REG_FLD(1, 1)
  241. #define CFG_FLD_RELAY_MODE REG_FLD(1, 0)
  242. #define INPUT_COUNT_FLD_INP_LINE_CNT REG_FLD(13, 16)
  243. #define INPUT_COUNT_FLD_INP_PIX_CNT REG_FLD(13, 0)
  244. #define OUTPUT_COUNT_FLD_OUTP_LINE_CNT REG_FLD(13, 16)
  245. #define OUTPUT_COUNT_FLD_OUTP_PIX_CNT REG_FLD(13, 0)
  246. #define CHKSUM_FLD_CHKSUM REG_FLD(30, 0)
  247. #define SIZE_FLD_HSIZE REG_FLD(13, 16)
  248. #define SIZE_FLD_VSIZE REG_FLD(13, 0)
  249. #define CCORR_0_FLD_CCORR_C00 REG_FLD(12, 16)
  250. #define CCORR_0_FLD_CCORR_C01 REG_FLD(12, 0)
  251. #define CCORR_1_FLD_CCORR_C02 REG_FLD(12, 16)
  252. #define CCORR_1_FLD_CCORR_C10 REG_FLD(12, 0)
  253. #define CCORR_2_FLD_CCORR_C11 REG_FLD(12, 16)
  254. #define CCORR_2_FLD_CCORR_C12 REG_FLD(12, 0)
  255. #define CCORR_3_FLD_CCORR_C20 REG_FLD(12, 16)
  256. #define CCORR_3_FLD_CCORR_C21 REG_FLD(12, 0)
  257. #define CCORR_4_FLD_CCORR_C22 REG_FLD(12, 16)
  258. #define DUMMY_REG_FLD_DUMMY_REG REG_FLD(32, 0)
  259. #define DITHER_0_FLD_CRC_CLR REG_FLD(1, 24)
  260. #define DITHER_0_FLD_CRC_START REG_FLD(1, 20)
  261. #define DITHER_0_FLD_CRC_CEN REG_FLD(1, 16)
  262. #define DITHER_0_FLD_FRAME_DONE_DEL REG_FLD(8, 8)
  263. #define DITHER_0_FLD_OUT_SEL REG_FLD(1, 4)
  264. #define DITHER_5_FLD_W_DEMO REG_FLD(16, 0)
  265. #define DITHER_6_FLD_WRAP_MODE REG_FLD(1, 16)
  266. #define DITHER_6_FLD_LEFT_EN REG_FLD(2, 14)
  267. #define DITHER_6_FLD_FPHASE_R REG_FLD(1, 13)
  268. #define DITHER_6_FLD_FPHASE_EN REG_FLD(1, 12)
  269. #define DITHER_6_FLD_FPHASE REG_FLD(6, 4)
  270. #define DITHER_6_FLD_ROUND_EN REG_FLD(1, 3)
  271. #define DITHER_6_FLD_RDITHER_EN REG_FLD(1, 2)
  272. #define DITHER_6_FLD_LFSR_EN REG_FLD(1, 1)
  273. #define DITHER_6_FLD_EDITHER_EN REG_FLD(1, 0)
  274. #define DITHER_7_FLD_DRMOD_B REG_FLD(2, 8)
  275. #define DITHER_7_FLD_DRMOD_G REG_FLD(2, 4)
  276. #define DITHER_7_FLD_DRMOD_R REG_FLD(2, 0)
  277. #define GAMMA_DITHER_8_FLD_INK_DATA_R REG_FLD(12, 16)
  278. #define DITHER_8_FLD_INK REG_FLD(1, 0)
  279. #define GAMMA_DITHER_9_FLD_INK_DATA_B REG_FLD(12, 16)
  280. #define GAMMA_DITHER_9_FLD_INK_DATA_G REG_FLD(12, 0)
  281. #define DITHER_10_FLD_FPHASE_BIT REG_FLD(3, 8)
  282. #define DITHER_10_FLD_FPHASE_SEL REG_FLD(2, 4)
  283. #define DITHER_10_FLD_FPHASE_CTRL REG_FLD(2, 0)
  284. #define DITHER_11_FLD_SUB_B REG_FLD(2, 12)
  285. #define DITHER_11_FLD_SUB_G REG_FLD(2, 8)
  286. #define DITHER_11_FLD_SUB_R REG_FLD(2, 4)
  287. #define DITHER_11_FLD_SUBPIX_EN REG_FLD(1, 0)
  288. #define DITHER_12_FLD_H_ACTIVE REG_FLD(16, 16)
  289. #define DITHER_12_FLD_TABLE_EN REG_FLD(2, 4)
  290. #define DITHER_12_FLD_LSB_OFF REG_FLD(1, 0)
  291. #define DITHER_13_FLD_RSHIFT_B REG_FLD(3, 8)
  292. #define DITHER_13_FLD_RSHIFT_G REG_FLD(3, 4)
  293. #define DITHER_13_FLD_RSHIFT_R REG_FLD(3, 0)
  294. #define DITHER_14_FLD_DEBUG_MODE REG_FLD(2, 8)
  295. #define DITHER_14_FLD_DIFF_SHIFT REG_FLD(3, 4)
  296. #define DITHER_14_FLD_TESTPIN_EN REG_FLD(1, 0)
  297. #define DITHER_15_FLD_LSB_ERR_SHIFT_R REG_FLD(3, 28)
  298. #define DITHER_15_FLD_LSB_OVFLW_BIT_R REG_FLD(3, 24)
  299. #define DITHER_15_FLD_LSB_ADD_LSHIFT_R REG_FLD(3, 20)
  300. #define DITHER_15_FLD_LSB_INPUT_RSHIFT_R REG_FLD(3, 16)
  301. #define DITHER_15_FLD_LSB_NEW_BIT_MODE REG_FLD(1, 0)
  302. #define DITHER_16_FLD_LSB_ERR_SHIFT_B REG_FLD(3, 28)
  303. #define DITHER_16_FLD_OVFLW_BIT_B REG_FLD(3, 24)
  304. #define DITHER_16_FLD_ADD_LSHIFT_B REG_FLD(3, 20)
  305. #define DITHER_16_FLD_INPUT_RSHIFT_B REG_FLD(3, 16)
  306. #define DITHER_16_FLD_LSB_ERR_SHIFT_G REG_FLD(3, 12)
  307. #define DITHER_16_FLD_OVFLW_BIT_G REG_FLD(3, 8)
  308. #define DITHER_16_FLD_ADD_LSHIFT_G REG_FLD(3, 4)
  309. #define DITHER_16_FLD_INPUT_RSHIFT_G REG_FLD(3, 0)
  310. #define DITHER_17_FLD_CRC_RDY REG_FLD(1, 16)
  311. #define DITHER_17_FLD_CRC_OUT REG_FLD(16, 0)
  312. #define LUT_FLD_GAMMA_LUT_R REG_FLD(10, 20)
  313. #define LUT_FLD_GAMMA_LUT_G REG_FLD(10, 10)
  314. #define LUT_FLD_GAMMA_LUT_B REG_FLD(10, 0)
  315. /* ------------------------------------------------------------- */
  316. /* Dither */
  317. #define DISP_REG_DITHER_EN (DISPSYS_DITHER0_BASE + 0x000)
  318. #define DISP_REG_DITHER_RESET (DISPSYS_DITHER0_BASE + 0x004)
  319. #define DISP_REG_DITHER_INTEN (DISPSYS_DITHER0_BASE + 0x008)
  320. #define DISP_REG_DITHER_INTSTA (DISPSYS_DITHER0_BASE + 0x00c)
  321. #define DISP_REG_DITHER_STATUS (DISPSYS_DITHER0_BASE + 0x010)
  322. #define DISP_REG_DITHER_CFG (DISPSYS_DITHER0_BASE + 0x020)
  323. #define DISP_REG_DITHER_IN_CNT (DISPSYS_DITHER0_BASE + 0x024)
  324. #define DISP_REG_DITHER_OUT_CNT (DISPSYS_DITHER0_BASE + 0x028)
  325. #define DISP_REG_DITHER_CHKSUM (DISPSYS_DITHER0_BASE + 0x02c)
  326. #define DISP_REG_DITHER_SIZE (DISPSYS_DITHER0_BASE + 0x030)
  327. #define DISP_REG_DITHER_DUMMY_REG (DISPSYS_DITHER0_BASE + 0x0c0)
  328. #define DISP_REG_DITHER_0 (DISPSYS_DITHER0_BASE + 0x100)
  329. #define DISP_REG_DITHER_5 (DISPSYS_DITHER0_BASE + 0x114)
  330. #define DISP_REG_DITHER_6 (DISPSYS_DITHER0_BASE + 0x118)
  331. #define DISP_REG_DITHER_7 (DISPSYS_DITHER0_BASE + 0x11c)
  332. #define DISP_REG_DITHER_8 (DISPSYS_DITHER0_BASE + 0x120)
  333. #define DISP_REG_DITHER_9 (DISPSYS_DITHER0_BASE + 0x124)
  334. #define DISP_REG_DITHER_10 (DISPSYS_DITHER0_BASE + 0x128)
  335. #define DISP_REG_DITHER_11 (DISPSYS_DITHER0_BASE + 0x12c)
  336. #define DISP_REG_DITHER_12 (DISPSYS_DITHER0_BASE + 0x130)
  337. #define DISP_REG_DITHER_13 (DISPSYS_DITHER0_BASE + 0x134)
  338. #define DISP_REG_DITHER_14 (DISPSYS_DITHER0_BASE + 0x138)
  339. #define DISP_REG_DITHER_15 (DISPSYS_DITHER0_BASE + 0x13c)
  340. #define DISP_REG_DITHER_16 (DISPSYS_DITHER0_BASE + 0x140)
  341. #define DISP_REG_DITHER_17 (DISPSYS_DITHER0_BASE + 0x144)
  342. #define DITHER_CFG_FLD_CHKSUM_SEL REG_FLD(2, 29)
  343. #define DITHER_CFG_FLD_CHKSUM_EN REG_FLD(1, 28)
  344. #define DITHER_CFG_FLD_DITHER_ENGINE_EN REG_FLD(1, 1)
  345. #define DITHER_CFG_FLD_RELAY_MODE REG_FLD(1, 0)
  346. #define DITHER_SIZE_FLD_HSIZE REG_FLD(13, 16)
  347. #define DITHER_SIZE_FLD_VSIZE REG_FLD(13, 0)
  348. #endif /* _DDP_REG_PQ_H_ */