ld9040_gamma.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /*
  2. * Gamma level definitions.
  3. *
  4. * Copyright (c) 2011 Samsung Electronics
  5. * InKi Dae <inki.dae@samsung.com>
  6. * Donghwa Lee <dh09.lee@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 _LD9040_BRIGHTNESS_H
  13. #define _LD9040_BRIGHTNESS_H
  14. #define MAX_GAMMA_LEVEL 25
  15. #define GAMMA_TABLE_COUNT 21
  16. /* gamma value: 2.2 */
  17. static const unsigned int ld9040_22_300[] = {
  18. 0x00, 0xa7, 0xb4, 0xae, 0xbf, 0x00, 0x91,
  19. 0x00, 0xb2, 0xb4, 0xaa, 0xbb, 0x00, 0xac,
  20. 0x00, 0xb3, 0xb1, 0xaa, 0xbc, 0x00, 0xb3
  21. };
  22. static const unsigned int ld9040_22_290[] = {
  23. 0x00, 0xa9, 0xb7, 0xae, 0xbd, 0x00, 0x89,
  24. 0x00, 0xb7, 0xb6, 0xa8, 0xba, 0x00, 0xa4,
  25. 0x00, 0xb1, 0xb4, 0xaa, 0xbb, 0x00, 0xaa
  26. };
  27. static const unsigned int ld9040_22_280[] = {
  28. 0x00, 0xa9, 0xb6, 0xad, 0xbf, 0x00, 0x86,
  29. 0x00, 0xb8, 0xb5, 0xa8, 0xbc, 0x00, 0xa0,
  30. 0x00, 0xb3, 0xb3, 0xa9, 0xbc, 0x00, 0xa7
  31. };
  32. static const unsigned int ld9040_22_270[] = {
  33. 0x00, 0xa8, 0xb8, 0xae, 0xbe, 0x00, 0x84,
  34. 0x00, 0xb9, 0xb7, 0xa8, 0xbc, 0x00, 0x9d,
  35. 0x00, 0xb2, 0xb5, 0xaa, 0xbc, 0x00, 0xa4
  36. };
  37. static const unsigned int ld9040_22_260[] = {
  38. 0x00, 0xa4, 0xb8, 0xb0, 0xbf, 0x00, 0x80,
  39. 0x00, 0xb8, 0xb6, 0xaa, 0xbc, 0x00, 0x9a,
  40. 0x00, 0xb0, 0xb5, 0xab, 0xbd, 0x00, 0xa0
  41. };
  42. static const unsigned int ld9040_22_250[] = {
  43. 0x00, 0xa4, 0xb9, 0xaf, 0xc1, 0x00, 0x7d,
  44. 0x00, 0xb9, 0xb6, 0xaa, 0xbb, 0x00, 0x97,
  45. 0x00, 0xb1, 0xb5, 0xaa, 0xbf, 0x00, 0x9d
  46. };
  47. static const unsigned int ld9040_22_240[] = {
  48. 0x00, 0xa2, 0xb9, 0xaf, 0xc2, 0x00, 0x7a,
  49. 0x00, 0xb9, 0xb7, 0xaa, 0xbd, 0x00, 0x94,
  50. 0x00, 0xb0, 0xb5, 0xab, 0xbf, 0x00, 0x9a
  51. };
  52. static const unsigned int ld9040_22_230[] = {
  53. 0x00, 0xa0, 0xb9, 0xaf, 0xc3, 0x00, 0x77,
  54. 0x00, 0xb9, 0xb7, 0xab, 0xbe, 0x00, 0x90,
  55. 0x00, 0xb0, 0xb6, 0xab, 0xbf, 0x00, 0x97
  56. };
  57. static const unsigned int ld9040_22_220[] = {
  58. 0x00, 0x9e, 0xba, 0xb0, 0xc2, 0x00, 0x75,
  59. 0x00, 0xb9, 0xb8, 0xab, 0xbe, 0x00, 0x8e,
  60. 0x00, 0xb0, 0xb6, 0xac, 0xbf, 0x00, 0x94
  61. };
  62. static const unsigned int ld9040_22_210[] = {
  63. 0x00, 0x9c, 0xb9, 0xb0, 0xc4, 0x00, 0x72,
  64. 0x00, 0xb8, 0xb8, 0xac, 0xbf, 0x00, 0x8a,
  65. 0x00, 0xb0, 0xb6, 0xac, 0xc0, 0x00, 0x91
  66. };
  67. static const unsigned int ld9040_22_200[] = {
  68. 0x00, 0x9a, 0xba, 0xb1, 0xc4, 0x00, 0x6f,
  69. 0x00, 0xb8, 0xb8, 0xad, 0xc0, 0x00, 0x86,
  70. 0x00, 0xb0, 0xb7, 0xad, 0xc0, 0x00, 0x8d
  71. };
  72. static const unsigned int ld9040_22_190[] = {
  73. 0x00, 0x97, 0xba, 0xb2, 0xc5, 0x00, 0x6c,
  74. 0x00, 0xb8, 0xb8, 0xae, 0xc1, 0x00, 0x82,
  75. 0x00, 0xb0, 0xb6, 0xae, 0xc2, 0x00, 0x89
  76. };
  77. static const unsigned int ld9040_22_180[] = {
  78. 0x00, 0x93, 0xba, 0xb3, 0xc5, 0x00, 0x69,
  79. 0x00, 0xb8, 0xb9, 0xae, 0xc1, 0x00, 0x7f,
  80. 0x00, 0xb0, 0xb6, 0xae, 0xc3, 0x00, 0x85
  81. };
  82. static const unsigned int ld9040_22_170[] = {
  83. 0x00, 0x8b, 0xb9, 0xb3, 0xc7, 0x00, 0x65,
  84. 0x00, 0xb7, 0xb8, 0xaf, 0xc3, 0x00, 0x7a,
  85. 0x00, 0x80, 0xb6, 0xae, 0xc4, 0x00, 0x81
  86. };
  87. static const unsigned int ld9040_22_160[] = {
  88. 0x00, 0x89, 0xba, 0xb3, 0xc8, 0x00, 0x62,
  89. 0x00, 0xb6, 0xba, 0xaf, 0xc3, 0x00, 0x76,
  90. 0x00, 0xaf, 0xb7, 0xae, 0xc4, 0x00, 0x7e
  91. };
  92. static const unsigned int ld9040_22_150[] = {
  93. 0x00, 0x82, 0xba, 0xb4, 0xc7, 0x00, 0x5f,
  94. 0x00, 0xb5, 0xba, 0xb0, 0xc3, 0x00, 0x72,
  95. 0x00, 0xae, 0xb8, 0xb0, 0xc3, 0x00, 0x7a
  96. };
  97. static const unsigned int ld9040_22_140[] = {
  98. 0x00, 0x7b, 0xbb, 0xb4, 0xc8, 0x00, 0x5b,
  99. 0x00, 0xb5, 0xba, 0xb1, 0xc4, 0x00, 0x6e,
  100. 0x00, 0xae, 0xb9, 0xb0, 0xc5, 0x00, 0x75
  101. };
  102. static const unsigned int ld9040_22_130[] = {
  103. 0x00, 0x71, 0xbb, 0xb5, 0xc8, 0x00, 0x57,
  104. 0x00, 0xb5, 0xbb, 0xb0, 0xc5, 0x00, 0x6a,
  105. 0x00, 0xae, 0xb9, 0xb1, 0xc6, 0x00, 0x70
  106. };
  107. static const unsigned int ld9040_22_120[] = {
  108. 0x00, 0x47, 0xba, 0xb6, 0xca, 0x00, 0x53,
  109. 0x00, 0xb5, 0xbb, 0xb3, 0xc6, 0x00, 0x65,
  110. 0x00, 0xae, 0xb8, 0xb3, 0xc7, 0x00, 0x6c
  111. };
  112. static const unsigned int ld9040_22_110[] = {
  113. 0x00, 0x13, 0xbb, 0xb7, 0xca, 0x00, 0x4f,
  114. 0x00, 0xb4, 0xbb, 0xb3, 0xc7, 0x00, 0x60,
  115. 0x00, 0xad, 0xb8, 0xb4, 0xc7, 0x00, 0x67
  116. };
  117. static const unsigned int ld9040_22_100[] = {
  118. 0x00, 0x13, 0xba, 0xb8, 0xcb, 0x00, 0x4b,
  119. 0x00, 0xb3, 0xbc, 0xb4, 0xc7, 0x00, 0x5c,
  120. 0x00, 0xac, 0xb8, 0xb4, 0xc8, 0x00, 0x62
  121. };
  122. static const unsigned int ld9040_22_90[] = {
  123. 0x00, 0x13, 0xb9, 0xb8, 0xcd, 0x00, 0x46,
  124. 0x00, 0xb1, 0xbc, 0xb5, 0xc8, 0x00, 0x56,
  125. 0x00, 0xaa, 0xb8, 0xb4, 0xc9, 0x00, 0x5d
  126. };
  127. static const unsigned int ld9040_22_80[] = {
  128. 0x00, 0x13, 0xba, 0xb9, 0xcd, 0x00, 0x41,
  129. 0x00, 0xb0, 0xbe, 0xb5, 0xc9, 0x00, 0x51,
  130. 0x00, 0xa9, 0xb9, 0xb5, 0xca, 0x00, 0x57
  131. };
  132. static const unsigned int ld9040_22_70[] = {
  133. 0x00, 0x13, 0xb9, 0xb9, 0xd0, 0x00, 0x3c,
  134. 0x00, 0xaf, 0xbf, 0xb6, 0xcb, 0x00, 0x4b,
  135. 0x00, 0xa8, 0xb9, 0xb5, 0xcc, 0x00, 0x52
  136. };
  137. static const unsigned int ld9040_22_50[] = {
  138. 0x00, 0x13, 0xb2, 0xba, 0xd2, 0x00, 0x30,
  139. 0x00, 0xaf, 0xc0, 0xb8, 0xcd, 0x00, 0x3d,
  140. 0x00, 0xa8, 0xb8, 0xb7, 0xcd, 0x00, 0x44
  141. };
  142. struct ld9040_gamma {
  143. unsigned int *gamma_22_table[MAX_GAMMA_LEVEL];
  144. };
  145. static struct ld9040_gamma gamma_table = {
  146. .gamma_22_table[0] = (unsigned int *)&ld9040_22_50,
  147. .gamma_22_table[1] = (unsigned int *)&ld9040_22_70,
  148. .gamma_22_table[2] = (unsigned int *)&ld9040_22_80,
  149. .gamma_22_table[3] = (unsigned int *)&ld9040_22_90,
  150. .gamma_22_table[4] = (unsigned int *)&ld9040_22_100,
  151. .gamma_22_table[5] = (unsigned int *)&ld9040_22_110,
  152. .gamma_22_table[6] = (unsigned int *)&ld9040_22_120,
  153. .gamma_22_table[7] = (unsigned int *)&ld9040_22_130,
  154. .gamma_22_table[8] = (unsigned int *)&ld9040_22_140,
  155. .gamma_22_table[9] = (unsigned int *)&ld9040_22_150,
  156. .gamma_22_table[10] = (unsigned int *)&ld9040_22_160,
  157. .gamma_22_table[11] = (unsigned int *)&ld9040_22_170,
  158. .gamma_22_table[12] = (unsigned int *)&ld9040_22_180,
  159. .gamma_22_table[13] = (unsigned int *)&ld9040_22_190,
  160. .gamma_22_table[14] = (unsigned int *)&ld9040_22_200,
  161. .gamma_22_table[15] = (unsigned int *)&ld9040_22_210,
  162. .gamma_22_table[16] = (unsigned int *)&ld9040_22_220,
  163. .gamma_22_table[17] = (unsigned int *)&ld9040_22_230,
  164. .gamma_22_table[18] = (unsigned int *)&ld9040_22_240,
  165. .gamma_22_table[19] = (unsigned int *)&ld9040_22_250,
  166. .gamma_22_table[20] = (unsigned int *)&ld9040_22_260,
  167. .gamma_22_table[21] = (unsigned int *)&ld9040_22_270,
  168. .gamma_22_table[22] = (unsigned int *)&ld9040_22_280,
  169. .gamma_22_table[23] = (unsigned int *)&ld9040_22_290,
  170. .gamma_22_table[24] = (unsigned int *)&ld9040_22_300,
  171. };
  172. #endif