ARM: tegra: cardhu/enterprise: Binwidth Specific smartdimmer Settings
Matt Wagner [Wed, 22 Jun 2011 18:12:14 +0000 (11:12 -0700)]
Added support for Binwidth specific LUT and BLTF

Bug 721258

Original-Change-Id: I1a4eb6a4d32f736101156a7f388ed0699b66c189
Reviewed-on: http://git-master/r/36418
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R777b4195fda082f61678dabef8ccc1211dad9f31

arch/arm/mach-tegra/board-cardhu-panel.c
arch/arm/mach-tegra/board-enterprise-panel.c
arch/arm/mach-tegra/include/mach/dc.h

index 3f2fa35..6d8e320 100644 (file)
@@ -407,7 +407,7 @@ static struct tegra_dc_sd_settings cardhu_sd_settings = {
        .enable = 0, /* Disabled by default. */
        .use_auto_pwm = false,
        .hw_update_delay = 0,
-       .bin_width = 0,
+       .bin_width = -1,
        .aggressiveness = 3,
        .use_vid_luma = true,
        /* Default video coefficients */
@@ -415,24 +415,80 @@ static struct tegra_dc_sd_settings cardhu_sd_settings = {
        .fc = {0, 0},
        /* Immediate backlight changes */
        .blp = {1024, 255},
+       /* Gammas: R: 2.2 G: 2.2 B: 2.2 */
        /* Default BL TF */
        .bltf = {
-                       {128, 136, 144, 152},
-                       {160, 168, 176, 184},
-                       {192, 200, 208, 216},
-                       {224, 232, 240, 248}
+                       {
+                               {57, 65, 74, 83},
+                               {93, 103, 114, 126},
+                               {138, 151, 165, 179},
+                               {194, 209, 225, 242},
+                       },
+                       {
+                               {58, 66, 75, 84},
+                               {94, 105, 116, 127},
+                               {140, 153, 166, 181},
+                               {196, 211, 227, 244},
+                       },
+                       {
+                               {60, 68, 77, 87},
+                               {97, 107, 119, 130},
+                               {143, 156, 170, 184},
+                               {199, 215, 231, 248},
+                       },
+                       {
+                               {64, 73, 82, 91},
+                               {102, 113, 124, 137},
+                               {149, 163, 177, 192},
+                               {207, 223, 240, 255},
+                       },
                },
        /* Default LUT */
        .lut = {
-                       {255, 255, 255},
-                       {199, 199, 199},
-                       {153, 153, 153},
-                       {116, 116, 116},
-                       {85, 85, 85},
-                       {59, 59, 59},
-                       {36, 36, 36},
-                       {17, 17, 17},
-                       {0, 0, 0}
+                       {
+                               {250, 250, 250},
+                               {194, 194, 194},
+                               {149, 149, 149},
+                               {113, 113, 113},
+                               {82, 82, 82},
+                               {56, 56, 56},
+                               {34, 34, 34},
+                               {15, 15, 15},
+                               {0, 0, 0},
+                       },
+                       {
+                               {246, 246, 246},
+                               {191, 191, 191},
+                               {147, 147, 147},
+                               {111, 111, 111},
+                               {80, 80, 80},
+                               {55, 55, 55},
+                               {33, 33, 33},
+                               {14, 14, 14},
+                               {0, 0, 0},
+                       },
+                       {
+                               {239, 239, 239},
+                               {185, 185, 185},
+                               {142, 142, 142},
+                               {107, 107, 107},
+                               {77, 77, 77},
+                               {52, 52, 52},
+                               {30, 30, 30},
+                               {12, 12, 12},
+                               {0, 0, 0},
+                       },
+                       {
+                               {224, 224, 224},
+                               {173, 173, 173},
+                               {133, 133, 133},
+                               {99, 99, 99},
+                               {70, 70, 70},
+                               {46, 46, 46},
+                               {25, 25, 25},
+                               {7, 7, 7},
+                               {0, 0, 0},
+                       },
                },
        .sd_brightness = &sd_brightness,
        .bl_device = &cardhu_backlight_device,
index f8e6693..c2c31ba 100644 (file)
@@ -218,7 +218,7 @@ static struct tegra_dc_sd_settings enterprise_sd_settings = {
        .enable = 1, /* Normal mode operation */
        .use_auto_pwm = false,
        .hw_update_delay = 0,
-       .bin_width = 0,
+       .bin_width = -1,
        .aggressiveness = 5,
        .use_vid_luma = true,
        /* Default video coefficients */
@@ -226,24 +226,80 @@ static struct tegra_dc_sd_settings enterprise_sd_settings = {
        .fc = {0, 0},
        /* Immediate backlight changes */
        .blp = {1024, 255},
+       /* Gammas: R: 2.2 G: 2.2 B: 2.2 */
        /* Default BL TF */
        .bltf = {
-                       {128, 136, 144, 152},
-                       {160, 168, 176, 184},
-                       {192, 200, 208, 216},
-                       {224, 232, 240, 248}
+                       {
+                               {57, 65, 74, 83},
+                               {93, 103, 114, 126},
+                               {138, 151, 165, 179},
+                               {194, 209, 225, 242},
+                       },
+                       {
+                               {58, 66, 75, 84},
+                               {94, 105, 116, 127},
+                               {140, 153, 166, 181},
+                               {196, 211, 227, 244},
+                       },
+                       {
+                               {60, 68, 77, 87},
+                               {97, 107, 119, 130},
+                               {143, 156, 170, 184},
+                               {199, 215, 231, 248},
+                       },
+                       {
+                               {64, 73, 82, 91},
+                               {102, 113, 124, 137},
+                               {149, 163, 177, 192},
+                               {207, 223, 240, 255},
+                       },
                },
        /* Default LUT */
        .lut = {
-                       {255, 255, 255},
-                       {199, 199, 199},
-                       {153, 153, 153},
-                       {116, 116, 116},
-                       {85, 85, 85},
-                       {59, 59, 59},
-                       {36, 36, 36},
-                       {17, 17, 17},
-                       {0, 0, 0}
+                       {
+                               {250, 250, 250},
+                               {194, 194, 194},
+                               {149, 149, 149},
+                               {113, 113, 113},
+                               {82, 82, 82},
+                               {56, 56, 56},
+                               {34, 34, 34},
+                               {15, 15, 15},
+                               {0, 0, 0},
+                       },
+                       {
+                               {246, 246, 246},
+                               {191, 191, 191},
+                               {147, 147, 147},
+                               {111, 111, 111},
+                               {80, 80, 80},
+                               {55, 55, 55},
+                               {33, 33, 33},
+                               {14, 14, 14},
+                               {0, 0, 0},
+                       },
+                       {
+                               {239, 239, 239},
+                               {185, 185, 185},
+                               {142, 142, 142},
+                               {107, 107, 107},
+                               {77, 77, 77},
+                               {52, 52, 52},
+                               {30, 30, 30},
+                               {12, 12, 12},
+                               {0, 0, 0},
+                       },
+                       {
+                               {224, 224, 224},
+                               {173, 173, 173},
+                               {133, 133, 133},
+                               {99, 99, 99},
+                               {70, 70, 70},
+                               {46, 46, 46},
+                               {25, 25, 25},
+                               {7, 7, 7},
+                               {0, 0, 0},
+                       },
                },
        .sd_brightness = &sd_brightness,
        .bl_device = &enterprise_disp1_backlight_device,
index 45f1f86..4ea9882 100644 (file)
@@ -251,8 +251,8 @@ struct tegra_dc_sd_settings {
 
        struct tegra_dc_sd_fc fc;
        struct tegra_dc_sd_blp blp;
-       u8 bltf[4][4];
-       struct tegra_dc_sd_rgb lut[9];
+       u8 bltf[4][4][4];
+       struct tegra_dc_sd_rgb lut[4][9];
 
        atomic_t *sd_brightness;
        struct platform_device *bl_device;