mdp_scale_tables.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. /* drivers/video/msm_fb/mdp_scale_tables.c
  2. *
  3. * Copyright (C) 2007 QUALCOMM Incorporated
  4. * Copyright (C) 2007 Google Incorporated
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #include "mdp_scale_tables.h"
  16. #include "mdp_hw.h"
  17. struct mdp_table_entry mdp_upscale_table[] = {
  18. { 0x5fffc, 0x0 },
  19. { 0x50200, 0x7fc00000 },
  20. { 0x5fffc, 0xff80000d },
  21. { 0x50204, 0x7ec003f9 },
  22. { 0x5fffc, 0xfec0001c },
  23. { 0x50208, 0x7d4003f3 },
  24. { 0x5fffc, 0xfe40002b },
  25. { 0x5020c, 0x7b8003ed },
  26. { 0x5fffc, 0xfd80003c },
  27. { 0x50210, 0x794003e8 },
  28. { 0x5fffc, 0xfcc0004d },
  29. { 0x50214, 0x76c003e4 },
  30. { 0x5fffc, 0xfc40005f },
  31. { 0x50218, 0x73c003e0 },
  32. { 0x5fffc, 0xfb800071 },
  33. { 0x5021c, 0x708003de },
  34. { 0x5fffc, 0xfac00085 },
  35. { 0x50220, 0x6d0003db },
  36. { 0x5fffc, 0xfa000098 },
  37. { 0x50224, 0x698003d9 },
  38. { 0x5fffc, 0xf98000ac },
  39. { 0x50228, 0x654003d8 },
  40. { 0x5fffc, 0xf8c000c1 },
  41. { 0x5022c, 0x610003d7 },
  42. { 0x5fffc, 0xf84000d5 },
  43. { 0x50230, 0x5c8003d7 },
  44. { 0x5fffc, 0xf7c000e9 },
  45. { 0x50234, 0x580003d7 },
  46. { 0x5fffc, 0xf74000fd },
  47. { 0x50238, 0x534003d8 },
  48. { 0x5fffc, 0xf6c00112 },
  49. { 0x5023c, 0x4e8003d8 },
  50. { 0x5fffc, 0xf6800126 },
  51. { 0x50240, 0x494003da },
  52. { 0x5fffc, 0xf600013a },
  53. { 0x50244, 0x448003db },
  54. { 0x5fffc, 0xf600014d },
  55. { 0x50248, 0x3f4003dd },
  56. { 0x5fffc, 0xf5c00160 },
  57. { 0x5024c, 0x3a4003df },
  58. { 0x5fffc, 0xf5c00172 },
  59. { 0x50250, 0x354003e1 },
  60. { 0x5fffc, 0xf5c00184 },
  61. { 0x50254, 0x304003e3 },
  62. { 0x5fffc, 0xf6000195 },
  63. { 0x50258, 0x2b0003e6 },
  64. { 0x5fffc, 0xf64001a6 },
  65. { 0x5025c, 0x260003e8 },
  66. { 0x5fffc, 0xf6c001b4 },
  67. { 0x50260, 0x214003eb },
  68. { 0x5fffc, 0xf78001c2 },
  69. { 0x50264, 0x1c4003ee },
  70. { 0x5fffc, 0xf80001cf },
  71. { 0x50268, 0x17c003f1 },
  72. { 0x5fffc, 0xf90001db },
  73. { 0x5026c, 0x134003f3 },
  74. { 0x5fffc, 0xfa0001e5 },
  75. { 0x50270, 0xf0003f6 },
  76. { 0x5fffc, 0xfb4001ee },
  77. { 0x50274, 0xac003f9 },
  78. { 0x5fffc, 0xfcc001f5 },
  79. { 0x50278, 0x70003fb },
  80. { 0x5fffc, 0xfe4001fb },
  81. { 0x5027c, 0x34003fe },
  82. };
  83. static struct mdp_table_entry mdp_downscale_x_table_PT2TOPT4[] = {
  84. { 0x5fffc, 0x740008c },
  85. { 0x50280, 0x33800088 },
  86. { 0x5fffc, 0x800008e },
  87. { 0x50284, 0x33400084 },
  88. { 0x5fffc, 0x8400092 },
  89. { 0x50288, 0x33000080 },
  90. { 0x5fffc, 0x9000094 },
  91. { 0x5028c, 0x3300007b },
  92. { 0x5fffc, 0x9c00098 },
  93. { 0x50290, 0x32400077 },
  94. { 0x5fffc, 0xa40009b },
  95. { 0x50294, 0x32000073 },
  96. { 0x5fffc, 0xb00009d },
  97. { 0x50298, 0x31c0006f },
  98. { 0x5fffc, 0xbc000a0 },
  99. { 0x5029c, 0x3140006b },
  100. { 0x5fffc, 0xc8000a2 },
  101. { 0x502a0, 0x31000067 },
  102. { 0x5fffc, 0xd8000a5 },
  103. { 0x502a4, 0x30800062 },
  104. { 0x5fffc, 0xe4000a8 },
  105. { 0x502a8, 0x2fc0005f },
  106. { 0x5fffc, 0xec000aa },
  107. { 0x502ac, 0x2fc0005b },
  108. { 0x5fffc, 0xf8000ad },
  109. { 0x502b0, 0x2f400057 },
  110. { 0x5fffc, 0x108000b0 },
  111. { 0x502b4, 0x2e400054 },
  112. { 0x5fffc, 0x114000b2 },
  113. { 0x502b8, 0x2e000050 },
  114. { 0x5fffc, 0x124000b4 },
  115. { 0x502bc, 0x2d80004c },
  116. { 0x5fffc, 0x130000b6 },
  117. { 0x502c0, 0x2d000049 },
  118. { 0x5fffc, 0x140000b8 },
  119. { 0x502c4, 0x2c800045 },
  120. { 0x5fffc, 0x150000b9 },
  121. { 0x502c8, 0x2c000042 },
  122. { 0x5fffc, 0x15c000bd },
  123. { 0x502cc, 0x2b40003e },
  124. { 0x5fffc, 0x16c000bf },
  125. { 0x502d0, 0x2a80003b },
  126. { 0x5fffc, 0x17c000bf },
  127. { 0x502d4, 0x2a000039 },
  128. { 0x5fffc, 0x188000c2 },
  129. { 0x502d8, 0x29400036 },
  130. { 0x5fffc, 0x19c000c4 },
  131. { 0x502dc, 0x28800032 },
  132. { 0x5fffc, 0x1ac000c5 },
  133. { 0x502e0, 0x2800002f },
  134. { 0x5fffc, 0x1bc000c7 },
  135. { 0x502e4, 0x2740002c },
  136. { 0x5fffc, 0x1cc000c8 },
  137. { 0x502e8, 0x26c00029 },
  138. { 0x5fffc, 0x1dc000c9 },
  139. { 0x502ec, 0x26000027 },
  140. { 0x5fffc, 0x1ec000cc },
  141. { 0x502f0, 0x25000024 },
  142. { 0x5fffc, 0x200000cc },
  143. { 0x502f4, 0x24800021 },
  144. { 0x5fffc, 0x210000cd },
  145. { 0x502f8, 0x23800020 },
  146. { 0x5fffc, 0x220000ce },
  147. { 0x502fc, 0x2300001d },
  148. };
  149. static struct mdp_table_entry mdp_downscale_x_table_PT4TOPT6[] = {
  150. { 0x5fffc, 0x740008c },
  151. { 0x50280, 0x33800088 },
  152. { 0x5fffc, 0x800008e },
  153. { 0x50284, 0x33400084 },
  154. { 0x5fffc, 0x8400092 },
  155. { 0x50288, 0x33000080 },
  156. { 0x5fffc, 0x9000094 },
  157. { 0x5028c, 0x3300007b },
  158. { 0x5fffc, 0x9c00098 },
  159. { 0x50290, 0x32400077 },
  160. { 0x5fffc, 0xa40009b },
  161. { 0x50294, 0x32000073 },
  162. { 0x5fffc, 0xb00009d },
  163. { 0x50298, 0x31c0006f },
  164. { 0x5fffc, 0xbc000a0 },
  165. { 0x5029c, 0x3140006b },
  166. { 0x5fffc, 0xc8000a2 },
  167. { 0x502a0, 0x31000067 },
  168. { 0x5fffc, 0xd8000a5 },
  169. { 0x502a4, 0x30800062 },
  170. { 0x5fffc, 0xe4000a8 },
  171. { 0x502a8, 0x2fc0005f },
  172. { 0x5fffc, 0xec000aa },
  173. { 0x502ac, 0x2fc0005b },
  174. { 0x5fffc, 0xf8000ad },
  175. { 0x502b0, 0x2f400057 },
  176. { 0x5fffc, 0x108000b0 },
  177. { 0x502b4, 0x2e400054 },
  178. { 0x5fffc, 0x114000b2 },
  179. { 0x502b8, 0x2e000050 },
  180. { 0x5fffc, 0x124000b4 },
  181. { 0x502bc, 0x2d80004c },
  182. { 0x5fffc, 0x130000b6 },
  183. { 0x502c0, 0x2d000049 },
  184. { 0x5fffc, 0x140000b8 },
  185. { 0x502c4, 0x2c800045 },
  186. { 0x5fffc, 0x150000b9 },
  187. { 0x502c8, 0x2c000042 },
  188. { 0x5fffc, 0x15c000bd },
  189. { 0x502cc, 0x2b40003e },
  190. { 0x5fffc, 0x16c000bf },
  191. { 0x502d0, 0x2a80003b },
  192. { 0x5fffc, 0x17c000bf },
  193. { 0x502d4, 0x2a000039 },
  194. { 0x5fffc, 0x188000c2 },
  195. { 0x502d8, 0x29400036 },
  196. { 0x5fffc, 0x19c000c4 },
  197. { 0x502dc, 0x28800032 },
  198. { 0x5fffc, 0x1ac000c5 },
  199. { 0x502e0, 0x2800002f },
  200. { 0x5fffc, 0x1bc000c7 },
  201. { 0x502e4, 0x2740002c },
  202. { 0x5fffc, 0x1cc000c8 },
  203. { 0x502e8, 0x26c00029 },
  204. { 0x5fffc, 0x1dc000c9 },
  205. { 0x502ec, 0x26000027 },
  206. { 0x5fffc, 0x1ec000cc },
  207. { 0x502f0, 0x25000024 },
  208. { 0x5fffc, 0x200000cc },
  209. { 0x502f4, 0x24800021 },
  210. { 0x5fffc, 0x210000cd },
  211. { 0x502f8, 0x23800020 },
  212. { 0x5fffc, 0x220000ce },
  213. { 0x502fc, 0x2300001d },
  214. };
  215. static struct mdp_table_entry mdp_downscale_x_table_PT6TOPT8[] = {
  216. { 0x5fffc, 0xfe000070 },
  217. { 0x50280, 0x4bc00068 },
  218. { 0x5fffc, 0xfe000078 },
  219. { 0x50284, 0x4bc00060 },
  220. { 0x5fffc, 0xfe000080 },
  221. { 0x50288, 0x4b800059 },
  222. { 0x5fffc, 0xfe000089 },
  223. { 0x5028c, 0x4b000052 },
  224. { 0x5fffc, 0xfe400091 },
  225. { 0x50290, 0x4a80004b },
  226. { 0x5fffc, 0xfe40009a },
  227. { 0x50294, 0x4a000044 },
  228. { 0x5fffc, 0xfe8000a3 },
  229. { 0x50298, 0x4940003d },
  230. { 0x5fffc, 0xfec000ac },
  231. { 0x5029c, 0x48400037 },
  232. { 0x5fffc, 0xff0000b4 },
  233. { 0x502a0, 0x47800031 },
  234. { 0x5fffc, 0xff8000bd },
  235. { 0x502a4, 0x4640002b },
  236. { 0x5fffc, 0xc5 },
  237. { 0x502a8, 0x45000026 },
  238. { 0x5fffc, 0x8000ce },
  239. { 0x502ac, 0x43800021 },
  240. { 0x5fffc, 0x10000d6 },
  241. { 0x502b0, 0x4240001c },
  242. { 0x5fffc, 0x18000df },
  243. { 0x502b4, 0x40800018 },
  244. { 0x5fffc, 0x24000e6 },
  245. { 0x502b8, 0x3f000014 },
  246. { 0x5fffc, 0x30000ee },
  247. { 0x502bc, 0x3d400010 },
  248. { 0x5fffc, 0x40000f5 },
  249. { 0x502c0, 0x3b80000c },
  250. { 0x5fffc, 0x50000fc },
  251. { 0x502c4, 0x39800009 },
  252. { 0x5fffc, 0x6000102 },
  253. { 0x502c8, 0x37c00006 },
  254. { 0x5fffc, 0x7000109 },
  255. { 0x502cc, 0x35800004 },
  256. { 0x5fffc, 0x840010e },
  257. { 0x502d0, 0x33800002 },
  258. { 0x5fffc, 0x9800114 },
  259. { 0x502d4, 0x31400000 },
  260. { 0x5fffc, 0xac00119 },
  261. { 0x502d8, 0x2f4003fe },
  262. { 0x5fffc, 0xc40011e },
  263. { 0x502dc, 0x2d0003fc },
  264. { 0x5fffc, 0xdc00121 },
  265. { 0x502e0, 0x2b0003fb },
  266. { 0x5fffc, 0xf400125 },
  267. { 0x502e4, 0x28c003fa },
  268. { 0x5fffc, 0x11000128 },
  269. { 0x502e8, 0x268003f9 },
  270. { 0x5fffc, 0x12c0012a },
  271. { 0x502ec, 0x244003f9 },
  272. { 0x5fffc, 0x1480012c },
  273. { 0x502f0, 0x224003f8 },
  274. { 0x5fffc, 0x1640012e },
  275. { 0x502f4, 0x200003f8 },
  276. { 0x5fffc, 0x1800012f },
  277. { 0x502f8, 0x1e0003f8 },
  278. { 0x5fffc, 0x1a00012f },
  279. { 0x502fc, 0x1c0003f8 },
  280. };
  281. static struct mdp_table_entry mdp_downscale_x_table_PT8TO1[] = {
  282. { 0x5fffc, 0x0 },
  283. { 0x50280, 0x7fc00000 },
  284. { 0x5fffc, 0xff80000d },
  285. { 0x50284, 0x7ec003f9 },
  286. { 0x5fffc, 0xfec0001c },
  287. { 0x50288, 0x7d4003f3 },
  288. { 0x5fffc, 0xfe40002b },
  289. { 0x5028c, 0x7b8003ed },
  290. { 0x5fffc, 0xfd80003c },
  291. { 0x50290, 0x794003e8 },
  292. { 0x5fffc, 0xfcc0004d },
  293. { 0x50294, 0x76c003e4 },
  294. { 0x5fffc, 0xfc40005f },
  295. { 0x50298, 0x73c003e0 },
  296. { 0x5fffc, 0xfb800071 },
  297. { 0x5029c, 0x708003de },
  298. { 0x5fffc, 0xfac00085 },
  299. { 0x502a0, 0x6d0003db },
  300. { 0x5fffc, 0xfa000098 },
  301. { 0x502a4, 0x698003d9 },
  302. { 0x5fffc, 0xf98000ac },
  303. { 0x502a8, 0x654003d8 },
  304. { 0x5fffc, 0xf8c000c1 },
  305. { 0x502ac, 0x610003d7 },
  306. { 0x5fffc, 0xf84000d5 },
  307. { 0x502b0, 0x5c8003d7 },
  308. { 0x5fffc, 0xf7c000e9 },
  309. { 0x502b4, 0x580003d7 },
  310. { 0x5fffc, 0xf74000fd },
  311. { 0x502b8, 0x534003d8 },
  312. { 0x5fffc, 0xf6c00112 },
  313. { 0x502bc, 0x4e8003d8 },
  314. { 0x5fffc, 0xf6800126 },
  315. { 0x502c0, 0x494003da },
  316. { 0x5fffc, 0xf600013a },
  317. { 0x502c4, 0x448003db },
  318. { 0x5fffc, 0xf600014d },
  319. { 0x502c8, 0x3f4003dd },
  320. { 0x5fffc, 0xf5c00160 },
  321. { 0x502cc, 0x3a4003df },
  322. { 0x5fffc, 0xf5c00172 },
  323. { 0x502d0, 0x354003e1 },
  324. { 0x5fffc, 0xf5c00184 },
  325. { 0x502d4, 0x304003e3 },
  326. { 0x5fffc, 0xf6000195 },
  327. { 0x502d8, 0x2b0003e6 },
  328. { 0x5fffc, 0xf64001a6 },
  329. { 0x502dc, 0x260003e8 },
  330. { 0x5fffc, 0xf6c001b4 },
  331. { 0x502e0, 0x214003eb },
  332. { 0x5fffc, 0xf78001c2 },
  333. { 0x502e4, 0x1c4003ee },
  334. { 0x5fffc, 0xf80001cf },
  335. { 0x502e8, 0x17c003f1 },
  336. { 0x5fffc, 0xf90001db },
  337. { 0x502ec, 0x134003f3 },
  338. { 0x5fffc, 0xfa0001e5 },
  339. { 0x502f0, 0xf0003f6 },
  340. { 0x5fffc, 0xfb4001ee },
  341. { 0x502f4, 0xac003f9 },
  342. { 0x5fffc, 0xfcc001f5 },
  343. { 0x502f8, 0x70003fb },
  344. { 0x5fffc, 0xfe4001fb },
  345. { 0x502fc, 0x34003fe },
  346. };
  347. struct mdp_table_entry *mdp_downscale_x_table[MDP_DOWNSCALE_MAX] = {
  348. [MDP_DOWNSCALE_PT2TOPT4] = mdp_downscale_x_table_PT2TOPT4,
  349. [MDP_DOWNSCALE_PT4TOPT6] = mdp_downscale_x_table_PT4TOPT6,
  350. [MDP_DOWNSCALE_PT6TOPT8] = mdp_downscale_x_table_PT6TOPT8,
  351. [MDP_DOWNSCALE_PT8TO1] = mdp_downscale_x_table_PT8TO1,
  352. };
  353. static struct mdp_table_entry mdp_downscale_y_table_PT2TOPT4[] = {
  354. { 0x5fffc, 0x740008c },
  355. { 0x50300, 0x33800088 },
  356. { 0x5fffc, 0x800008e },
  357. { 0x50304, 0x33400084 },
  358. { 0x5fffc, 0x8400092 },
  359. { 0x50308, 0x33000080 },
  360. { 0x5fffc, 0x9000094 },
  361. { 0x5030c, 0x3300007b },
  362. { 0x5fffc, 0x9c00098 },
  363. { 0x50310, 0x32400077 },
  364. { 0x5fffc, 0xa40009b },
  365. { 0x50314, 0x32000073 },
  366. { 0x5fffc, 0xb00009d },
  367. { 0x50318, 0x31c0006f },
  368. { 0x5fffc, 0xbc000a0 },
  369. { 0x5031c, 0x3140006b },
  370. { 0x5fffc, 0xc8000a2 },
  371. { 0x50320, 0x31000067 },
  372. { 0x5fffc, 0xd8000a5 },
  373. { 0x50324, 0x30800062 },
  374. { 0x5fffc, 0xe4000a8 },
  375. { 0x50328, 0x2fc0005f },
  376. { 0x5fffc, 0xec000aa },
  377. { 0x5032c, 0x2fc0005b },
  378. { 0x5fffc, 0xf8000ad },
  379. { 0x50330, 0x2f400057 },
  380. { 0x5fffc, 0x108000b0 },
  381. { 0x50334, 0x2e400054 },
  382. { 0x5fffc, 0x114000b2 },
  383. { 0x50338, 0x2e000050 },
  384. { 0x5fffc, 0x124000b4 },
  385. { 0x5033c, 0x2d80004c },
  386. { 0x5fffc, 0x130000b6 },
  387. { 0x50340, 0x2d000049 },
  388. { 0x5fffc, 0x140000b8 },
  389. { 0x50344, 0x2c800045 },
  390. { 0x5fffc, 0x150000b9 },
  391. { 0x50348, 0x2c000042 },
  392. { 0x5fffc, 0x15c000bd },
  393. { 0x5034c, 0x2b40003e },
  394. { 0x5fffc, 0x16c000bf },
  395. { 0x50350, 0x2a80003b },
  396. { 0x5fffc, 0x17c000bf },
  397. { 0x50354, 0x2a000039 },
  398. { 0x5fffc, 0x188000c2 },
  399. { 0x50358, 0x29400036 },
  400. { 0x5fffc, 0x19c000c4 },
  401. { 0x5035c, 0x28800032 },
  402. { 0x5fffc, 0x1ac000c5 },
  403. { 0x50360, 0x2800002f },
  404. { 0x5fffc, 0x1bc000c7 },
  405. { 0x50364, 0x2740002c },
  406. { 0x5fffc, 0x1cc000c8 },
  407. { 0x50368, 0x26c00029 },
  408. { 0x5fffc, 0x1dc000c9 },
  409. { 0x5036c, 0x26000027 },
  410. { 0x5fffc, 0x1ec000cc },
  411. { 0x50370, 0x25000024 },
  412. { 0x5fffc, 0x200000cc },
  413. { 0x50374, 0x24800021 },
  414. { 0x5fffc, 0x210000cd },
  415. { 0x50378, 0x23800020 },
  416. { 0x5fffc, 0x220000ce },
  417. { 0x5037c, 0x2300001d },
  418. };
  419. static struct mdp_table_entry mdp_downscale_y_table_PT4TOPT6[] = {
  420. { 0x5fffc, 0x740008c },
  421. { 0x50300, 0x33800088 },
  422. { 0x5fffc, 0x800008e },
  423. { 0x50304, 0x33400084 },
  424. { 0x5fffc, 0x8400092 },
  425. { 0x50308, 0x33000080 },
  426. { 0x5fffc, 0x9000094 },
  427. { 0x5030c, 0x3300007b },
  428. { 0x5fffc, 0x9c00098 },
  429. { 0x50310, 0x32400077 },
  430. { 0x5fffc, 0xa40009b },
  431. { 0x50314, 0x32000073 },
  432. { 0x5fffc, 0xb00009d },
  433. { 0x50318, 0x31c0006f },
  434. { 0x5fffc, 0xbc000a0 },
  435. { 0x5031c, 0x3140006b },
  436. { 0x5fffc, 0xc8000a2 },
  437. { 0x50320, 0x31000067 },
  438. { 0x5fffc, 0xd8000a5 },
  439. { 0x50324, 0x30800062 },
  440. { 0x5fffc, 0xe4000a8 },
  441. { 0x50328, 0x2fc0005f },
  442. { 0x5fffc, 0xec000aa },
  443. { 0x5032c, 0x2fc0005b },
  444. { 0x5fffc, 0xf8000ad },
  445. { 0x50330, 0x2f400057 },
  446. { 0x5fffc, 0x108000b0 },
  447. { 0x50334, 0x2e400054 },
  448. { 0x5fffc, 0x114000b2 },
  449. { 0x50338, 0x2e000050 },
  450. { 0x5fffc, 0x124000b4 },
  451. { 0x5033c, 0x2d80004c },
  452. { 0x5fffc, 0x130000b6 },
  453. { 0x50340, 0x2d000049 },
  454. { 0x5fffc, 0x140000b8 },
  455. { 0x50344, 0x2c800045 },
  456. { 0x5fffc, 0x150000b9 },
  457. { 0x50348, 0x2c000042 },
  458. { 0x5fffc, 0x15c000bd },
  459. { 0x5034c, 0x2b40003e },
  460. { 0x5fffc, 0x16c000bf },
  461. { 0x50350, 0x2a80003b },
  462. { 0x5fffc, 0x17c000bf },
  463. { 0x50354, 0x2a000039 },
  464. { 0x5fffc, 0x188000c2 },
  465. { 0x50358, 0x29400036 },
  466. { 0x5fffc, 0x19c000c4 },
  467. { 0x5035c, 0x28800032 },
  468. { 0x5fffc, 0x1ac000c5 },
  469. { 0x50360, 0x2800002f },
  470. { 0x5fffc, 0x1bc000c7 },
  471. { 0x50364, 0x2740002c },
  472. { 0x5fffc, 0x1cc000c8 },
  473. { 0x50368, 0x26c00029 },
  474. { 0x5fffc, 0x1dc000c9 },
  475. { 0x5036c, 0x26000027 },
  476. { 0x5fffc, 0x1ec000cc },
  477. { 0x50370, 0x25000024 },
  478. { 0x5fffc, 0x200000cc },
  479. { 0x50374, 0x24800021 },
  480. { 0x5fffc, 0x210000cd },
  481. { 0x50378, 0x23800020 },
  482. { 0x5fffc, 0x220000ce },
  483. { 0x5037c, 0x2300001d },
  484. };
  485. static struct mdp_table_entry mdp_downscale_y_table_PT6TOPT8[] = {
  486. { 0x5fffc, 0xfe000070 },
  487. { 0x50300, 0x4bc00068 },
  488. { 0x5fffc, 0xfe000078 },
  489. { 0x50304, 0x4bc00060 },
  490. { 0x5fffc, 0xfe000080 },
  491. { 0x50308, 0x4b800059 },
  492. { 0x5fffc, 0xfe000089 },
  493. { 0x5030c, 0x4b000052 },
  494. { 0x5fffc, 0xfe400091 },
  495. { 0x50310, 0x4a80004b },
  496. { 0x5fffc, 0xfe40009a },
  497. { 0x50314, 0x4a000044 },
  498. { 0x5fffc, 0xfe8000a3 },
  499. { 0x50318, 0x4940003d },
  500. { 0x5fffc, 0xfec000ac },
  501. { 0x5031c, 0x48400037 },
  502. { 0x5fffc, 0xff0000b4 },
  503. { 0x50320, 0x47800031 },
  504. { 0x5fffc, 0xff8000bd },
  505. { 0x50324, 0x4640002b },
  506. { 0x5fffc, 0xc5 },
  507. { 0x50328, 0x45000026 },
  508. { 0x5fffc, 0x8000ce },
  509. { 0x5032c, 0x43800021 },
  510. { 0x5fffc, 0x10000d6 },
  511. { 0x50330, 0x4240001c },
  512. { 0x5fffc, 0x18000df },
  513. { 0x50334, 0x40800018 },
  514. { 0x5fffc, 0x24000e6 },
  515. { 0x50338, 0x3f000014 },
  516. { 0x5fffc, 0x30000ee },
  517. { 0x5033c, 0x3d400010 },
  518. { 0x5fffc, 0x40000f5 },
  519. { 0x50340, 0x3b80000c },
  520. { 0x5fffc, 0x50000fc },
  521. { 0x50344, 0x39800009 },
  522. { 0x5fffc, 0x6000102 },
  523. { 0x50348, 0x37c00006 },
  524. { 0x5fffc, 0x7000109 },
  525. { 0x5034c, 0x35800004 },
  526. { 0x5fffc, 0x840010e },
  527. { 0x50350, 0x33800002 },
  528. { 0x5fffc, 0x9800114 },
  529. { 0x50354, 0x31400000 },
  530. { 0x5fffc, 0xac00119 },
  531. { 0x50358, 0x2f4003fe },
  532. { 0x5fffc, 0xc40011e },
  533. { 0x5035c, 0x2d0003fc },
  534. { 0x5fffc, 0xdc00121 },
  535. { 0x50360, 0x2b0003fb },
  536. { 0x5fffc, 0xf400125 },
  537. { 0x50364, 0x28c003fa },
  538. { 0x5fffc, 0x11000128 },
  539. { 0x50368, 0x268003f9 },
  540. { 0x5fffc, 0x12c0012a },
  541. { 0x5036c, 0x244003f9 },
  542. { 0x5fffc, 0x1480012c },
  543. { 0x50370, 0x224003f8 },
  544. { 0x5fffc, 0x1640012e },
  545. { 0x50374, 0x200003f8 },
  546. { 0x5fffc, 0x1800012f },
  547. { 0x50378, 0x1e0003f8 },
  548. { 0x5fffc, 0x1a00012f },
  549. { 0x5037c, 0x1c0003f8 },
  550. };
  551. static struct mdp_table_entry mdp_downscale_y_table_PT8TO1[] = {
  552. { 0x5fffc, 0x0 },
  553. { 0x50300, 0x7fc00000 },
  554. { 0x5fffc, 0xff80000d },
  555. { 0x50304, 0x7ec003f9 },
  556. { 0x5fffc, 0xfec0001c },
  557. { 0x50308, 0x7d4003f3 },
  558. { 0x5fffc, 0xfe40002b },
  559. { 0x5030c, 0x7b8003ed },
  560. { 0x5fffc, 0xfd80003c },
  561. { 0x50310, 0x794003e8 },
  562. { 0x5fffc, 0xfcc0004d },
  563. { 0x50314, 0x76c003e4 },
  564. { 0x5fffc, 0xfc40005f },
  565. { 0x50318, 0x73c003e0 },
  566. { 0x5fffc, 0xfb800071 },
  567. { 0x5031c, 0x708003de },
  568. { 0x5fffc, 0xfac00085 },
  569. { 0x50320, 0x6d0003db },
  570. { 0x5fffc, 0xfa000098 },
  571. { 0x50324, 0x698003d9 },
  572. { 0x5fffc, 0xf98000ac },
  573. { 0x50328, 0x654003d8 },
  574. { 0x5fffc, 0xf8c000c1 },
  575. { 0x5032c, 0x610003d7 },
  576. { 0x5fffc, 0xf84000d5 },
  577. { 0x50330, 0x5c8003d7 },
  578. { 0x5fffc, 0xf7c000e9 },
  579. { 0x50334, 0x580003d7 },
  580. { 0x5fffc, 0xf74000fd },
  581. { 0x50338, 0x534003d8 },
  582. { 0x5fffc, 0xf6c00112 },
  583. { 0x5033c, 0x4e8003d8 },
  584. { 0x5fffc, 0xf6800126 },
  585. { 0x50340, 0x494003da },
  586. { 0x5fffc, 0xf600013a },
  587. { 0x50344, 0x448003db },
  588. { 0x5fffc, 0xf600014d },
  589. { 0x50348, 0x3f4003dd },
  590. { 0x5fffc, 0xf5c00160 },
  591. { 0x5034c, 0x3a4003df },
  592. { 0x5fffc, 0xf5c00172 },
  593. { 0x50350, 0x354003e1 },
  594. { 0x5fffc, 0xf5c00184 },
  595. { 0x50354, 0x304003e3 },
  596. { 0x5fffc, 0xf6000195 },
  597. { 0x50358, 0x2b0003e6 },
  598. { 0x5fffc, 0xf64001a6 },
  599. { 0x5035c, 0x260003e8 },
  600. { 0x5fffc, 0xf6c001b4 },
  601. { 0x50360, 0x214003eb },
  602. { 0x5fffc, 0xf78001c2 },
  603. { 0x50364, 0x1c4003ee },
  604. { 0x5fffc, 0xf80001cf },
  605. { 0x50368, 0x17c003f1 },
  606. { 0x5fffc, 0xf90001db },
  607. { 0x5036c, 0x134003f3 },
  608. { 0x5fffc, 0xfa0001e5 },
  609. { 0x50370, 0xf0003f6 },
  610. { 0x5fffc, 0xfb4001ee },
  611. { 0x50374, 0xac003f9 },
  612. { 0x5fffc, 0xfcc001f5 },
  613. { 0x50378, 0x70003fb },
  614. { 0x5fffc, 0xfe4001fb },
  615. { 0x5037c, 0x34003fe },
  616. };
  617. struct mdp_table_entry *mdp_downscale_y_table[MDP_DOWNSCALE_MAX] = {
  618. [MDP_DOWNSCALE_PT2TOPT4] = mdp_downscale_y_table_PT2TOPT4,
  619. [MDP_DOWNSCALE_PT4TOPT6] = mdp_downscale_y_table_PT4TOPT6,
  620. [MDP_DOWNSCALE_PT6TOPT8] = mdp_downscale_y_table_PT6TOPT8,
  621. [MDP_DOWNSCALE_PT8TO1] = mdp_downscale_y_table_PT8TO1,
  622. };
  623. struct mdp_table_entry mdp_gaussian_blur_table[] = {
  624. /* max variance */
  625. { 0x5fffc, 0x20000080 },
  626. { 0x50280, 0x20000080 },
  627. { 0x5fffc, 0x20000080 },
  628. { 0x50284, 0x20000080 },
  629. { 0x5fffc, 0x20000080 },
  630. { 0x50288, 0x20000080 },
  631. { 0x5fffc, 0x20000080 },
  632. { 0x5028c, 0x20000080 },
  633. { 0x5fffc, 0x20000080 },
  634. { 0x50290, 0x20000080 },
  635. { 0x5fffc, 0x20000080 },
  636. { 0x50294, 0x20000080 },
  637. { 0x5fffc, 0x20000080 },
  638. { 0x50298, 0x20000080 },
  639. { 0x5fffc, 0x20000080 },
  640. { 0x5029c, 0x20000080 },
  641. { 0x5fffc, 0x20000080 },
  642. { 0x502a0, 0x20000080 },
  643. { 0x5fffc, 0x20000080 },
  644. { 0x502a4, 0x20000080 },
  645. { 0x5fffc, 0x20000080 },
  646. { 0x502a8, 0x20000080 },
  647. { 0x5fffc, 0x20000080 },
  648. { 0x502ac, 0x20000080 },
  649. { 0x5fffc, 0x20000080 },
  650. { 0x502b0, 0x20000080 },
  651. { 0x5fffc, 0x20000080 },
  652. { 0x502b4, 0x20000080 },
  653. { 0x5fffc, 0x20000080 },
  654. { 0x502b8, 0x20000080 },
  655. { 0x5fffc, 0x20000080 },
  656. { 0x502bc, 0x20000080 },
  657. { 0x5fffc, 0x20000080 },
  658. { 0x502c0, 0x20000080 },
  659. { 0x5fffc, 0x20000080 },
  660. { 0x502c4, 0x20000080 },
  661. { 0x5fffc, 0x20000080 },
  662. { 0x502c8, 0x20000080 },
  663. { 0x5fffc, 0x20000080 },
  664. { 0x502cc, 0x20000080 },
  665. { 0x5fffc, 0x20000080 },
  666. { 0x502d0, 0x20000080 },
  667. { 0x5fffc, 0x20000080 },
  668. { 0x502d4, 0x20000080 },
  669. { 0x5fffc, 0x20000080 },
  670. { 0x502d8, 0x20000080 },
  671. { 0x5fffc, 0x20000080 },
  672. { 0x502dc, 0x20000080 },
  673. { 0x5fffc, 0x20000080 },
  674. { 0x502e0, 0x20000080 },
  675. { 0x5fffc, 0x20000080 },
  676. { 0x502e4, 0x20000080 },
  677. { 0x5fffc, 0x20000080 },
  678. { 0x502e8, 0x20000080 },
  679. { 0x5fffc, 0x20000080 },
  680. { 0x502ec, 0x20000080 },
  681. { 0x5fffc, 0x20000080 },
  682. { 0x502f0, 0x20000080 },
  683. { 0x5fffc, 0x20000080 },
  684. { 0x502f4, 0x20000080 },
  685. { 0x5fffc, 0x20000080 },
  686. { 0x502f8, 0x20000080 },
  687. { 0x5fffc, 0x20000080 },
  688. { 0x502fc, 0x20000080 },
  689. { 0x5fffc, 0x20000080 },
  690. { 0x50300, 0x20000080 },
  691. { 0x5fffc, 0x20000080 },
  692. { 0x50304, 0x20000080 },
  693. { 0x5fffc, 0x20000080 },
  694. { 0x50308, 0x20000080 },
  695. { 0x5fffc, 0x20000080 },
  696. { 0x5030c, 0x20000080 },
  697. { 0x5fffc, 0x20000080 },
  698. { 0x50310, 0x20000080 },
  699. { 0x5fffc, 0x20000080 },
  700. { 0x50314, 0x20000080 },
  701. { 0x5fffc, 0x20000080 },
  702. { 0x50318, 0x20000080 },
  703. { 0x5fffc, 0x20000080 },
  704. { 0x5031c, 0x20000080 },
  705. { 0x5fffc, 0x20000080 },
  706. { 0x50320, 0x20000080 },
  707. { 0x5fffc, 0x20000080 },
  708. { 0x50324, 0x20000080 },
  709. { 0x5fffc, 0x20000080 },
  710. { 0x50328, 0x20000080 },
  711. { 0x5fffc, 0x20000080 },
  712. { 0x5032c, 0x20000080 },
  713. { 0x5fffc, 0x20000080 },
  714. { 0x50330, 0x20000080 },
  715. { 0x5fffc, 0x20000080 },
  716. { 0x50334, 0x20000080 },
  717. { 0x5fffc, 0x20000080 },
  718. { 0x50338, 0x20000080 },
  719. { 0x5fffc, 0x20000080 },
  720. { 0x5033c, 0x20000080 },
  721. { 0x5fffc, 0x20000080 },
  722. { 0x50340, 0x20000080 },
  723. { 0x5fffc, 0x20000080 },
  724. { 0x50344, 0x20000080 },
  725. { 0x5fffc, 0x20000080 },
  726. { 0x50348, 0x20000080 },
  727. { 0x5fffc, 0x20000080 },
  728. { 0x5034c, 0x20000080 },
  729. { 0x5fffc, 0x20000080 },
  730. { 0x50350, 0x20000080 },
  731. { 0x5fffc, 0x20000080 },
  732. { 0x50354, 0x20000080 },
  733. { 0x5fffc, 0x20000080 },
  734. { 0x50358, 0x20000080 },
  735. { 0x5fffc, 0x20000080 },
  736. { 0x5035c, 0x20000080 },
  737. { 0x5fffc, 0x20000080 },
  738. { 0x50360, 0x20000080 },
  739. { 0x5fffc, 0x20000080 },
  740. { 0x50364, 0x20000080 },
  741. { 0x5fffc, 0x20000080 },
  742. { 0x50368, 0x20000080 },
  743. { 0x5fffc, 0x20000080 },
  744. { 0x5036c, 0x20000080 },
  745. { 0x5fffc, 0x20000080 },
  746. { 0x50370, 0x20000080 },
  747. { 0x5fffc, 0x20000080 },
  748. { 0x50374, 0x20000080 },
  749. { 0x5fffc, 0x20000080 },
  750. { 0x50378, 0x20000080 },
  751. { 0x5fffc, 0x20000080 },
  752. { 0x5037c, 0x20000080 },
  753. };