summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Luban <mluban@nvidia.com>2012-10-01 16:24:27 -0700
committerSimone Willett <swillett@nvidia.com>2012-10-23 15:22:05 -0700
commit31656bb7318f45fddfeb5cce7aae83159baf3b42 (patch)
treec66036f113ea6fcbc25dcca07c86703b8ca7e4d3
parent830c12da532c0b6790d14f8432e3de1eeb90c837 (diff)
dalmore: E1627 calibrated backlight
Do backlight calibration to ensure that backlight response curve is linear. Bug 1027945 Signed-off-by: Mitch Luban <mluban@nvidia.com> Reviewed-on: http://git-master/r/140763 (cherry picked from commit 9b762e774f44f3e47b5387cb7e58f3774a668fc3) Change-Id: Id771d519d6568e9267663a8f6a00c9ef760ed0fe Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/146838 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-dalmore-panel.c114
1 files changed, 112 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-dalmore-panel.c b/arch/arm/mach-tegra/board-dalmore-panel.c
index bfefa25d7b30..a165dfe45b0c 100644
--- a/arch/arm/mach-tegra/board-dalmore-panel.c
+++ b/arch/arm/mach-tegra/board-dalmore-panel.c
@@ -155,6 +155,117 @@ static struct resource dalmore_disp2_resources[] = {
},
};
+#if PANEL_10_1_PANASONIC_1920_1200
+static tegra_dc_bl_output dalmore_bl_output_measured = {
+ 0, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 9, 10, 11, 12, 13,
+ 13, 14, 15, 16, 17, 17, 18, 19,
+ 20, 21, 22, 22, 23, 24, 25, 26,
+ 27, 27, 28, 29, 30, 31, 32, 32,
+ 33, 34, 35, 36, 37, 37, 38, 39,
+ 40, 41, 42, 42, 43, 44, 45, 46,
+ 47, 48, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 71, 72, 73, 74, 75,
+ 76, 77, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 141,
+ 142, 143, 144, 146, 147, 148, 149, 151,
+ 152, 153, 154, 155, 156, 157, 158, 158,
+ 159, 160, 161, 162, 163, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 176,
+ 177, 178, 179, 180, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 219,
+ 220, 221, 222, 224, 225, 226, 227, 229,
+ 230, 231, 232, 233, 234, 235, 236, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 255
+};
+#elif PANEL_11_6_AUO_1920_1080
+/* TODO: Calibrate for AUO panel */
+static tegra_dc_bl_output dalmore_bl_output_measured = {
+ 0, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 9, 10, 11, 12, 13,
+ 13, 14, 15, 16, 17, 17, 18, 19,
+ 20, 21, 22, 22, 23, 24, 25, 26,
+ 27, 27, 28, 29, 30, 31, 32, 32,
+ 33, 34, 35, 36, 37, 37, 38, 39,
+ 40, 41, 42, 42, 43, 44, 45, 46,
+ 47, 48, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 71, 72, 73, 74, 75,
+ 76, 77, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 141,
+ 142, 143, 144, 146, 147, 148, 149, 151,
+ 152, 153, 154, 155, 156, 157, 158, 158,
+ 159, 160, 161, 162, 163, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 176,
+ 177, 178, 179, 180, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 219,
+ 220, 221, 222, 224, 225, 226, 227, 229,
+ 230, 231, 232, 233, 234, 235, 236, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 255
+};
+#elif PANEL_10_1_SHARP_2560_1600
+/* TODO: Calibrate for SHARP panel */
+static tegra_dc_bl_output dalmore_bl_output_measured = {
+ 0, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 9, 10, 11, 12, 13,
+ 13, 14, 15, 16, 17, 17, 18, 19,
+ 20, 21, 22, 22, 23, 24, 25, 26,
+ 27, 27, 28, 29, 30, 31, 32, 32,
+ 33, 34, 35, 36, 37, 37, 38, 39,
+ 40, 41, 42, 42, 43, 44, 45, 46,
+ 47, 48, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 71, 72, 73, 74, 75,
+ 76, 77, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 112, 113, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 141,
+ 142, 143, 144, 146, 147, 148, 149, 151,
+ 152, 153, 154, 155, 156, 157, 158, 158,
+ 159, 160, 161, 162, 163, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 176,
+ 177, 178, 179, 180, 182, 183, 184, 185,
+ 186, 187, 188, 189, 190, 191, 192, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 219,
+ 220, 221, 222, 224, 225, 226, 227, 229,
+ 230, 231, 232, 233, 234, 235, 236, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 255
+};
+#endif
+
+static p_tegra_dc_bl_output bl_output = dalmore_bl_output_measured;
+
static struct tegra_dsi_cmd dsi_init_cmd[] = {
#if PANEL_10_1_PANASONIC_1920_1200
/* no init command required */
@@ -664,8 +775,7 @@ static int dalmore_disp1_bl_notify(struct device *unused, int brightness)
if (brightness > 255)
pr_info("Error: Brightness > 255!\n");
else
- /* TODO: backlight response LUT */
- brightness = brightness;
+ brightness = bl_output[brightness];
return brightness;
}