tegra: dc: Update dt-binding doc for new bindings
Arun Swain [Wed, 27 May 2015 21:29:22 +0000 (14:29 -0700)]
1. Add dt entry to make the default color space
as adobeRGB.
2. While parsing this entry make default as sRGB
if entry not found. This is to make it backward
compatible.
3. Update the devicetree binding doc for
nvidia,default_color_space, nvidia,cmu-lut1 and
cmu_adobe_rgb dt entries

Bug 1649854

Change-Id: Ic3fd44630ad64f80894ab2c52ac6021b8294a6a6
(cherry picked from commit 05296e421abfc5c1e4354d7b4ed93ad069c7e150)
Reviewed-on: http://git-master/r/747956
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/783731
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>

Documentation/devicetree/bindings/video/nvidia,tegra210-dsi.txt
arch/arm/boot/dts/panel-s-wuxga-8-0.dtsi
drivers/video/tegra/dc/of_dc.c

index 13744a6..a42c54f 100644 (file)
@@ -201,9 +201,12 @@ NVIDIA TEGRA210 Display Serial Interface
  This must be contained in dsi parent node. This is color management unit settings.
 
  Required properties:
- - name: Should be "cmu".
+ - name: Should be "cmu" for sRGB and "cmu_adobe_rgb" for adobeRGB color space.
  - nvidia,cmu-csc: CMU color space conversion matrix. It is 3X3 matrix.
+ - nvidia,cmu-lut1: CMU LUT1. Should be 256 u16 array.
  - nvidia,cmu-lut2: CMU LUT2. Should be 960 u8 arrays.
+ - nvidia,default_color_space : Sets the default color space to be chosen in kernel.
+   0 sets it to sRGB and 1 sets it to adobeRGB.
 
 Example
 
@@ -228,6 +231,7 @@ Example
                                nvidia,dsi-panel-reset = <TEGRA_DSI_ENABLE>;
                                nvidia,dsi-power-saving-suspend = <TEGRA_DSI_ENABLE>;
                                nvidia,panel-bl-pwm-gpio = <&gpio TEGRA_GPIO(H, 1) 0>; /* PH1 */
+                               nvidia,default_color_space = <1>;       /*default color profile:adobeRGB*/
                                nvidia,dsi-pkt-seq =
                                         <CMD_VS LEN_SHORT CMD_BLNK LEN_HSYNC CMD_HE LEN_SHORT PKT_LP LINE_STOP>,
                                         <CMD_VE LEN_SHORT CMD_BLNK LEN_HSYNC CMD_HE LEN_SHORT PKT_LP LINE_STOP>,
@@ -298,6 +302,37 @@ Example
                                        nvidia,cmu-csc = < 0x138 0x3ba 0x00d
                                                           0x3f5 0x120 0x3e6
                                                           0x3fe 0x3f8 0x0e9 >;
+                                       nvidia,cmu-lut1 = < 0 1 2 4 5 6 7 9
+                                                           10 11 12 14 15 16 18 20
+                                                           21 23 25 27 29 31 33 35
+                                                           37 40 42 45 48 50 53 56
+                                                           59 62 66 69 72 76 79 83
+                                                           87 91 95 99 103 107 112 116
+                                                           121 126 131 136 141 146 151 156
+                                                           162 168 173 179 185 191 197 204
+                                                           210 216 223 230 237 244 251 258
+                                                           265 273 280 288 296 304 312 320
+                                                           329 337 346 354 363 372 381 390
+                                                           400 409 419 428 438 448 458 469
+                                                           479 490 500 511 522 533 544 555
+                                                           567 578 590 602 614 626 639 651
+                                                           664 676 689 702 715 728 742 755
+                                                           769 783 797 811 825 840 854 869
+                                                           884 899 914 929 945 960 976 992
+                                                           1008 1024 1041 1057 1074 1091 1108 1125
+                                                           1142 1159 1177 1195 1213 1231 1249 1267
+                                                           1286 1304 1323 1342 1361 1381 1400 1420
+                                                           1440 1459 1480 1500 1520 1541 1562 1582
+                                                           1603 1625 1646 1668 1689 1711 1733 1755
+                                                           1778 1800 1823 1846 1869 1892 1916 1939
+                                                           1963 1987 2011 2035 2059 2084 2109 2133
+                                                           2159 2184 2209 2235 2260 2286 2312 2339
+                                                           2365 2392 2419 2446 2473 2500 2527 2555
+                                                           2583 2611 2639 2668 2696 2725 2754 2783
+                                                           2812 2841 2871 2901 2931 2961 2991 3022
+                                                           3052 3083 3114 3146 3177 3209 3240 3272
+                                                           3304 3337 3369 3402 3435 3468 3501 3535
+                                                           3568 3602 3636 3670 3705 3739 3774 3809 >;
                                        nvidia,cmu-lut2 = < 0 1 2 3 4 5 6 6
                                                            7 8 9 10 11 11 12 13
                                                            13 14 15 15 16 17 17 18
@@ -419,6 +454,163 @@ Example
                                                            251 252 252 252 253 253 253 253
                                                            254 254 254 254 255 255 255 255 >;
                                };
+                               cmu_adobe_rgb {
+                                               nvidia,cmu-csc = < 0x145 0x3BF 0x3FB
+                                                                  0x00E 0x0EA 0x007
+                                                                  0x002 0x003 0x0FA >;
+                                               nvidia,cmu-lut1 = < 0 1 2 4 5 6 7 9
+                                                                   10 11 12 14 15 16 18 19
+                                                                   21 23 25 27 29 31 33 35
+                                                                   37 40 42 45 47 50 53 56
+                                                                   59 62 65 69 72 75 79 83
+                                                                   87 90 94 99 103 107 111 116
+                                                                   121 125 130 135 140 145 151 156
+                                                                   161 167 173 178 184 190 197 203
+                                                                   209 216 222 229 236 243 250 257
+                                                                   264 272 279 287 295 303 311 319
+                                                                   327 336 344 353 362 371 380 389
+                                                                   398 408 417 427 437 447 457 467
+                                                                   477 488 498 509 520 531 542 553
+                                                                   565 576 588 600 612 624 636 649
+                                                                   661 674 687 699 713 726 739 753
+                                                                   766 780 794 808 822 837 851 866
+                                                                   881 896 911 926 941 957 973 989
+                                                                   1005 1021 1037 1053 1070 1087 1104 1121
+                                                                   1138 1155 1173 1190 1208 1226 1244 1263
+                                                                   1281 1300 1318 1337 1356 1376 1395 1415
+                                                                   1434 1454 1474 1494 1515 1535 1556 1577
+                                                                   1598 1619 1640 1662 1683 1705 1727 1749
+                                                                   1771 1794 1816 1839 1862 1885 1909 1932
+                                                                   1956 1979 2003 2027 2052 2076 2101 2126
+                                                                   2151 2176 2201 2227 2252 2278 2304 2330
+                                                                   2357 2383 2410 2437 2464 2491 2518 2546
+                                                                   2573 2601 2629 2658 2686 2715 2744 2773
+                                                                   2802 2831 2860 2890 2920 2950 2980 3011
+                                                                   3041 3072 3103 3134 3165 3197 3228 3260
+                                                                   3292 3325 3357 3390 3422 3455 3488 3522
+                                                                   3555 3589 3623 3657 3691 3725 3760 3795
+                                                                   3830 3865 3900 3936 3972 4008 4044 4080 >;
+                                               nvidia,cmu-lut2 = < 0 2 4 6 8 10 12 14
+                                                                   16 17 17 18 18 19 19 20
+                                                                   20 21 21 22 22 23 24 24
+                                                                   25 25 26 26 27 27 28 28
+                                                                   29 29 30 30 31 32 32 32
+                                                                   33 33 34 34 34 35 35 35
+                                                                   36 36 36 37 37 37 38 38
+                                                                   39 39 39 40 40 40 41 41
+                                                                   41 42 42 43 43 43 44 44
+                                                                   44 45 45 45 46 46 47 47
+                                                                   47 48 48 48 48 49 49 49
+                                                                   49 49 50 50 50 50 50 51
+                                                                   51 51 51 52 52 52 52 52
+                                                                   53 53 53 53 53 54 54 54
+                                                                   54 54 55 55 55 55 56 56
+                                                                   56 56 56 57 57 57 57 57
+                                                                   58 58 58 58 58 59 59 59
+                                                                   59 60 60 60 60 60 61 61
+                                                                   61 61 61 62 62 62 62 62
+                                                                   63 63 63 63 63 64 64 64
+                                                                   64 64 64 65 65 65 65 65
+                                                                   65 65 65 65 66 66 66 66
+                                                                   66 66 66 66 66 67 67 67
+                                                                   67 67 67 67 67 68 68 68
+                                                                   68 68 68 68 68 68 69 69
+                                                                   69 69 69 69 69 69 69 70
+                                                                   70 70 70 70 70 70 70 70
+                                                                   71 71 71 71 71 71 71 71
+                                                                   72 72 72 72 72 72 72 72
+                                                                   72 73 73 73 73 73 73 73
+                                                                   73 73 74 74 74 74 74 74
+                                                                   74 74 74 75 75 75 75 75
+                                                                   75 75 75 76 76 76 76 76
+                                                                   76 76 76 76 77 77 77 77
+                                                                   77 77 77 77 77 78 78 78
+                                                                   78 78 78 78 78 79 79 79
+                                                                   79 79 79 79 79 79 80 80
+                                                                   80 80 80 80 80 80 81 81
+                                                                   81 81 81 81 81 82 82 82
+                                                                   82 82 82 82 83 83 83 83
+                                                                   83 83 84 84 84 84 84 84
+                                                                   84 85 85 85 85 85 85 85
+                                                                   86 86 86 86 86 86 86 87
+                                                                   87 87 87 87 87 87 88 88
+                                                                   88 88 88 88 88 89 89 89
+                                                                   89 89 89 89 90 90 90 90
+                                                                   90 90 91 91 91 91 91 91
+                                                                   91 92 92 92 92 92 92 92
+                                                                   93 93 93 93 93 93 93 94
+                                                                   94 94 94 94 94 94 95 95
+                                                                   95 95 95 95 95 96 96 96
+                                                                   96 96 96 96 96 97 97 97
+                                                                   97 97 97 97 97 97 98 98
+                                                                   98 98 98 98 98 98 98 99
+                                                                   99 99 99 99 99 99 99 99
+                                                                   100 100 100 100 100 100 100 100
+                                                                   100 100 101 101 101 101 101 101
+                                                                   101 101 101 102 102 102 102 102
+                                                                   102 102 102 102 103 103 103 103
+                                                                   103 103 103 103 103 104 104 104
+                                                                   104 104 104 104 104 104 104 105
+                                                                   105 105 105 105 105 105 105 105
+                                                                   106 106 106 106 106 106 106 106
+                                                                   106 107 107 107 107 107 107 107
+                                                                   108 109 109 110 111 112 113 113
+                                                                   114 114 115 115 116 117 117 118
+                                                                   118 119 119 120 121 121 122 122
+                                                                   123 123 124 125 125 126 126 127
+                                                                   128 128 129 129 130 130 131 131
+                                                                   132 132 132 133 133 134 134 135
+                                                                   135 136 136 137 137 138 138 139
+                                                                   139 140 140 141 141 142 142 143
+                                                                   143 144 144 145 145 145 146 146
+                                                                   147 147 147 148 148 148 149 149
+                                                                   150 150 150 151 151 152 152 152
+                                                                   153 153 153 154 154 155 155 155
+                                                                   156 156 157 157 157 158 158 158
+                                                                   159 159 160 160 160 161 161 161
+                                                                   162 162 163 163 163 164 164 164
+                                                                   165 165 165 166 166 166 167 167
+                                                                   168 168 168 169 169 169 170 170
+                                                                   170 171 171 171 172 172 173 173
+                                                                   173 174 174 174 175 175 175 176
+                                                                   176 176 177 177 177 178 178 178
+                                                                   179 179 179 180 180 180 180 181
+                                                                   181 181 182 182 182 183 183 183
+                                                                   184 184 184 185 185 185 186 186
+                                                                   186 186 187 187 187 188 188 188
+                                                                   189 189 189 190 190 190 191 191
+                                                                   191 192 192 192 192 193 193 193
+                                                                   194 194 194 195 195 195 196 196
+                                                                   196 197 197 197 197 198 198 198
+                                                                   199 199 199 200 200 200 201 201
+                                                                   201 202 202 202 202 203 203 203
+                                                                   204 204 204 205 205 205 206 206
+                                                                   206 207 207 207 207 208 208 208
+                                                                   209 209 209 209 210 210 210 211
+                                                                   211 211 211 212 212 212 213 213
+                                                                   213 213 214 214 214 214 215 215
+                                                                   215 216 216 216 216 217 217 217
+                                                                   217 218 218 218 219 219 219 219
+                                                                   220 220 220 221 221 221 221 222
+                                                                   222 222 222 223 223 223 224 224
+                                                                   224 224 225 225 225 225 226 226
+                                                                   226 226 227 227 227 227 228 228
+                                                                   228 228 229 229 229 229 229 230
+                                                                   230 230 230 231 231 231 231 232
+                                                                   232 232 232 233 233 233 233 234
+                                                                   234 234 234 235 235 235 235 236
+                                                                   236 236 236 237 237 237 237 238
+                                                                   238 238 238 239 239 239 239 240
+                                                                   240 240 240 240 241 241 241 241
+                                                                   242 242 242 242 242 243 243 243
+                                                                   243 244 244 244 244 244 245 245
+                                                                   245 245 245 246 246 246 246 247
+                                                                   247 247 247 247 248 248 248 248
+                                                                   249 249 249 249 249 250 250 250
+                                                                   250 251 251 251 251 251 252 252
+                                                                   252 252 252 253 253 253 253 254
+                                                                   254 254 254 254 255 255 255 255 >;
+                               };
                        };
                };
        };
index 7f6674d..b28c302 100644 (file)
@@ -42,6 +42,7 @@
                                nvidia,dsi-ulpm-not-support = <TEGRA_DSI_ENABLE>;
                                nvidia,dsi-suspend-stop-stream-late = <TEGRA_DSI_ENABLE>;
                                nvidia,dsi-power-saving-suspend = <TEGRA_DSI_ENABLE>;
+                               nvidia,default_color_space = <1>;       /*default color profile:adobeRGB*/
                                nvidia,dsi-init-cmd =
                                                        /* Long  Packet: <PACKETTYPE[u8] COMMANDID[u8] PAYLOADCOUNT[u16] ECC[u8] PAYLOAD[..] CHECKSUM[u16]> */
                                                        /* Short Packet: <PACKETTYPE[u8] COMMANDID[u8] DATA0[u8] DATA1[u8] ECC[u8]> */
index d1a71c8..ce7dd08 100644 (file)
@@ -2515,8 +2515,9 @@ struct tegra_dc_platform_data
                        goto fail_parse;
        }
 
-       if (!of_property_read_u32(np_dsi_panel, "nvidia,default_color_space"
-                                               , &pdata->default_clr_space))
+       err = of_property_read_u32(np_dsi_panel, "nvidia,default_color_space"
+                                               , &pdata->default_clr_space);
+       if (err)
                pdata->default_clr_space = 0;
 #endif