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
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:15 -0800
commitd2bcc33f801c84062314a6c862d5cbe38388bd9f (patch)
tree8a8030698fcc4c045b9b22b63669134892f0c80f /arch/arm/mach-tegra/board-ventana-panel.c
parentea6da0665641e64134fe6dcf48d281c5f5a06cf5 (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 Original-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> Rebase-Id: R42c55c886e4c7aee975278eb8569cafb79c06da8
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 e3b2c7d6e465..ea6bd3100b25 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -74,6 +74,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,
@@ -82,6 +84,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 = {
@@ -267,6 +271,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,