summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana-panel.c
diff options
context:
space:
mode:
authorGaurav Sarode <gsarode@nvidia.com>2011-03-15 16:52:32 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-03-22 16:35:54 -0800
commitfe2156c8af2b43a71138e86ce48e0221f51e0091 (patch)
tree3acee1db1b58a0799760367459591881aedada8f /arch/arm/mach-tegra/board-ventana-panel.c
parentb334e8443ed875a89854f9f8639f1f17f030cb5c (diff)
ARM: tegra: ventana: Fixed backlight toggling.
Ventana has both an internal panel (on fb0) and external HDMI (on fb1). One of the devices might be blanked while another is unblanked. In order for the backlight blanking logic to know whether to turn off the backlight for a particular framebuffer's blanking notification, it needs to be able to check if a given framebuffer device corresponds to the backlight. This implement the check_fb pwm_backlight hook to make the internal panel's backlight only toggle on fb0 blank changes. Making equivalent commit from http://git-master/r/21717 Fixed bug 798863 Change-Id: I6465ec40720dc24410808723439277a20c7f764d Reviewed-on: http://git-master/r/23101 Reviewed-on: http://git-master/r/23726 Tested-by: Gaurav Sarode <gsarode@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana-panel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c
index 9038ad30f96f..46ce9d5919d1 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -75,6 +75,8 @@ static int ventana_backlight_notify(struct device *unused, int brightness)
return brightness;
}
+static int ventana_disp1_check_fb(struct device *dev, struct fb_info *info);
+
static struct platform_pwm_backlight_data ventana_backlight_data = {
.pwm_id = 2,
.max_brightness = 255,
@@ -83,6 +85,8 @@ static struct platform_pwm_backlight_data ventana_backlight_data = {
.init = ventana_backlight_init,
.exit = ventana_backlight_exit,
.notify = ventana_backlight_notify,
+ /* Only toggle backlight on fb blank notifications for disp1 */
+ .check_fb = ventana_disp1_check_fb,
};
static struct platform_device ventana_backlight_device = {
@@ -268,6 +272,11 @@ static struct nvhost_device ventana_disp1_device = {
},
};
+static int ventana_disp1_check_fb(struct device *dev, struct fb_info *info)
+{
+ return info->device == &ventana_disp1_device.dev;
+}
+
static struct nvhost_device ventana_disp2_device = {
.name = "tegradc",
.id = 1,