smi_configuration.c 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307
  1. #include <asm/io.h>
  2. #include <linux/string.h>
  3. #include "mt_smi.h"
  4. #include "smi_configuration.h"
  5. #include "smi_common.h"
  6. #include "smi_reg.h"
  7. /* add static after all platform setting parameters moved to here */
  8. int is_default_value_saved;
  9. unsigned int default_val_smi_l1arb[SMI_LARB_NR] = { 0 };
  10. #define SMI_LARB_NUM_MAX 8
  11. #if defined(SMI_D1)
  12. unsigned int smi_dbg_disp_mask = 1;
  13. unsigned int smi_dbg_vdec_mask = 2;
  14. unsigned int smi_dbg_imgsys_mask = 4;
  15. unsigned int smi_dbg_venc_mask = 8;
  16. unsigned int smi_dbg_mjc_mask = 0;
  17. unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
  18. REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2
  19. };
  20. unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
  21. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  22. 0xc8,
  23. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  24. 0x230,
  25. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  26. 0x298,
  27. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  28. 0x2d0,
  29. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  30. };
  31. unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
  32. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  33. 0xc8,
  34. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  35. 0x230,
  36. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  37. 0x298,
  38. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  39. 0x2d0,
  40. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  41. };
  42. unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
  43. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  44. 0xc8,
  45. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  46. 0x230,
  47. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  48. 0x298,
  49. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  50. 0x2d0,
  51. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  52. };
  53. unsigned long smi_larb3_debug_offset[SMI_LARB3_DEBUG_OFFSET_NUM] = {
  54. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  55. 0xc8,
  56. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  57. 0x230,
  58. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  59. 0x298,
  60. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  61. 0x2d0,
  62. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  63. };
  64. unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
  65. 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
  66. 0x40C, 0x430, 0x440
  67. };
  68. int smi_larb_debug_offset_num[SMI_LARB_NR] = {
  69. SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM,
  70. SMI_LARB3_DEBUG_OFFSET_NUM
  71. };
  72. unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
  73. smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset,
  74. smi_larb3_debug_offset
  75. };
  76. #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 7
  77. #define SMI_VC_SETTING_NUM SMI_LARB_NR
  78. /* vc setting */
  79. struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
  80. {0x20, 0}, {0x20, 2}, {0x20, 1}, {0x20, 1}
  81. };
  82. /* init_setting */
  83. struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
  84. {0, 0}, {0, 0x1000}, {0, 0x1000}, {0, 0x1000},
  85. {0x100, 0x1b},
  86. {0x234, (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
  87. + (0x4 << 10) + (0x4 << 5) + 0x5},
  88. {0x230, 0x1f + (0x8 << 4) + (0x7 << 9)}
  89. };
  90. struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
  91. {0x200, 0x1f}, {0x204, 4}, {0x208, 6}, {0x20c, 0x1f}, {0x210, 4}, {0x214, 1}, {0x218, 1}
  92. };
  93. struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
  94. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  95. };
  96. struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
  97. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  98. 1},
  99. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  100. 1},
  101. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  102. };
  103. struct SMI_SETTING_VALUE smi_profile_setting_larb3_init[SMI_LARB3_PORT_NUM] = {
  104. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  105. 1},
  106. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
  107. };
  108. struct SMI_SETTING init_setting_config = {
  109. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  110. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  111. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  112. smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
  113. };
  114. #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
  115. /* vr_setting */
  116. struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
  117. {0, 0x11F1}, {0, 0x1000}, {0, 0x120A}, {0, 0x11F3}
  118. };
  119. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
  120. {0x200, 8}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 2}, {0x218, 4}
  121. };
  122. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
  123. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  124. };
  125. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
  126. {0x200, 1}, {0x204, 4}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  127. 1},
  128. {0x220, 1}, {0x224, 1}, {0x228, 4}, {0x22c, 1}, {0x230, 2}, {0x234, 2}, {0x238, 1}, {0x23c,
  129. 1},
  130. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  131. };
  132. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vr[SMI_LARB3_PORT_NUM] = {
  133. {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  134. 1},
  135. {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
  136. };
  137. struct SMI_SETTING vr_setting_config = {
  138. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  139. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  140. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  141. smi_profile_setting_larb3_vr}
  142. };
  143. #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
  144. /* vp_setting */
  145. struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
  146. {0, 0x1262}, {0, 0x11E9}, {0, 0x1000}, {0, 0x123D}
  147. };
  148. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
  149. {0x200, 8}, {0x204, 1}, {0x208, 2}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}
  150. };
  151. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
  152. {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  153. };
  154. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
  155. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  156. 1},
  157. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  158. 1},
  159. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  160. };
  161. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vp[SMI_LARB3_PORT_NUM] = {
  162. {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  163. 1},
  164. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
  165. };
  166. struct SMI_SETTING vp_setting_config = {
  167. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  168. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  169. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  170. smi_profile_setting_larb3_vp}
  171. };
  172. /* vr series */
  173. struct SMI_SETTING icfp_setting_config = {
  174. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  175. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  176. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  177. smi_profile_setting_larb3_vr}
  178. };
  179. struct SMI_SETTING vr_slow_setting_config = {
  180. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  181. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  182. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  183. smi_profile_setting_larb3_vr}
  184. };
  185. struct SMI_SETTING venc_setting_config = {
  186. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  187. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  188. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  189. smi_profile_setting_larb3_vr}
  190. };
  191. /* vp series */
  192. struct SMI_SETTING vpwfd_setting_config = {
  193. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  194. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  195. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  196. smi_profile_setting_larb3_vp}
  197. };
  198. struct SMI_SETTING swdec_vp_setting_config = {
  199. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  200. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  201. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  202. smi_profile_setting_larb3_vp}
  203. };
  204. /* init series */
  205. struct SMI_SETTING mm_gpu_setting_config = {
  206. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  207. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  208. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  209. smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
  210. };
  211. struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
  212. struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
  213. struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
  214. struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
  215. #elif defined(SMI_D3)
  216. unsigned int smi_dbg_disp_mask = 1;
  217. unsigned int smi_dbg_vdec_mask = 2;
  218. unsigned int smi_dbg_imgsys_mask = 4;
  219. unsigned int smi_dbg_venc_mask = 8;
  220. unsigned int smi_dbg_mjc_mask = 0;
  221. unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
  222. REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2, REG_OFFSET_SMI_L1ARB3
  223. };
  224. static unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
  225. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  226. 0xc8,
  227. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  228. 0x230,
  229. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  230. 0x298,
  231. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  232. 0x2d0,
  233. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  234. };
  235. static unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
  236. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  237. 0xc8,
  238. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  239. 0x230,
  240. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  241. 0x298,
  242. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  243. 0x2d0,
  244. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  245. };
  246. static unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
  247. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  248. 0xc8,
  249. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  250. 0x230,
  251. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  252. 0x298,
  253. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  254. 0x2d0,
  255. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  256. };
  257. static unsigned long smi_larb3_debug_offset[SMI_LARB3_DEBUG_OFFSET_NUM] = {
  258. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  259. 0xc8,
  260. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  261. 0x230,
  262. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  263. 0x298,
  264. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  265. 0x2d0,
  266. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  267. };
  268. unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
  269. 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
  270. 0x40C, 0x430, 0x440
  271. };
  272. int smi_larb_debug_offset_num[SMI_LARB_NR] = {
  273. SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM,
  274. SMI_LARB3_DEBUG_OFFSET_NUM
  275. };
  276. unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
  277. smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset,
  278. smi_larb3_debug_offset
  279. };
  280. #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 7
  281. #define SMI_VC_SETTING_NUM SMI_LARB_NR
  282. /* vc setting */
  283. struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
  284. {0x20, 0}, {0x20, 2}, {0x20, 1}, {0x20, 1}
  285. };
  286. /* init_setting */
  287. struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
  288. {0, 0}, {0, 0x1000}, {0, 0x1000}, {0, 0x1000},
  289. {0x100, 0xb},
  290. {0x234, (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
  291. + (0x4 << 10) + (0x4 << 5) + 0x5},
  292. {0x230, 0xf + (0x8 << 4) + (0x7 << 9)}
  293. };
  294. struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
  295. {0x200, 0x1f}, {0x204, 8}, {0x208, 6}, {0x20c, 0x1f}, {0x210, 4}, {0x214, 1}, {0x218, 0},
  296. {0x21c, 2},
  297. {0x220, 1}, {0x224, 3}
  298. };
  299. struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
  300. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  301. };
  302. struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
  303. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  304. 1},
  305. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  306. 1},
  307. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  308. };
  309. struct SMI_SETTING_VALUE smi_profile_setting_larb3_init[SMI_LARB3_PORT_NUM] = {
  310. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  311. 1},
  312. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
  313. };
  314. struct SMI_SETTING init_setting_config = {
  315. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  316. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  317. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  318. smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
  319. };
  320. #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
  321. /* vr_setting */
  322. struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
  323. {0, 0x1417}, {0, 0x1000}, {0, 0x11D0}, {0, 0x11F8}
  324. };
  325. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
  326. {0x200, 0xa}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1},
  327. {0x21c, 4},
  328. {0x220, 1}, {0x224, 6}
  329. };
  330. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
  331. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  332. };
  333. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
  334. {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 2}, {0x21c,
  335. 1},
  336. {0x220, 2}, {0x224, 1}, {0x228, 1}, {0x22c, 8}, {0x230, 1}, {0x234, 1}, {0x238, 2}, {0x23c,
  337. 2},
  338. {0x240, 2}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  339. };
  340. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vr[SMI_LARB3_PORT_NUM] = {
  341. {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  342. 1},
  343. {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
  344. };
  345. struct SMI_SETTING vr_setting_config = {
  346. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  347. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  348. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  349. smi_profile_setting_larb3_vr}
  350. };
  351. #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
  352. /* vp_setting */
  353. struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
  354. {0, 0x1262}, {0, 0x11E9}, {0, 0x1000}, {0, 0x123D}
  355. };
  356. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
  357. {0x200, 8}, {0x204, 1}, {0x208, 2}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}, {0x21c,
  358. 1},
  359. {0x220, 1}, {0x224, 1}
  360. };
  361. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
  362. {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  363. };
  364. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
  365. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  366. 1},
  367. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  368. 1},
  369. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  370. };
  371. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vp[SMI_LARB3_PORT_NUM] = {
  372. {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  373. 1},
  374. {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
  375. };
  376. struct SMI_SETTING vp_setting_config = {
  377. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  378. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  379. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  380. smi_profile_setting_larb3_vp}
  381. };
  382. #define SMI_PROFILE_SETTING_COMMON_VPWFD_NUM SMI_LARB_NR
  383. /* vpwfd_setting */
  384. struct SMI_SETTING_VALUE smi_profile_setting_common_vpwfd[SMI_PROFILE_SETTING_COMMON_VPWFD_NUM] = {
  385. {0, 0x14B6}, {0, 0x11EE}, {0, 0x1000}, {0, 0x11F2}
  386. };
  387. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vpwfd[SMI_LARB0_PORT_NUM] = {
  388. {0x200, 0xc}, {0x204, 8}, {0x208, 6}, {0x20c, 0xc}, {0x210, 4}, {0x214, 1}, {0x218, 1},
  389. {0x21c, 3},
  390. {0x220, 2}, {0x224, 5}
  391. };
  392. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vpwfd[SMI_LARB1_PORT_NUM] = {
  393. {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  394. };
  395. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vpwfd[SMI_LARB2_PORT_NUM] = {
  396. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  397. 1},
  398. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  399. 1},
  400. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  401. };
  402. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vpwfd[SMI_LARB3_PORT_NUM] = {
  403. {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  404. 1},
  405. {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
  406. };
  407. struct SMI_SETTING vpwfd_setting_config = {
  408. SMI_PROFILE_SETTING_COMMON_VPWFD_NUM, smi_profile_setting_common_vpwfd,
  409. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  410. {smi_profile_setting_larb0_vpwfd, smi_profile_setting_larb1_vpwfd,
  411. smi_profile_setting_larb2_vpwfd, smi_profile_setting_larb3_vpwfd}
  412. };
  413. #define SMI_PROFILE_SETTING_COMMON_ICFP_NUM SMI_LARB_NR
  414. /* icfp_setting */
  415. struct SMI_SETTING_VALUE smi_profile_setting_common_icfp[SMI_PROFILE_SETTING_COMMON_ICFP_NUM] = {
  416. {0, 0x14E2}, {0, 0x1000}, {0, 0x1310}, {0, 0x106F}
  417. };
  418. struct SMI_SETTING_VALUE smi_profile_setting_larb0_icfp[SMI_LARB0_PORT_NUM] = {
  419. {0x200, 0xe}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1},
  420. {0x21c, 2},
  421. {0x220, 2}, {0x224, 3}
  422. };
  423. struct SMI_SETTING_VALUE smi_profile_setting_larb1_icfp[SMI_LARB1_PORT_NUM] = {
  424. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  425. };
  426. struct SMI_SETTING_VALUE smi_profile_setting_larb2_icfp[SMI_LARB2_PORT_NUM] = {
  427. {0x200, 0xc}, {0x204, 4}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1},
  428. {0x21c, 1},
  429. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 3}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  430. 1},
  431. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  432. };
  433. struct SMI_SETTING_VALUE smi_profile_setting_larb3_icfp[SMI_LARB3_PORT_NUM] = {
  434. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  435. 1},
  436. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
  437. };
  438. struct SMI_SETTING icfp_setting_config = {
  439. SMI_PROFILE_SETTING_COMMON_ICFP_NUM, smi_profile_setting_common_icfp,
  440. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  441. {smi_profile_setting_larb0_icfp, smi_profile_setting_larb1_icfp,
  442. smi_profile_setting_larb2_icfp, smi_profile_setting_larb3_icfp}
  443. };
  444. /* vr series */
  445. struct SMI_SETTING vr_slow_setting_config = {
  446. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  447. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  448. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  449. smi_profile_setting_larb3_vr}
  450. };
  451. struct SMI_SETTING venc_setting_config = {
  452. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  453. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  454. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  455. smi_profile_setting_larb3_vr}
  456. };
  457. /* vp series */
  458. struct SMI_SETTING swdec_vp_setting_config = {
  459. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  460. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  461. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  462. smi_profile_setting_larb3_vp}
  463. };
  464. /* init seris */
  465. struct SMI_SETTING mm_gpu_setting_config = {
  466. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  467. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  468. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  469. smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
  470. };
  471. struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
  472. struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
  473. struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
  474. struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
  475. #elif defined(SMI_J)
  476. unsigned int smi_dbg_disp_mask = 1;
  477. unsigned int smi_dbg_vdec_mask = 2;
  478. unsigned int smi_dbg_imgsys_mask = 4;
  479. unsigned int smi_dbg_venc_mask = 8;
  480. unsigned int smi_dbg_mjc_mask = 0;
  481. unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
  482. REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2, REG_OFFSET_SMI_L1ARB3
  483. };
  484. unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
  485. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  486. 0xc8,
  487. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  488. 0x230,
  489. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  490. 0x298,
  491. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  492. 0x2d0,
  493. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  494. };
  495. unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
  496. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  497. 0xc8,
  498. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  499. 0x230,
  500. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  501. 0x298,
  502. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  503. 0x2d0,
  504. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  505. };
  506. unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
  507. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  508. 0xc8,
  509. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  510. 0x230,
  511. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  512. 0x298,
  513. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  514. 0x2d0,
  515. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  516. };
  517. unsigned long smi_larb3_debug_offset[SMI_LARB3_DEBUG_OFFSET_NUM] = {
  518. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  519. 0xc8,
  520. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  521. 0x230,
  522. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  523. 0x298,
  524. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  525. 0x2d0,
  526. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  527. };
  528. unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
  529. 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
  530. 0x40C, 0x430, 0x440
  531. };
  532. int smi_larb_debug_offset_num[SMI_LARB_NR] = {
  533. SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM,
  534. SMI_LARB3_DEBUG_OFFSET_NUM
  535. };
  536. unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
  537. smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset,
  538. smi_larb3_debug_offset
  539. };
  540. #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 7
  541. #define SMI_VC_SETTING_NUM SMI_LARB_NR
  542. #define SMI_INITSETTING_LARB0_NUM (SMI_LARB0_PORT_NUM + 4)
  543. /* vc setting */
  544. struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
  545. {0x20, 0}, {0x20, 2}, {0x20, 1}, {0x20, 1}
  546. };
  547. /* ISP HRT setting */
  548. struct SMI_SETTING_VALUE smi_isp_hrt_setting[SMI_LARB_NR] = {
  549. {0x24, 0}, {0x24, 0}, {0x24, 0}, {0x24, 0}
  550. };
  551. /* init_setting */
  552. struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
  553. {0, 0x15AE}, {0, 0x1000}, {0, 0x1000}, {0, 0x1000},
  554. {0x100, 0xb},
  555. {0x234, ((0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
  556. + (0x4 << 10) + (0x4 << 5) + 0x5)},
  557. {0x230, 0xf + (0x8 << 4) + (0x7 << 9)}
  558. };
  559. struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_INITSETTING_LARB0_NUM] = {
  560. {0x200, 31}, {0x204, 8}, {0x208, 6}, {0x20c, 31}, {0x210, 4}, {0x214, 1}, {0x218, 31},
  561. {0x21c, 31},
  562. {0x220, 2}, {0x224, 1}, {0x228, 3}, {0x100, 5}, {0x10c, 5}, {0x118, 5}, {0x11c, 5}
  563. };
  564. struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
  565. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  566. };
  567. struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
  568. {0x200, 1}, {0x204, 4}, {0x208, 2}, {0x20c, 2}, {0x210, 2}, {0x214, 1}, {0x218, 2}, {0x21c,
  569. 2},
  570. {0x220, 2}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 2}, {0x238, 1}, {0x23c,
  571. 1},
  572. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  573. };
  574. struct SMI_SETTING_VALUE smi_profile_setting_larb3_init[SMI_LARB3_PORT_NUM] = {
  575. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  576. 1},
  577. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
  578. };
  579. struct SMI_SETTING init_setting_config = {
  580. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  581. {SMI_INITSETTING_LARB0_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  582. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  583. smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
  584. };
  585. #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
  586. /* vr_setting */
  587. struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
  588. {0, 0x1393}, {0, 0x1000}, {0, 0x1205}, {0, 0x11D4}
  589. };
  590. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
  591. {0x200, 0xe}, {0x204, 8}, {0x208, 4}, {0x20c, 0xe}, {0x210, 4}, {0x214, 1}, {0x218, 0xe},
  592. {0x21c, 0xe},
  593. {0x220, 2}, {0x224, 1}, {0x228, 2}
  594. };
  595. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
  596. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  597. };
  598. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
  599. {0x200, 1}, {0x204, 4}, {0x208, 2}, {0x20c, 2}, {0x210, 2}, {0x214, 1}, {0x218, 2}, {0x21c,
  600. 2},
  601. {0x220, 2}, {0x224, 1}, {0x228, 1}, {0x22c, 2}, {0x230, 1}, {0x234, 2}, {0x238, 1}, {0x23c,
  602. 1},
  603. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  604. };
  605. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vr[SMI_LARB3_PORT_NUM] = {
  606. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  607. 1},
  608. {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 1}, {0x230, 4}
  609. };
  610. struct SMI_SETTING vr_setting_config = {
  611. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  612. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  613. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  614. smi_profile_setting_larb3_vr}
  615. };
  616. #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
  617. /* vp_setting */
  618. struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
  619. {0, 0x1510}, {0, 0x1169}, {0, 0x1000}, {0, 0x11CE}
  620. };
  621. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
  622. {0x200, 0xc}, {0x204, 8}, {0x208, 4}, {0x20c, 0xc}, {0x210, 4}, {0x214, 2}, {0x218, 0xc},
  623. {0x21c, 0xc},
  624. {0x220, 2}, {0x224, 1}, {0x228, 3}
  625. };
  626. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
  627. {0x200, 5}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  628. };
  629. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
  630. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  631. 1},
  632. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
  633. 1},
  634. {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
  635. };
  636. struct SMI_SETTING_VALUE smi_profile_setting_larb3_vp[SMI_LARB3_PORT_NUM] = {
  637. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  638. 1},
  639. {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 1}, {0x230, 4}
  640. };
  641. struct SMI_SETTING vp_setting_config = {
  642. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  643. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  644. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  645. smi_profile_setting_larb3_vp}
  646. };
  647. /* vr series */
  648. struct SMI_SETTING icfp_setting_config = {
  649. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  650. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  651. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  652. smi_profile_setting_larb3_vr}
  653. };
  654. struct SMI_SETTING vr_slow_setting_config = {
  655. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  656. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  657. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  658. smi_profile_setting_larb3_vr}
  659. };
  660. struct SMI_SETTING vss_setting_config = {
  661. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  662. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  663. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  664. smi_profile_setting_larb3_vr}
  665. };
  666. struct SMI_SETTING venc_setting_config = {
  667. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  668. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  669. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
  670. smi_profile_setting_larb3_vr}
  671. };
  672. /* vp series */
  673. struct SMI_SETTING vpwfd_setting_config = {
  674. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  675. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  676. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  677. smi_profile_setting_larb3_vp}
  678. };
  679. struct SMI_SETTING swdec_vp_setting_config = {
  680. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  681. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  682. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
  683. smi_profile_setting_larb3_vp}
  684. };
  685. /* init seris */
  686. struct SMI_SETTING mm_gpu_setting_config = {
  687. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  688. {SMI_INITSETTING_LARB0_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
  689. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  690. smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
  691. };
  692. struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
  693. struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
  694. struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
  695. #elif defined(SMI_D2)
  696. unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
  697. REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2
  698. };
  699. unsigned int smi_dbg_disp_mask = 1;
  700. unsigned int smi_dbg_vdec_mask = 2;
  701. unsigned int smi_dbg_imgsys_mask = 4;
  702. unsigned int smi_dbg_venc_mask = 4;
  703. unsigned int smi_dbg_mjc_mask = 0;
  704. unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
  705. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  706. 0xc8,
  707. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  708. 0x230,
  709. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  710. 0x298,
  711. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  712. 0x2d0,
  713. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  714. };
  715. unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
  716. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  717. 0xc8,
  718. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  719. 0x230,
  720. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  721. 0x298,
  722. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  723. 0x2d0,
  724. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  725. };
  726. unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
  727. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  728. 0xc8,
  729. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  730. 0x230,
  731. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  732. 0x298,
  733. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  734. 0x2d0,
  735. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  736. };
  737. unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
  738. 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
  739. 0x40C, 0x430, 0x440
  740. };
  741. int smi_larb_debug_offset_num[SMI_LARB_NR] = {
  742. SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM
  743. };
  744. unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
  745. smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset
  746. };
  747. #define SMI_VC_SETTING_NUM SMI_LARB_NR
  748. struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
  749. {0x20, 0}, {0x20, 2}, {0x20, 1}
  750. };
  751. #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 6
  752. /* init_setting */
  753. struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
  754. {0, 0}, {0, 0}, {0, 0},
  755. {0x100, 0xb},
  756. {0x234, (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
  757. + (0x4 << 10) + (0x4 << 5) + 0x5},
  758. {0x230, (0x7 + (0x8 << 3) + (0x7 << 8))}
  759. };
  760. struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
  761. {0x200, 0x1f}, {0x204, 0x1f}, {0x208, 4}, {0x20c, 6}, {0x210, 4}, {0x214, 1}, {0x218, 1},
  762. {0x21c, 1}
  763. };
  764. struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
  765. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  766. };
  767. struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
  768. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  769. 1},
  770. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
  771. };
  772. struct SMI_SETTING init_setting_config = {
  773. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  774. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  775. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  776. smi_profile_setting_larb2_init}
  777. };
  778. #define SMI_PROFILE_SETTING_COMMON_ICFP_NUM SMI_LARB_NR
  779. /* icfp_setting */
  780. struct SMI_SETTING_VALUE smi_profile_setting_common_icfp[SMI_PROFILE_SETTING_COMMON_ICFP_NUM] = {
  781. {0, 0x11da}, {0, 0x1000}, {0, 0x1318}
  782. };
  783. struct SMI_SETTING_VALUE smi_profile_setting_larb0_icfp[SMI_LARB0_PORT_NUM] = {
  784. {0x200, 6}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  785. 1}
  786. };
  787. struct SMI_SETTING_VALUE smi_profile_setting_larb1_icfp[SMI_LARB1_PORT_NUM] = {
  788. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  789. };
  790. struct SMI_SETTING_VALUE smi_profile_setting_larb2_icfp[SMI_LARB2_PORT_NUM] = {
  791. {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 2}, {0x214, 4}, {0x218, 1}, {0x21c,
  792. 1},
  793. {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
  794. };
  795. struct SMI_SETTING icfp_setting_config = {
  796. SMI_PROFILE_SETTING_COMMON_ICFP_NUM, smi_profile_setting_common_icfp,
  797. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  798. {smi_profile_setting_larb0_icfp, smi_profile_setting_larb1_icfp,
  799. smi_profile_setting_larb2_icfp}
  800. };
  801. #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
  802. /* vr_setting */
  803. struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
  804. {0, 0x11ff}, {0, 0x1000}, {0, 0x1361}
  805. };
  806. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
  807. {0x200, 6}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  808. 1}
  809. };
  810. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
  811. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  812. };
  813. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
  814. {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 4}, {0x218, 1}, {0x21c,
  815. 1},
  816. {0x220, 1}, {0x224, 1}, {0x228, 2}, {0x22c, 1}, {0x230, 1}
  817. };
  818. struct SMI_SETTING vr_setting_config = {
  819. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  820. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  821. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr}
  822. };
  823. #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
  824. /* vp_setting */
  825. struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
  826. {0, 0x11ff}, {0, 0}, {0, 0x1361}
  827. };
  828. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
  829. {0x200, 8}, {0x204, 8}, {0x208, 1}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}, {0x21c,
  830. 1}
  831. };
  832. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
  833. {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  834. };
  835. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
  836. {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 4}, {0x218, 1}, {0x21c,
  837. 1},
  838. {0x220, 1}, {0x224, 1}, {0x228, 2}, {0x22c, 1}, {0x230, 1}
  839. };
  840. struct SMI_SETTING vp_setting_config = {
  841. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  842. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  843. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp}
  844. };
  845. #define SMI_PROFILE_SETTING_COMMON_VPWFD_NUM SMI_LARB_NR
  846. /* vfd_setting */
  847. struct SMI_SETTING_VALUE smi_profile_setting_common_vpwfd[SMI_PROFILE_SETTING_COMMON_VPWFD_NUM] = {
  848. {0, 0x11ff}, {0, 0}, {0, 0x1361}
  849. };
  850. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vpwfd[SMI_LARB0_PORT_NUM] = {
  851. {0x200, 8}, {0x204, 8}, {0x208, 1}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}, {0x21c,
  852. 1}
  853. };
  854. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vpwfd[SMI_LARB1_PORT_NUM] = {
  855. {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  856. };
  857. struct SMI_SETTING_VALUE smi_profile_setting_larb2_vpwfd[SMI_LARB2_PORT_NUM] = {
  858. {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 4}, {0x218, 1}, {0x21c,
  859. 1},
  860. {0x220, 1}, {0x224, 1}, {0x228, 2}, {0x22c, 1}, {0x230, 1}
  861. };
  862. struct SMI_SETTING vpwfd_setting_config = {
  863. SMI_PROFILE_SETTING_COMMON_VPWFD_NUM, smi_profile_setting_common_vpwfd,
  864. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  865. {smi_profile_setting_larb0_vpwfd, smi_profile_setting_larb1_vpwfd,
  866. smi_profile_setting_larb2_vpwfd}
  867. };
  868. /* vp series */
  869. struct SMI_SETTING swdec_vp_setting_config = {
  870. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  871. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  872. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp}
  873. };
  874. /* vr series */
  875. struct SMI_SETTING vr_slow_setting_config = {
  876. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  877. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  878. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr}
  879. };
  880. struct SMI_SETTING venc_setting_config = {
  881. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  882. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  883. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr}
  884. };
  885. /* init series */
  886. struct SMI_SETTING mm_gpu_setting_config = {
  887. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  888. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
  889. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
  890. smi_profile_setting_larb2_init}
  891. };
  892. struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
  893. struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
  894. struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
  895. struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
  896. #elif defined(SMI_R)
  897. unsigned int smi_dbg_disp_mask = 1;
  898. unsigned int smi_dbg_vdec_mask = 0;
  899. unsigned int smi_dbg_imgsys_mask = 2;
  900. unsigned int smi_dbg_venc_mask = 2;
  901. unsigned int smi_dbg_mjc_mask = 0;
  902. unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
  903. REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1
  904. };
  905. unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
  906. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  907. 0xc8,
  908. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  909. 0x230,
  910. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  911. 0x298,
  912. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  913. 0x2d0,
  914. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  915. };
  916. unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
  917. 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
  918. 0xc8,
  919. 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
  920. 0x230,
  921. 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
  922. 0x298,
  923. 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
  924. 0x2d0,
  925. 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
  926. };
  927. unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
  928. 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
  929. 0x40C, 0x430, 0x440
  930. };
  931. int smi_larb_debug_offset_num[SMI_LARB_NR] = {
  932. SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM
  933. };
  934. unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
  935. smi_larb0_debug_offset, smi_larb1_debug_offset
  936. };
  937. #define SMI_VC_SETTING_NUM SMI_LARB_NR
  938. struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
  939. {0x20, 0}, {0x20, 2}
  940. };
  941. #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 5
  942. /* init_setting */
  943. struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
  944. {0, 0x14cb}, {0, 0x1001},
  945. {0x100, 0xb},
  946. {0x234,
  947. (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
  948. + (0x4 << 10) + (0x4 << 5) + 0x5},
  949. {0x230, (0x3 + (0x8 << 2) + (0x7 << 7))}
  950. };
  951. struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
  952. {0x200, 0x1c}, {0x204, 4}, {0x208, 6}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
  953. };
  954. struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
  955. {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
  956. 1},
  957. {0x220, 1}, {0x224, 1}, {0x228, 1}
  958. };
  959. struct SMI_SETTING init_setting_config = {
  960. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  961. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  962. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init}
  963. };
  964. #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
  965. /* vr_setting */
  966. struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
  967. {0, 0x122b}, {0, 0x142c}
  968. };
  969. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
  970. {0x200, 0xa}, {0x204, 1}, {0x208, 1}, {0x20c, 4}, {0x210, 2}, {0x214, 2}, {0x218, 1}
  971. };
  972. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
  973. {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 4}, {0x214, 1}, {0x218, 1}, {0x21c,
  974. 1},
  975. {0x220, 3}, {0x224, 2}, {0x228, 2}
  976. };
  977. struct SMI_SETTING vr_setting_config = {
  978. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  979. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  980. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
  981. };
  982. #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
  983. /* vp_setting */
  984. struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
  985. {0, 0x11ff}, {0, 0}
  986. };
  987. struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
  988. {0x200, 8}, {0x204, 1}, {0x208, 1}, {0x20c, 3}, {0x210, 1}, {0x214, 4}, {0x218, 1}
  989. };
  990. struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
  991. {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 4}, {0x214, 1}, {0x218, 1}, {0x21c,
  992. 1},
  993. {0x220, 3}, {0x224, 2}, {0x228, 2}
  994. };
  995. struct SMI_SETTING vp_setting_config = {
  996. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  997. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  998. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp}
  999. };
  1000. /* vp series */
  1001. struct SMI_SETTING swdec_vp_setting_config = {
  1002. SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
  1003. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  1004. {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp}
  1005. };
  1006. /* vr series */
  1007. struct SMI_SETTING vr_slow_setting_config = {
  1008. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  1009. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  1010. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
  1011. };
  1012. struct SMI_SETTING icfp_setting_config = {
  1013. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  1014. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  1015. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
  1016. };
  1017. struct SMI_SETTING venc_setting_config = {
  1018. SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
  1019. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  1020. {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
  1021. };
  1022. /* init series */
  1023. struct SMI_SETTING mm_gpu_setting_config = {
  1024. SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
  1025. {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
  1026. {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init}
  1027. };
  1028. struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
  1029. struct SMI_SETTING vpwfd_setting_config = { 0, NULL, {0}, {0} };
  1030. struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
  1031. struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
  1032. struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
  1033. #endif
  1034. struct SMI_PROFILE_CONFIG smi_profile_config[SMI_PROFILE_CONFIG_NUM] = {
  1035. {SMI_BWC_SCEN_NORMAL, &init_setting_config},
  1036. {SMI_BWC_SCEN_VR, &vr_setting_config},
  1037. {SMI_BWC_SCEN_SWDEC_VP, &swdec_vp_setting_config},
  1038. {SMI_BWC_SCEN_VP, &vp_setting_config},
  1039. {SMI_BWC_SCEN_VR_SLOW, &vr_slow_setting_config},
  1040. {SMI_BWC_SCEN_MM_GPU, &mm_gpu_setting_config},
  1041. {SMI_BWC_SCEN_WFD, &vpwfd_setting_config},
  1042. {SMI_BWC_SCEN_VENC, &venc_setting_config},
  1043. {SMI_BWC_SCEN_ICFP, &icfp_setting_config},
  1044. {SMI_BWC_SCEN_UI_IDLE, &ui_idle_setting_config},
  1045. {SMI_BWC_SCEN_VSS, &vss_setting_config},
  1046. {SMI_BWC_SCEN_FORCE_MMDVFS, &init_setting_config},
  1047. {SMI_BWC_SCEN_HDMI, &hdmi_setting_config},
  1048. {SMI_BWC_SCEN_HDMI4K, &hdmi4k_setting_config}
  1049. };
  1050. void smi_set_nonconstant_variable(void)
  1051. {
  1052. #if defined(SMI_D2)
  1053. int i = 0;
  1054. for (i = 0; i < SMI_LARB_NR; ++i) {
  1055. smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
  1056. smi_profile_setting_common_init[i].value = default_val_smi_l1arb[i];
  1057. smi_profile_setting_common_icfp[i].offset = smi_common_l1arb_offset[i];
  1058. smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
  1059. smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
  1060. smi_profile_setting_common_vpwfd[i].offset = smi_common_l1arb_offset[i];
  1061. }
  1062. smi_profile_setting_common_vp[1].value = default_val_smi_l1arb[1];
  1063. smi_profile_setting_common_vpwfd[1].value = default_val_smi_l1arb[1];
  1064. #elif defined(SMI_D1)
  1065. int i = 0;
  1066. M4U_WriteReg32(LARB2_BASE, 0x24, (M4U_ReadReg32(LARB2_BASE, 0x24) & 0xf7ffffff));
  1067. for (i = 0; i < SMI_LARB_NR; ++i) {
  1068. smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
  1069. smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
  1070. smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
  1071. }
  1072. smi_profile_setting_common_init[0].value = default_val_smi_l1arb[0];
  1073. #elif defined(SMI_D3)
  1074. int i = 0;
  1075. M4U_WriteReg32(LARB2_BASE, 0x24, (M4U_ReadReg32(LARB2_BASE, 0x24) & 0xf7ffffff));
  1076. for (i = 0; i < SMI_LARB_NR; ++i) {
  1077. smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
  1078. smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
  1079. smi_profile_setting_common_icfp[i].offset = smi_common_l1arb_offset[i];
  1080. smi_profile_setting_common_vpwfd[i].offset = smi_common_l1arb_offset[i];
  1081. smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
  1082. }
  1083. smi_profile_setting_common_init[0].value = default_val_smi_l1arb[0];
  1084. #elif defined(SMI_J)
  1085. unsigned int smi_val = 0;
  1086. int i = 0;
  1087. smi_val = (M4U_ReadReg32(LARB0_BASE, 0x24) & 0xf7ffffff);
  1088. for (i = 0; i < SMI_LARB_NR; ++i)
  1089. smi_isp_hrt_setting[i].value = smi_val;
  1090. for (i = 0; i < SMI_LARB_NR; ++i) {
  1091. smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
  1092. smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
  1093. smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
  1094. }
  1095. #elif defined(SMI_R)
  1096. int i = 0;
  1097. for (i = 0; i < SMI_LARB_NR; ++i) {
  1098. smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
  1099. smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
  1100. smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
  1101. }
  1102. smi_profile_setting_common_vp[1].offset = smi_common_l1arb_offset[1];
  1103. #endif
  1104. }