diff options
author | Matt Wagner <mwagner@nvidia.com> | 2011-07-06 16:05:39 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:47:38 -0800 |
commit | 92069873b08173e6dba9611e0a74df07159c4064 (patch) | |
tree | dba8a728486f3b7b16bcfcaad4c68f06ca021151 /arch/arm/mach-tegra | |
parent | e0f8efdfaadb59cf79c6a7343a0bb4134c609d53 (diff) |
ARM: tegra: cardhu: Changes for DIDIM/Backlight
Added support for non-linear backlight response for cardhu panel.
Bug 827366
Original-Change-Id: I62ac8505194c6565c7fd941aeac164078b8f9e27
Reviewed-on: http://git-master/r/39879
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R9d59217c72ad42ef90bf062d50c4d872879cb8e1
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/dc.h | 3 |
2 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c index d73e5b606923..03900e6f0b18 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -72,6 +72,43 @@ static struct regulator *cardhu_lvds_vdd_panel = NULL; static struct board_info board_info; +static tegra_dc_bl_output cardhu_bl_output_measured = { + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, + 70, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 133, + 134, 135, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 179, 180, 181, 182, + 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 253, 254, 255 +}; + +static p_tegra_dc_bl_output bl_output = cardhu_bl_output_measured; + static int cardhu_backlight_init(struct device *dev) { int ret; @@ -168,6 +205,13 @@ static int cardhu_backlight_notify(struct device *unused, int brightness) orig_brightness, cur_sd_brightness, brightness); } + /* Apply any backlight response curve */ + if (brightness > 255) { + pr_info("Error: Brightness > 255!\n"); + } else { + brightness = bl_output[brightness]; + } + return brightness; } diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h index 4ea988218fc3..4b25c646101f 100644 --- a/arch/arm/mach-tegra/include/mach/dc.h +++ b/arch/arm/mach-tegra/include/mach/dc.h @@ -223,6 +223,9 @@ enum { TEGRA_DC_ERRDIFF_DITHER, }; +typedef u8 tegra_dc_bl_output[256]; +typedef u8 *p_tegra_dc_bl_output; + struct tegra_dc_sd_blp { u16 time_constant; u8 step; |