s6e63m0_gamma.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /* linux/drivers/video/samsung/s6e63m0_brightness.h
  2. *
  3. * Gamma level definitions.
  4. *
  5. * Copyright (c) 2009 Samsung Electronics
  6. * InKi Dae <inki.dae@samsung.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef _S6E63M0_BRIGHTNESS_H
  13. #define _S6E63M0_BRIGHTNESS_H
  14. #define MAX_GAMMA_LEVEL 11
  15. #define GAMMA_TABLE_COUNT 21
  16. /* gamma value: 2.2 */
  17. static const unsigned int s6e63m0_22_300[] = {
  18. 0x18, 0x08, 0x24, 0x5f, 0x50, 0x2d, 0xB6,
  19. 0xB9, 0xA7, 0xAd, 0xB1, 0x9f, 0xbe, 0xC0,
  20. 0xB5, 0x00, 0xa0, 0x00, 0xa4, 0x00, 0xdb
  21. };
  22. static const unsigned int s6e63m0_22_280[] = {
  23. 0x18, 0x08, 0x24, 0x64, 0x56, 0x33, 0xB6,
  24. 0xBA, 0xA8, 0xAC, 0xB1, 0x9D, 0xC1, 0xC1,
  25. 0xB7, 0x00, 0x9C, 0x00, 0x9F, 0x00, 0xD6
  26. };
  27. static const unsigned int s6e63m0_22_260[] = {
  28. 0x18, 0x08, 0x24, 0x66, 0x58, 0x34, 0xB6,
  29. 0xBA, 0xA7, 0xAF, 0xB3, 0xA0, 0xC1, 0xC2,
  30. 0xB7, 0x00, 0x97, 0x00, 0x9A, 0x00, 0xD1
  31. };
  32. static const unsigned int s6e63m0_22_240[] = {
  33. 0x18, 0x08, 0x24, 0x62, 0x54, 0x30, 0xB9,
  34. 0xBB, 0xA9, 0xB0, 0xB3, 0xA1, 0xC1, 0xC3,
  35. 0xB7, 0x00, 0x91, 0x00, 0x95, 0x00, 0xDA
  36. };
  37. static const unsigned int s6e63m0_22_220[] = {
  38. 0x18, 0x08, 0x24, 0x63, 0x53, 0x31, 0xB8,
  39. 0xBC, 0xA9, 0xB0, 0xB5, 0xA2, 0xC4, 0xC4,
  40. 0xB8, 0x00, 0x8B, 0x00, 0x8E, 0x00, 0xC2
  41. };
  42. static const unsigned int s6e63m0_22_200[] = {
  43. 0x18, 0x08, 0x24, 0x66, 0x55, 0x34, 0xBA,
  44. 0xBD, 0xAB, 0xB1, 0xB5, 0xA3, 0xC5, 0xC6,
  45. 0xB9, 0x00, 0x85, 0x00, 0x88, 0x00, 0xBA
  46. };
  47. static const unsigned int s6e63m0_22_170[] = {
  48. 0x18, 0x08, 0x24, 0x69, 0x54, 0x37, 0xBB,
  49. 0xBE, 0xAC, 0xB4, 0xB7, 0xA6, 0xC7, 0xC8,
  50. 0xBC, 0x00, 0x7B, 0x00, 0x7E, 0x00, 0xAB
  51. };
  52. static const unsigned int s6e63m0_22_140[] = {
  53. 0x18, 0x08, 0x24, 0x6C, 0x54, 0x3A, 0xBC,
  54. 0xBF, 0xAC, 0xB7, 0xBB, 0xA9, 0xC9, 0xC9,
  55. 0xBE, 0x00, 0x71, 0x00, 0x73, 0x00, 0x9E
  56. };
  57. static const unsigned int s6e63m0_22_110[] = {
  58. 0x18, 0x08, 0x24, 0x70, 0x51, 0x3E, 0xBF,
  59. 0xC1, 0xAF, 0xB9, 0xBC, 0xAB, 0xCC, 0xCC,
  60. 0xC2, 0x00, 0x65, 0x00, 0x67, 0x00, 0x8D
  61. };
  62. static const unsigned int s6e63m0_22_90[] = {
  63. 0x18, 0x08, 0x24, 0x73, 0x4A, 0x3D, 0xC0,
  64. 0xC2, 0xB1, 0xBB, 0xBE, 0xAC, 0xCE, 0xCF,
  65. 0xC5, 0x00, 0x5D, 0x00, 0x5E, 0x00, 0x82
  66. };
  67. static const unsigned int s6e63m0_22_30[] = {
  68. 0x18, 0x08, 0x24, 0x78, 0xEC, 0x3D, 0xC8,
  69. 0xC2, 0xB6, 0xC4, 0xC7, 0xB6, 0xD5, 0xD7,
  70. 0xCC, 0x00, 0x39, 0x00, 0x36, 0x00, 0x51
  71. };
  72. /* gamma value: 1.9 */
  73. static const unsigned int s6e63m0_19_300[] = {
  74. 0x18, 0x08, 0x24, 0x61, 0x5F, 0x39, 0xBA,
  75. 0xBD, 0xAD, 0xB1, 0xB6, 0xA5, 0xC4, 0xC5,
  76. 0xBC, 0x00, 0xA0, 0x00, 0xA4, 0x00, 0xDB
  77. };
  78. static const unsigned int s6e63m0_19_280[] = {
  79. 0x18, 0x08, 0x24, 0x61, 0x60, 0x39, 0xBB,
  80. 0xBE, 0xAD, 0xB2, 0xB6, 0xA6, 0xC5, 0xC7,
  81. 0xBD, 0x00, 0x9B, 0x00, 0x9E, 0x00, 0xD5
  82. };
  83. static const unsigned int s6e63m0_19_260[] = {
  84. 0x18, 0x08, 0x24, 0x63, 0x61, 0x3B, 0xBA,
  85. 0xBE, 0xAC, 0xB3, 0xB8, 0xA7, 0xC6, 0xC8,
  86. 0xBD, 0x00, 0x96, 0x00, 0x98, 0x00, 0xCF
  87. };
  88. static const unsigned int s6e63m0_19_240[] = {
  89. 0x18, 0x08, 0x24, 0x67, 0x64, 0x3F, 0xBB,
  90. 0xBE, 0xAD, 0xB3, 0xB9, 0xA7, 0xC8, 0xC9,
  91. 0xBE, 0x00, 0x90, 0x00, 0x92, 0x00, 0xC8
  92. };
  93. static const unsigned int s6e63m0_19_220[] = {
  94. 0x18, 0x08, 0x24, 0x68, 0x64, 0x40, 0xBC,
  95. 0xBF, 0xAF, 0xB4, 0xBA, 0xA9, 0xC8, 0xCA,
  96. 0xBE, 0x00, 0x8B, 0x00, 0x8C, 0x00, 0xC0
  97. };
  98. static const unsigned int s6e63m0_19_200[] = {
  99. 0x18, 0x08, 0x24, 0x68, 0x64, 0x3F, 0xBE,
  100. 0xC0, 0xB0, 0xB6, 0xBB, 0xAB, 0xC8, 0xCB,
  101. 0xBF, 0x00, 0x85, 0x00, 0x86, 0x00, 0xB8
  102. };
  103. static const unsigned int s6e63m0_19_170[] = {
  104. 0x18, 0x08, 0x24, 0x69, 0x64, 0x40, 0xBF,
  105. 0xC1, 0xB0, 0xB9, 0xBE, 0xAD, 0xCB, 0xCD,
  106. 0xC2, 0x00, 0x7A, 0x00, 0x7B, 0x00, 0xAA
  107. };
  108. static const unsigned int s6e63m0_19_140[] = {
  109. 0x18, 0x08, 0x24, 0x6E, 0x65, 0x45, 0xC0,
  110. 0xC3, 0xB2, 0xBA, 0xBE, 0xAE, 0xCD, 0xD0,
  111. 0xC4, 0x00, 0x70, 0x00, 0x70, 0x00, 0x9C
  112. };
  113. static const unsigned int s6e63m0_19_110[] = {
  114. 0x18, 0x08, 0x24, 0x6F, 0x65, 0x46, 0xC2,
  115. 0xC4, 0xB3, 0xBF, 0xC2, 0xB2, 0xCF, 0xD1,
  116. 0xC6, 0x00, 0x64, 0x00, 0x64, 0x00, 0x8D
  117. };
  118. static const unsigned int s6e63m0_19_90[] = {
  119. 0x18, 0x08, 0x24, 0x74, 0x60, 0x4A, 0xC3,
  120. 0xC6, 0xB5, 0xBF, 0xC3, 0xB2, 0xD2, 0xD3,
  121. 0xC8, 0x00, 0x5B, 0x00, 0x5B, 0x00, 0x81
  122. };
  123. static const unsigned int s6e63m0_19_30[] = {
  124. 0x18, 0x08, 0x24, 0x84, 0x45, 0x4F, 0xCA,
  125. 0xCB, 0xBC, 0xC9, 0xCB, 0xBC, 0xDA, 0xDA,
  126. 0xD0, 0x00, 0x35, 0x00, 0x34, 0x00, 0x4E
  127. };
  128. /* gamma value: 1.7 */
  129. static const unsigned int s6e63m0_17_300[] = {
  130. 0x18, 0x08, 0x24, 0x70, 0x70, 0x4F, 0xBF,
  131. 0xC2, 0xB2, 0xB8, 0xBC, 0xAC, 0xCB, 0xCD,
  132. 0xC3, 0x00, 0xA0, 0x00, 0xA4, 0x00, 0xDB
  133. };
  134. static const unsigned int s6e63m0_17_280[] = {
  135. 0x18, 0x08, 0x24, 0x71, 0x71, 0x50, 0xBF,
  136. 0xC2, 0xB2, 0xBA, 0xBE, 0xAE, 0xCB, 0xCD,
  137. 0xC3, 0x00, 0x9C, 0x00, 0x9F, 0x00, 0xD6
  138. };
  139. static const unsigned int s6e63m0_17_260[] = {
  140. 0x18, 0x08, 0x24, 0x72, 0x72, 0x50, 0xC0,
  141. 0xC3, 0xB4, 0xB9, 0xBE, 0xAE, 0xCC, 0xCF,
  142. 0xC4, 0x00, 0x97, 0x00, 0x9A, 0x00, 0xD1
  143. };
  144. static const unsigned int s6e63m0_17_240[] = {
  145. 0x18, 0x08, 0x24, 0x71, 0x72, 0x4F, 0xC2,
  146. 0xC4, 0xB5, 0xBB, 0xBF, 0xB0, 0xCC, 0xCF,
  147. 0xC3, 0x00, 0x91, 0x00, 0x95, 0x00, 0xCA
  148. };
  149. static const unsigned int s6e63m0_17_220[] = {
  150. 0x18, 0x08, 0x24, 0x71, 0x73, 0x4F, 0xC2,
  151. 0xC5, 0xB5, 0xBD, 0xC0, 0xB2, 0xCD, 0xD1,
  152. 0xC5, 0x00, 0x8B, 0x00, 0x8E, 0x00, 0xC2
  153. };
  154. static const unsigned int s6e63m0_17_200[] = {
  155. 0x18, 0x08, 0x24, 0x72, 0x75, 0x51, 0xC2,
  156. 0xC6, 0xB5, 0xBF, 0xC1, 0xB3, 0xCE, 0xD1,
  157. 0xC6, 0x00, 0x85, 0x00, 0x88, 0x00, 0xBA
  158. };
  159. static const unsigned int s6e63m0_17_170[] = {
  160. 0x18, 0x08, 0x24, 0x75, 0x77, 0x54, 0xC3,
  161. 0xC7, 0xB7, 0xC0, 0xC3, 0xB4, 0xD1, 0xD3,
  162. 0xC9, 0x00, 0x7B, 0x00, 0x7E, 0x00, 0xAB
  163. };
  164. static const unsigned int s6e63m0_17_140[] = {
  165. 0x18, 0x08, 0x24, 0x7B, 0x77, 0x58, 0xC3,
  166. 0xC8, 0xB8, 0xC2, 0xC6, 0xB6, 0xD3, 0xD4,
  167. 0xCA, 0x00, 0x71, 0x00, 0x73, 0x00, 0x9E
  168. };
  169. static const unsigned int s6e63m0_17_110[] = {
  170. 0x18, 0x08, 0x24, 0x81, 0x7B, 0x5D, 0xC6,
  171. 0xCA, 0xBB, 0xC3, 0xC7, 0xB8, 0xD6, 0xD8,
  172. 0xCD, 0x00, 0x65, 0x00, 0x67, 0x00, 0x8D
  173. };
  174. static const unsigned int s6e63m0_17_90[] = {
  175. 0x18, 0x08, 0x24, 0x82, 0x7A, 0x5B, 0xC8,
  176. 0xCB, 0xBD, 0xC5, 0xCA, 0xBA, 0xD6, 0xD8,
  177. 0xCE, 0x00, 0x5D, 0x00, 0x5E, 0x00, 0x82
  178. };
  179. static const unsigned int s6e63m0_17_30[] = {
  180. 0x18, 0x08, 0x24, 0x8F, 0x73, 0x63, 0xD1,
  181. 0xD0, 0xC5, 0xCC, 0xD1, 0xC2, 0xDE, 0xE0,
  182. 0xD6, 0x00, 0x39, 0x00, 0x36, 0x00, 0x51
  183. };
  184. struct s6e63m0_gamma {
  185. unsigned int *gamma_22_table[MAX_GAMMA_LEVEL];
  186. unsigned int *gamma_19_table[MAX_GAMMA_LEVEL];
  187. unsigned int *gamma_17_table[MAX_GAMMA_LEVEL];
  188. };
  189. static struct s6e63m0_gamma gamma_table = {
  190. .gamma_22_table[0] = (unsigned int *)&s6e63m0_22_30,
  191. .gamma_22_table[1] = (unsigned int *)&s6e63m0_22_90,
  192. .gamma_22_table[2] = (unsigned int *)&s6e63m0_22_110,
  193. .gamma_22_table[3] = (unsigned int *)&s6e63m0_22_140,
  194. .gamma_22_table[4] = (unsigned int *)&s6e63m0_22_170,
  195. .gamma_22_table[5] = (unsigned int *)&s6e63m0_22_200,
  196. .gamma_22_table[6] = (unsigned int *)&s6e63m0_22_220,
  197. .gamma_22_table[7] = (unsigned int *)&s6e63m0_22_240,
  198. .gamma_22_table[8] = (unsigned int *)&s6e63m0_22_260,
  199. .gamma_22_table[9] = (unsigned int *)&s6e63m0_22_280,
  200. .gamma_22_table[10] = (unsigned int *)&s6e63m0_22_300,
  201. .gamma_19_table[0] = (unsigned int *)&s6e63m0_19_30,
  202. .gamma_19_table[1] = (unsigned int *)&s6e63m0_19_90,
  203. .gamma_19_table[2] = (unsigned int *)&s6e63m0_19_110,
  204. .gamma_19_table[3] = (unsigned int *)&s6e63m0_19_140,
  205. .gamma_19_table[4] = (unsigned int *)&s6e63m0_19_170,
  206. .gamma_19_table[5] = (unsigned int *)&s6e63m0_19_200,
  207. .gamma_19_table[6] = (unsigned int *)&s6e63m0_19_220,
  208. .gamma_19_table[7] = (unsigned int *)&s6e63m0_19_240,
  209. .gamma_19_table[8] = (unsigned int *)&s6e63m0_19_260,
  210. .gamma_19_table[9] = (unsigned int *)&s6e63m0_19_280,
  211. .gamma_19_table[10] = (unsigned int *)&s6e63m0_19_300,
  212. .gamma_17_table[0] = (unsigned int *)&s6e63m0_17_30,
  213. .gamma_17_table[1] = (unsigned int *)&s6e63m0_17_90,
  214. .gamma_17_table[2] = (unsigned int *)&s6e63m0_17_110,
  215. .gamma_17_table[3] = (unsigned int *)&s6e63m0_17_140,
  216. .gamma_17_table[4] = (unsigned int *)&s6e63m0_17_170,
  217. .gamma_17_table[5] = (unsigned int *)&s6e63m0_17_200,
  218. .gamma_17_table[6] = (unsigned int *)&s6e63m0_17_220,
  219. .gamma_17_table[7] = (unsigned int *)&s6e63m0_17_240,
  220. .gamma_17_table[8] = (unsigned int *)&s6e63m0_17_260,
  221. .gamma_17_table[9] = (unsigned int *)&s6e63m0_17_280,
  222. .gamma_17_table[10] = (unsigned int *)&s6e63m0_17_300,
  223. };
  224. #endif