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